8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9350e8 commit 8422b02Copy full SHA for 8422b02
1 file changed
selectors-4/Overview.bs
@@ -3258,11 +3258,10 @@ Grammar</h2>
3258
3259
<dfn><relative-selector></dfn> = <<combinator>>? <<complex-selector>>
3260
3261
- <dfn><compound-selector></dfn> = <<simple-selector>>+
+ <dfn><compound-selector></dfn> = [ <<type-selector>>? <<subclass-selector>>*
3262
+ [ <<pseudo-element-selector>> <<pseudo-class-selector>>* ]? ]!
3263
- <dfn><simple-selector></dfn> = <<type-selector>> | <<id-selector>> |
3264
- <<class-selector>> | <<attribute-selector>> |
3265
- <<pseudo-class-selector>> | <<pseudo-element-selector>>
+ <dfn><simple-selector></dfn> = <<type-selector>> | <<subclass-selector>> | <<pseudo-element-selector>>
3266
3267
3268
<dfn><combinator></dfn> = '>>' | '>' | '+' | '~' | [ '||' ]
@@ -3271,7 +3270,10 @@ Grammar</h2>
3271
3270
3272
<dfn noexport><ns-prefix></dfn> = [ <<ident-token>> | '*' ]? '|'
3273
3274
- <dfn noexport><wq-name>></dfn> = <<ns-prefix>>? <<ident-token>>
+ <dfn noexport><wq-name></dfn> = <<ns-prefix>>? <<ident-token>>
+
3275
+ <dfn noexport><subclass-selector></dfn> = <<id-selector>> | <<class-selector>> |
3276
+ <<attribute-selector>> | <<pseudo-class-selector>>
3277
3278
<dfn><id-selector></dfn> = <<hash-token>>
3279
@@ -3293,9 +3295,6 @@ Grammar</h2>
3293
3295
In addition to the above grammar,
3294
3296
the following rules apply:
3297
- * A <<compound-selector>> can contain at most one <<type-selector>>,
- and if it does,
3298
- that must be the first <<simple-selector>> in it.
3299
* White space is forbidden between tokens except:
3300
* Around commas (denoted with the <a>#</a> multiplier)
3301
* Around or in place of a <<combinator>>
@@ -3315,14 +3314,11 @@ Grammar</h2>
3315
3314
makes it difficult to indicate that a grammar term can <em>be</em> whitespace.
3316
"Omitting" a combinator is actually just specifying the <a>descendant combinator</a>.
3317
3318
- Note: While, per the grammar,
3319
- <a>pseudo-elements</a> can appear anywhere in a <<compound-selector>>,
3320
- and a <<compound-selector>> with a <<pseudo-element-selector>>
3321
- can appear anywhere in a <<complex-selector>>,
3322
- in practice the <<pseudo-element-selector>> will only match anything
+ Note: In general,
+ a <<pseudo-element-selector>> is only valid
3323
if placed at the end of the last <<compound-selector>>
3324
in a <<complex-selector>>.
3325
- In some circumstances,
+ In some circumstances, however,
3326
it can be followed by more <<pseudo-element-selector>>s or <<pseudo-class-selector>>s
3327
in the same <<compound-selector>>,
3328
but these are specified on a case-by-case basis.
0 commit comments