W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: [css21] line-height, problem?

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Mon, 26 Nov 2012 20:34:39 -0800
Message-ID: <CALRQH7-Bwxmxc=3uiEniThZUKJHLEwm9yTnp5rFuxj3Q-Sg1Fg@mail.gmail.com>
To: www-style@gtalbot.org
Cc: www-style mailing list <www-style@w3.org>
On Mon, Nov 26, 2012 at 6:45 PM, "Gérard Talbot" <www-style@gtalbot.org> wrote:
>
> Le Lun 26 novembre 2012 19:35, Andrew Fedoniouk a écrit :
>> Consider these two properties:
>>
>> 'min-height' specifies the minimal height [of an element].
>> 'line-height' specifies the minimal height of line boxes.
>>
>> Seems like both define same concept - they constrain the height to a
>> certain minimal value that
>> computed value of height may use.
>>
>> By defining min-height you *cannot* make elements smaller, only larger.
>
> You can define the min-height of an element to be larger than its content
> in which case, there will be vertical gaps. I can create a test which
> would verify, demonstrate and test this.
>
...
>
>> But by defining line-height you can make line-box smaller than its
>> content.
>
> line-height is inherited: so, inline elements inside a block all have an
> line-height specified value.

Consider this:

<p style="line-height:10px">ABC</p>

What exactly is inherited here?  And by whom?

There is no other element inside that paragraph except of
single text node with three characters. That text node
has height determined by the font used. And that height is
the content height (a.k.a. normal height) of single line box
in that paragraph.

Jeez, what exactly that "minimal line height" means?

-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Tuesday, 27 November 2012 04:35:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:03 GMT