@@ -539,6 +539,31 @@ Structure and Terminology</h3>
539
539
no whitespace is allowed between the <a>simple selectors</a>
540
540
in a <a>compound selector</a> .
541
541
542
+ A <dfn id=pseudo-compound>pseudo-compound selector</dfn>
543
+ is a [=pseudo-element=] selector,
544
+ optionally followed by additional [=pseudo-class=] selectors,
545
+ without any [=combinators=] .
546
+ (A <a>pseudo-compound selector</a> is represented by <<pseudo-compound-selector>>
547
+ in the selectors <a href="#grammar">grammar</a> .)
548
+ A [=pseudo-element=] [=matches=] a [=pseudo-compound selector=]
549
+ when it has the specified pseudo-element name,
550
+ matches the additional conditions represented by any [=pseudo-classes=] ,
551
+ and has an [=originating element=]
552
+ represented by the adjacent preceding [=compound selector=] .
553
+ If there is no adjacent preceding [=compound selector=] ,
554
+ the [=universal selector=] is assumed.
555
+ (For example, ''.foo ::before''
556
+ is equivalent to ''.foo *::before'' ,
557
+ and distinct from ''.foo::before'' .)
558
+
559
+ <div class=example>
560
+ For example, in ''.foo::before:hover'' ,
561
+ the ''.foo'' is a [=compound selector=] ,
562
+ while the ''::before:hover'' is a [=pseudo-compound selector=] .
563
+ However, in ''.foo::before::marker'' ,
564
+ ''::before'' and ''::marker'' are separate [=pseudo-compound selectors=] .
565
+ </div>
566
+
542
567
A <dfn export for=selector>combinator</dfn>
543
568
is a condition of relationship between two elements
544
569
represented by the <a>compound selectors</a> on either side.
@@ -551,7 +576,7 @@ Structure and Terminology</h3>
551
576
when the condition of relationship between these elements is true.
552
577
553
578
A <dfn id="complex" export>complex selector</dfn> is
554
- a sequence of one or more <a>compound selectors</a>
579
+ a sequence of one or more <a>compound selectors</a> and/or [=pseudo-compound selectors=]
555
580
separated by <a>combinators</a> .
556
581
It represents a set of simultaneous conditions
557
582
on a set of elements in the particular relationships
@@ -589,8 +614,6 @@ Structure and Terminology</h3>
589
614
when it matches any (at least one) of the <a>selectors</a>
590
615
in that <a>selector list</a> .
591
616
592
- Issue: Pseudo-elements aren't handled here, and should be.
593
-
594
617
<h3 id='data-model'>
595
618
Data Model</h3>
596
619
0 commit comments