When using browsers web inspectors I came across two different and non-standard property for the CSS attribute vertical-align
.
-webkit-baseline-middle
is only available in Chrome while -moz-middle-with-baseline
is available on Firefox. The naming is similar but NOT the same.
I couldn't find any information regarding these two on the web. They are not even listed on MDN.
My questions:
As detailed above, 'and' is a conjunction. Conjunction usage: Boys and girls come out to play.
And is a coordinating conjunction. We use and to connect two words, phrases, clauses or prefixes together: … Go and, come and.
Or is a conjunction that connects two or more possibilities or alternatives. It connects words, phrases and clauses which are the same grammatical type: Which do you prefer?
Meaning of and/or in English (used to refer to both things or either one of the two mentioned) either "and" or "or": If the game is cancelled, you will get a refund and/or new tickets.
@VSG24:
Are they part of any standards?
Both properties are not part of any standards, according to W3C CSS reference. They only seem to be used by Webkit and Gecko to behave correctly, as expected in CSS 2.1 specification:
Align the vertical midpoint of the box with the baseline of the parent box plus half the x-height of the parent.
CSS 2.1 specs, p170
@VSG24:
What is the expected behavior when using them?
After some search on the web, here's what I've found about -webkit-baseline-middle
on the Safari CSS Reference:
vertical-align: -webkit-baseline-middle
:
The center of the element is aligned with the baseline of the text.
I was unable to get any info about -moz-middle-with-baseline
other than this one :
Q: Webkit-baseline-middle - are there alternatives?
A: the same, only for Mozilla
>vertical-align: -moz-middle-with-baseline;
https://toster.ru/q/255210
Below is a test, you may try it using Webkit based browsers (such as Chrome) and Gecko (Firefox):
div { width: 15%; height: 100px; display: inline-block; box-sizing: border-box; } hr { width: 100%; position: absolute; top: 90px; height: 1px; background: hotpink; border: none; } .container { border: 2px solid hotpink; position: absolute; top: 0; left: 0; height: 200px; width: 100%; z-index: -1; } .reference { background: darkblue; } .standard { background: teal; vertical-align: middle; } .moz { background: antiquewhite; vertical-align: -moz-middle-with-baseline; } .webkit { background: darksalmon; vertical-align: -webkit-baseline-middle }
<div class="container"> <hr /> <div class="reference"></div> <div class="standard"></div> <div class="moz"></div> <div class="webkit"></div> </div>
References :
Hope I helped a bit :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With