- From: L. David Baron <dbaron@dbaron.org>
- Date: Tue, 18 Dec 2012 17:11:22 -0500
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style@w3.org
On Monday 2012-12-17 02:11 -0800, fantasai wrote: > On 12/14/2012 06:08 AM, Simon Sapin wrote: > >Hi, > > > >Here are the issues I found or details I was not comfortable with when going through ED-css3-cascade-20121213. > > > > > >Section 2 says: > > > >>So that user agents can avoid retrieving resources for unsupported > >>media types, authors may specify media-dependent ‘@import’ rules. > >>These conditional imports specify comma-separated “media queries” > >>after the URI. > > > >This sentence suggests that media queries in @import are merely a hint for performance. The section should say that the > >imported stylesheet *must not* be applied when the media query list evaluates to false, although that might be covered by > >section 4.1. (I’m not sure if @import with a media query counts as a "conditional rule" as it’s not defined in css3-conditional.) > > Fixed. The fix you wrote appears to be: # The UA must import the style sheet only if the media query # evaluates to true. This wording is a little vague, since it's certainly possible to interpret this wording to imply that the UA shouldn't even download the style sheet or make it available via the CSS OM. On the other hand, I believe the UA should do those things, what it shouldn't do is apply the style sheet *through that @import rule*. (It might, however, apply the style sheet via some other @import rule, or <link> element; this is an extra complexity that @import and <link> have but conditional rules do not.) I would prefer wording more along the lines of what I used in http://dev.w3.org/csswg/css3-conditional/#processing And I'd like to see similar changes in section 4.1. I suspect it might help to define things slightly more formally, in terms of a tree structure (with ordered siblings) and some terminology. (Doing so requires care to exclude any attempts by a style sheet to import itself or one of its ancestors.) -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla http://www.mozilla.org/ 𝄂
Received on Wednesday, 19 December 2012 02:37:46 UTC