3 ms·
You’re right; inline-block is a later addition. It doesn’t change the mental model, though. For example, it makes perfect sense for an empty inline-block to ge
by eurasiantiger 6y ago
You’re right; inline-block is a later addition. It doesn’t change the mental model, though.
For example, it makes perfect sense for an empty inline-block to get aligned to the text baseline, while an inline-block with text also gets aligned to the text baseline. That is precisely what ”vertical-align: baseline” means: align this element’s line of text to the surrounding baseline. If the element doesn’t contain a text node, the inline-block does align correctly, but by default does not have a size unless explicitly specified.
And if there’s something in CSS that is to be avoided unless necessary, it’s specifying things explicitly.