W3C home > Mailing lists > Public > www-style@w3.org > October 2004

"@import" positional validity

From: Etan Wexler <ewexler@stickdog.com>
Date: Sun, 10 Oct 2004 02:49:56 -0700
To: www-style@w3.org
Message-Id: <BE5BC6AE-1AA1-11D9-8B61-000502CB1B77@stickdog.com>

Section 4.1.5, "At-rules", in the CSS 2.1 specification 
(<http://www.w3.org/TR/CSS21/syndata.html#at-rules>):

"CSS 2.1 user agents must ignore any '@import' rule that occurs inside 
a block or that doesn't precede all rule sets."

Considering the passage literally, what is the validity of the 
"@import" at-rule in the following style sheet?

@media all {}
@import url("http://example.com/style-sheet.css");

If the "@import" at-rule is valid, it seems that the specification has 
accidentally left a loophole. If the "@import" at-rule is invalid, on 
what basis is it invalid?

Section 4.1.7,  "Rule sets, declaration blocks, and selectors", in the 
CSS 2.1 specification (<http://www.w3.org/TR/CSS21/syndata.html#q10>):

"When a user agent can't parse the selector (i.e., it is not valid CSS 
2.1), it must ignore the {}-block as well."

Section 4.2, "Rules for handling parsing errors", in the CSS 2.1 
specification (<http://www.w3.org/TR/CSS21/syndata.html#ignore>):

"In some cases, user agents must ignore part of an illegal style sheet. 
This specification defines ignore to mean that the user agent parses 
the illegal part (in order to find its beginning and end), but 
otherwise acts as if it had not been there."

Considering the CSS meaning of "ignore", what is the validity of the 
"@import" at-rule in the following style sheet?

"error" {}
@import url("http://example.com/style-sheet.css");

If the "@import" at-rule is valid, it seems that the specification has 
accidentally left a loophole. If the "@import" at-rule is invalid, can 
the definition of "ignore" stand as is?

-- 
Etan Wexler.
Received on Sunday, 10 October 2004 09:53:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:34 GMT