- From: Maciej Stachowiak <mjs@apple.com>
- Date: Tue, 24 Jun 2008 13:15:32 -0700
- To: Håkon Wium Lie <howcome@opera.com>
- Cc: David Hyatt <hyatt@apple.com>, www-style list <www-style@w3.org>
On Jun 24, 2008, at 11:29 AM, Håkon Wium Lie wrote: > > Also sprach David Hyatt: > >>> Still, it may be simpler and better not to allow any such crossing. >>> Take for instance this example: >>> >>> style sheet 1: @variable { X: 10px } >>> style sheet 2: @variable { X: none } >>> style sheet 3: div { width: var(X) } >>> >>> Style sheet numbering is in document order. If the >>> fininshed-loading-order is: 3, 1, 2, the width declaration would >>> first >>> be invalid ("The declaration becomes invalid if the variable does >>> not >>> exist") then valid with 10px, and then invalid again when X is none. >> >> In WebKit at least, the parsing of the declaration with the variable >> call is delayed until all stylesheets have been loaded (we don't show >> any content in WebKit while stylesheets are still loading). > > Ok, so you don't see the problem outlined above. Opera supports > progressive rendering of content as style sheets are loaded so for us > the problem is real. > > Progessive rendering of content is a long-established concept in CSS > and I don't think the benefit of variables outweight the cost of > breaking progressive rendering. Your above situation is analogous to the following: style sheet 1: div.someclass { width: 30px; } style sheet 2: div#someid { width: 10px; } style sheet 3: div { width: 20px; } If you render after stylesheet 3 has loaded but not 1 or 2, you will misrender. So I believe CSS Variables don't introduce any new hazards to rendering after only some stylesheets are loaded. Even without them you can get a flash of unstyled content if you don't wait. Regards, Maciej
Received on Tuesday, 24 June 2008 20:16:12 UTC