[CSS21] section 10.8.1: when line-height is equal to or less than content area (font-size)

Hello,

{
Although margins, borders, and padding of non-replaced elements do not
enter into the line box calculation, they are still rendered around inline
boxes. This means that if the height specified by 'line-height' is less
than the content height of contained boxes, backgrounds and colors of
padding and borders may "bleed" into adjoining line boxes. User agents
should render the boxes in document order. This will cause the borders on
subsequent lines to paint over the borders and text of previous lines.
}
http://www.w3.org/TR/CSS21/visudet.html#line-height

The above is not thorough and, IMO, is not precise. The "may" of "may
bleed" seems inappropriate, incorrect, definitely hesitant when it should
not. I do not understand the recourse of the "may" in the sentence.

I believe it should be saying instead that:

{(...)
if the height specified by 'line-height' is *equal to* the content height
of contained boxes, then backgrounds and colors of padding and borders, if
any, *will* "bleed" into adjoining line boxes.
If the height specified by 'line-height' is *less than* the content height
of contained boxes, then background-color of content area *will* "bleed"
into adjoining line boxes.
}

4 tests support such editorial changes:

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/border-padding-bleed-001.htm

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/border-padding-bleed-002.htm

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/border-padding-bleed-003.htm

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/font-size-vs-smaller-line-height.html
(using normal serif font; we could have created the same test with the
Ahem font).


Glyphs in a smaller line box bleed out of their line box and they overlap
*over* the previous line box (they overlap *under* following line box).
None of this is actually written in the current spec.


regards, Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Thursday, 23 February 2012 02:45:09 UTC