- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 14 May 2012 16:56:59 +0200
- To: Roger Baker <tstartme@hotmail.com>
- Cc: www-style@w3.org
On Mon, May 14, 2012 at 4:29 PM, Roger Baker <tstartme@hotmail.com> wrote: > Hi, > Expanding the inline height of the inline box in the following example has > the expected separation (effect due to expansion of its line box): > > http://jsfiddle.net/8XJhY/6/ > > But *shortening* the inline height of the inline box does not bring the > succeeding line box closer (does not appear to shorten its line box), for > example: > > http://jsfiddle.net/8XJhY/1/ > > Can someone help me explain this (or point me to the relevant section of the > spec)? (Someone else can correct me if I'm wrong here - inline layout isn't my specialty.) I believe that line boxes size themselves to the minimum of the line-height of their containing block and the height of their contents. So, adding a <span> with a large line-height (or just a large font-size, or a tall image) will grow the line box, but adding one with an extra-small height does nothing. The line-box-contain property <http://dev.w3.org/csswg/css3-linebox/#LineStacking> hasn't made it into any implementation (in general, the Line Box spec should be considered experimental right now), but its initial value explains what goes into the calculation by default - the line-height of the "root inline box" (created by the containing block), the line-height of the inlines, and the height of any replaced elements. ~TJ
Received on Monday, 14 May 2012 14:57:53 UTC