Re: [css21] line-height, problem?

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 UTC