Den 07.08.2017 01.41, skrev Ezequiel Garzón:
Wouldn't it make more sense for the word "Red" not to be visible at all, 
considering it
comfortably fits its hidden box? I'm sure the specs dictate this
behavior, but I'm looking for some rationale, specially given that
overlaps and hidden stuff are quite common in CSS, if not the desired
result.

Content - like the word "Red" - is initially defined to flow outside preceding floats, even if it means flowing outside its own container. Backgrounds are defined to not do that, unless block-formatting is declared on the container the background is declared on, in which case the container itself will flow outside preceding floats. So with identical dimensions on the two containers, and no block-formatting, or clear, declared on the last container, the result you get is logical and as expected.

See: https://www.w3.org/TR/CSS2/visuren.html#block-formatting

regards
        Georg

______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to