@@ -577,16 +577,20 @@ Syntax {#syntax}
577577 a <<delim-token>> with the value "&" (U+0026 AMPERSAND) was encountered.
578578
579579 Note: This is phrased in this explicit manner
580- so as to catch cases like '':is(&:unknown, .bar)'' ,
581- which discards its first argument during parsing
582- (since it contains an unknown pseudo-class,
583- and thus is an [=invalid selector=] ).
584- A selector like this still [=contains the nesting selector=] .
580+ so as to catch cases like '':is(:unknown(&), .bar)'' ,
581+ where an unknown selector
582+ (which, being unknown, we have no way of knowing
583+ whether the argument is <em> meant</em> to be parsed as a selector or not)
584+ is the only part of the selector that contains an ''&'' .
585+ As that <em> might</em> be a perfectly valid selector
586+ that's only supported by newer browsers,
587+ and we don't want parsing to be dependent on unrelated versioning issues,
588+ we treat it as still [=containing the nesting selector=] .
585589 </div>
586590
587591 If a <<forgiving-selector-list>> has an item that [=contains the nesting selector=]
588592 but is invalid,
589- it is preserved exactly as-is
593+ that item is preserved exactly as-is
590594 rather than being discarded.
591595 (This does not change the matching behavior of the selector--
592596 an invalid selector still fails to match anything--
0 commit comments