Consider the following code:
div{
display: inline-block;
}
div block is generated atomic inline-level box now. As
From the WC3 CSS2.1 Specification, Chapter 9 Visual formatting model:
An inline box is one that is both inline-level and whose contents participate in its containing inline formatting context. A non-replaced element with a 'display' value of 'inline' generates an inline box.
Inline-level boxes that are not inline boxes (such as replaced inline-level elements, inline-block elements, and inline-table elements) are called atomic inline-level boxes because they participate in their inline formatting context as a single opaque box.
Therefore
display: inline
generates inline boxes.display: inline-table | inline-block
and replaced inline-level elements (like
) generates inline-level atomic boxes.With regards to your question on what opaque
means, @BoltClock explains it in a great way here:
CSS Spec - Atomic Inline Level Boxes
Opaque means that the box is a singular, solid unit, and that it cannot be split across lines like an inline box can when its text cannot all fit on a single line.
Inline-level boxes includes boxes...
display: inline
white-space
property is not changed). In effect, the parent inline box will split into several boxes. Here, all the inline-level elements inside the parent inline box, live in one big happy inline formatting context.display: inline-table | inline-block | inline-flex | inline-grid
And finally, as seen, inline-level boxes is a super-set of inline boxes.
Hope that helps someone in the future.