Re: [css3-namespace] 3.1 Syntax

On Monday 2008-03-10 16:58 +0100, Erik Dahlström wrote:
>> Any @namespace rules must follow all @charset and @import rules and
>> precede all other non-ignored at-rules and rule sets in a style
>> sheet
>
> Why? What benefit does that provide? What if you want to later define
> an important @-rule and want it to be 'right after' @charset? I can
> see why @charset needs to come first, and why its convenient to have
> @import near the top so the referenced stylesheets can be downloaded
> as soon as possible. I could also understand a rule that required
> namespace declarations to occur before use. Preceding all
> 'non-ignored' @rules seems rather odd, too.  It makes a stylesheet
> move from valid to invalid
>
> Suggestion: Simply state that @namespace rules must precede any rules
> that use namespaces.

I think the reason for this ordering rule relates more to @import
rules than to @namespace rules.  It's clearer that the @import-ed
style sheet is independent of its parent (and, for example, the
@namespace rules in the parent don't apply inside the @import-ed
sheet) if the @import is required to come before the @namespace.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Monday, 10 March 2008 16:59:07 UTC