mirror of
https://github.com/sass/sass.git
synced 2024-09-21 18:47:25 +00:00
Use <ident-token>
instead of Identifier
(#3075)
This commit is contained in:
parent
2cb85cb367
commit
9625ee0608
@ -17,12 +17,14 @@ The grammar for the `@forward` rule is as follows:
|
||||
|
||||
<x><pre>
|
||||
**ForwardRule** ::= '@forward' QuotedString AsClause? (ShowClause | HideClause)?
|
||||
**AsClause** ::= 'as' Identifier '*'
|
||||
**AsClause** ::= 'as' [\<ident-token>][] '*'
|
||||
**ShowClause** ::= 'show' MemberName (',' MemberName)*
|
||||
**HideClause** ::= 'hide' MemberName (',' MemberName)*
|
||||
**MemberName** ::= '$'? Identifier
|
||||
**MemberName** ::= '$'? [\<ident-token>][]
|
||||
</pre></x>
|
||||
|
||||
[\<ident-token>]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
|
||||
|
||||
`@forward` rules must be at the top level of the document, and must come before
|
||||
any rules other than `@charset` or `@use`. The `QuotedString`'s contents, known
|
||||
as the rule's *URL*, must be a [valid URL string][] (for non-[special][] base
|
||||
|
@ -8,9 +8,11 @@
|
||||
## Syntax
|
||||
|
||||
<x><pre>
|
||||
**FunctionRule** ::= '@function' Identifier ArgumentDeclaration '{' Statements '}'
|
||||
**FunctionRule** ::= '@function' [\<ident-token>][] ArgumentDeclaration '{' Statements '}'
|
||||
</pre></x>
|
||||
|
||||
[\<ident-token>]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
|
||||
|
||||
No whitespace is allowed between the `Identifier` and the `ArgumentDeclaration`
|
||||
in `FunctionRule`.
|
||||
|
||||
|
@ -17,9 +17,11 @@
|
||||
### Syntax
|
||||
|
||||
<x><pre>
|
||||
**MixinRule** ::= '@mixin' Identifier ArgumentDeclaration? '{' Statements '}'
|
||||
**MixinRule** ::= '@mixin' [\<ident-token>][] ArgumentDeclaration? '{' Statements '}'
|
||||
</pre></x>
|
||||
|
||||
[\<ident-token>]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
|
||||
|
||||
No whitespace is allowed between the `Identifier` and the `ArgumentDeclaration`
|
||||
in `MixinRule`.
|
||||
|
||||
|
@ -29,13 +29,15 @@ The grammar for the `@use` rule is as follows:
|
||||
|
||||
<x><pre>
|
||||
**UseRule** ::= '@use' QuotedString AsClause? WithClause?
|
||||
**AsClause** ::= 'as' ('\*' | Identifier)
|
||||
**AsClause** ::= 'as' ('\*' | [\<ident-token>][])
|
||||
**WithClause** ::= 'with' '('
|
||||
  KeywordArgument (',' KeywordArgument)\* ','?
|
||||
  ')'
|
||||
**KeywordArgument** ::= '$' Identifier ':' Expression
|
||||
**KeywordArgument** ::= '$' [\<ident-token>][] ':' Expression
|
||||
</pre></x>
|
||||
|
||||
[\<ident-token>]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
|
||||
|
||||
`@use` rules must be at the top level of the document, and must come before any
|
||||
rules other than `@charset` or `@forward`. The `QuotedString`'s contents, known
|
||||
as the rule's *URL*, must be a [valid URL string][] (for non-[special][] base
|
||||
|
@ -163,7 +163,7 @@ modules:
|
||||
|
||||
<x><pre>
|
||||
**PublicIdentifier** ::= [\<ident-token>][] that doesn't begin with '-' or '_'
|
||||
**NamespacedIdentifier** ::= Identifier | Identifier '.' PublicIdentifier
|
||||
**NamespacedIdentifier** ::= [\<ident-token>][] | [\<ident-token>][] '.' PublicIdentifier
|
||||
</pre></x>
|
||||
|
||||
[\<ident-token>]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
|
||||
|
@ -99,7 +99,7 @@ No whitespace is allowed between components of an `InterpolatedIdentifier`.
|
||||
**PseudoSelector** ::= NormalPseudoSelector
|
||||
  | SelectorPseudo
|
||||
  | NthSelectorPseudo
|
||||
**NormalPseudoSelector** ::= ':' ':'? VendorPrefix? Identifier
|
||||
**NormalPseudoSelector** ::= ':' ':'? VendorPrefix? [\<ident-token>][]
|
||||
  ('(' [\<declaration-value>] ')')?
|
||||
**SelectorPseudo** ::= SelectorPseudoName '(' Selector ')'
|
||||
**NthSelectorPseudo** ::= NthSelectorPseudoName '(' [\<an+b>] 'of'¹ Selector ')'
|
||||
@ -110,6 +110,7 @@ No whitespace is allowed between components of an `InterpolatedIdentifier`.
|
||||
|
||||
[\<declaration-value>]: https://www.w3.org/TR/css-syntax-3/#typedef-declaration-value
|
||||
[\<an+b>]: https://www.w3.org/TR/css-syntax-3/#the-anb-type
|
||||
[\<ident-token>]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
|
||||
|
||||
1: The string `of` is matched case-insensitively. In addition, it must be parsed
|
||||
as an identifier.
|
||||
|
@ -14,11 +14,12 @@
|
||||
|
||||
<x><pre>
|
||||
**Variable** ::= PlainVariable | NamespacedVariable
|
||||
**PlainVariable** ::= '$' Identifier
|
||||
**NamespacedVariable** ::= Identifier '.$' [PublicIdentifier][]
|
||||
**PlainVariable** ::= '$' [\<ident-token>][]
|
||||
**NamespacedVariable** ::= [\<ident-token>][] '.$' [PublicIdentifier][]
|
||||
**VariableDeclaration** ::= Variable ':' Expression ('!global' | '!default')*
|
||||
</pre></x>
|
||||
|
||||
[\<ident-token>]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
|
||||
[PublicIdentifier]: modules.md#syntax
|
||||
|
||||
No whitespace is allowed after the `$` in `PlainVariable` or before or after
|
||||
|
Loading…
Reference in New Issue
Block a user