You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A strict interpretation would be that @namespace is misplaced and should be ignored.
Also, I did not test the current UA behavior with @namespace preceding @charset, but I understood that all other rules following the first @charset rules are ignored, therefore it could be allowed.
User agents must ignore any @charset rule not at the beginning of the style sheet. When user agents detect the character encoding using the BOM and/or the @charset rule, they should follow the following rules:
Except as specified in these rules, all @charset rules are ignored.
EDIT:@import would be invalid (see below) and ignored, @charset not at the beginning of the style sheet is also ignored (see above), and @namespace is valid if it precedes all other non-ignored at-rules, ie. any valid rules that is not @import (again, @charset following @namespace is always invalid).
Any @import rules must precede all other valid at-rules and style rules in a style sheet (ignoring @charset), or else the @import rule is invalid
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
https://drafts.csswg.org/css-namespaces-3/#syntax
In the following case, both Chrome/Firefox do not ignore
@namespace
but ignore the@import
:A strict interpretation would be that
@namespace
is misplaced and should be ignored.Also, I did not test the current UA behavior with
@namespace
preceding@charset
, but I understood that all other rules following the first@charset
rules are ignored, therefore it could be allowed.https://drafts.csswg.org/css2/#charset%E2%91%A0
EDIT:
@import
would be invalid (see below) and ignored,@charset
not at the beginning of the style sheet is also ignored (see above), and@namespace
is valid if it precedes all other non-ignored at-rules, ie. any valid rules that is not@import
(again,@charset
following@namespace
is always invalid).The text was updated successfully, but these errors were encountered: