Bug with line-height (font shorthand)

David Hyatt khtml-devel@kde.org
Tue, 25 Feb 2003 00:53:00 -0800


40px.

On Monday, February 24, 2003, at 10:57 PM, Lars Knoll wrote:

>
>> Now I'm confused.  That's all I did do... called update() before
>> applying the line-height portion of the font shorthand.... although
>> because of:
>>
>> style="font: 1em/1em Ahem; font-size:36px"
>>
>> I think maybe this needs to be handled at a lower level by the parser
>> (which needs to produce a separate line-height rule that could then be
>> sorted and placed after the font rules).
>
> No. I think we need to treat the font shorthand as one rule, as it 
> resets all
> properties. I think all we need is to call update() on the font before
> applying the line-height property (or for this respect subproperty). 
> We also
> have to make sure line-height is the last property we apply in the font
> shorthand.
>
> One problem I see however:
>
> font: 10px/2em foo;
> font-size: 20px;
>
> What's the line height supposed to be here according to the standard? 
> 20px or
> 40px?
>
> Lars
>
>>
>> dave
>>
>> On Monday, February 24, 2003, at 07:59 AM, Lars Knoll wrote:
>>>> On Fre, 21 Feb 2003, David Hyatt wrote:
>>>>> font: 1em/1em Ahem;
>>>>
>>>> doh. can you confirm that the attached patch works?
>>>
>>> You're doing too much in that patch. There is no need to call 
>>> update()
>>> for the
>>> font size calculations, as these relate to the parent elements font.
>>> Calling
>>> it before calculating the line height should be enough.
>>>
>>> Cheers,
>>> Lars
>>>
>>> _______________________________________________
>>> Khtml-devel@mail.kde.org
>>> http://mail.kde.org/mailman/listinfo/khtml-devel
>>
>> _______________________________________________
>> Khtml-devel@mail.kde.org
>> http://mail.kde.org/mailman/listinfo/khtml-devel
>
> _______________________________________________
> Khtml-devel@mail.kde.org
> http://mail.kde.org/mailman/listinfo/khtml-devel