Re: Nested :first-letter

On Thu, 09 Sep 2010 06:05:01 +0200, fantasai  
<fantasai.lists@inkedblade.net> wrote:

> On 09/08/2010 06:16 PM, Simon Fraser wrote:
>> On Sep 8, 2010, at 6:10 PM, fantasai wrote:
>>
>>> On 09/08/2010 05:36 PM, Simon Fraser wrote:
>>>> What should be the rendering of the following?
>>>>
>>>> <style>
>>>> div:first-letter { font-size: 24pt; }
>>>> p:first-letter { color: red; }
>>>> </style>
>>>> <div><p>Text</p></div>
>>>>
>>>> Does the 'T' render in a 24pt font or not?
>>>
>>> Yes.  [...]
>>>
>> I see now, thanks. Neither WebKit, Gecko nor Opera seem to get this  
>> right.
>
> Seems to work fine in Opera.
> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A%3Cstyle%3E%0D%0Adiv%3Afirst-letter%20%7B%20text-decoration%3A%20underline%3B%20font-size%3A%202em%3B%20%7D%0D%0Ap%3Afirst-letter%20%7B%20color%3A%20red%3B%20%7D%0D%0A%3C%2Fstyle%3E%0D%0A%3Cdiv%3E%3Cp%3EText%3C%2Fp%3E%3C%2Fdiv%3E%0D%0A

We did improve our ::first-letter support some time last year. Supporting  
::first-letter for nested/multiple containers was one of the improvements.

-- 
Rune Lillesveen
Senior Core Developer / Architect
Opera Software ASA

Received on Thursday, 9 September 2010 05:48:50 UTC