diff --git a/docs/tests/procedural-cosmetic-filters.html b/docs/tests/procedural-cosmetic-filters.html index 9535f1ff2..4de93db9e 100644 --- a/docs/tests/procedural-cosmetic-filters.html +++ b/docs/tests/procedural-cosmetic-filters.html @@ -73,133 +73,133 @@

Tests

-
+
- #pcf #a1 .fail:has(b) + .fail:has(b)
-
+
- #pcf #a2 .fail:has(> a > b) + .fail:has(> a > b)
-
+
- #pcf #a3 .fail:has(+ a > b) + .fail:has(+ a > b)
-
+
- #pcf #a4 .fail:has(:scope + a > b) + .fail:has(:scope + a > b)
-
+
- #pcf #a5 .fail:has(:is(.pass a > b)) + .fail:has(:is(.pass a > b))
-
+
- #pcf #a6 .fail:not(:has(c)) + .fail:not(:has(c))
-
+
- #pcf #a7 .fail:has-text(needle) + .fail:has-text(needle)
-
+
- #pcf #a8 .fail:has-text(/NEEDLE/i) + .fail:has-text(/NEEDLE/i)
-
+
- #pcf #a9 .fail:not(:has-text(haystack)) + .fail:not(:has-text(haystack))
-
+
- #pcf #a10 .fail:matches-css(position: absolute) + .fail:matches-css(position: absolute)
-
+
- #pcf #a11 .fail:has(a:matches-css-before(opacity: 0)) + .fail:has(a:matches-css-before(opacity: 0))
-
+
- #pcf #a12 .fail:has(b:matches-css-after(opacity: 0)) + .fail:has(b:matches-css-after(opacity: 0))
-
+
- #pcf #a13 .fail > a > b:nth-ancestor(2) + .fail > a > b:nth-ancestor(2)
-
+
- #pcf #a14:xpath(.//b/../..) + :xpath(.//b/../..)
-
+ -
+
- #pcf #a16 .pass > a:has(b) + .fail + .pass > a:has(b) + .fail
-
+
- #pcf #a17 .pass > a:has(b) + .fail:has(b) + .pass > a:has(b) + .fail:has(b)
-
+
- #pcf #a18 .pass:watch-attr(class) > .fail:has(b.notok) + .pass:watch-attr(class) > .fail:has(b.notok)
-
+
- #pcf #a19 .fail:has(+ a) + .fail:has(+ a)
-
+
- #pcf #a20 .fail:has(~ a:has(b)) + .fail:has(~ a:has(b))
-
+
- #pcf #a21 .fail:remove() + .fail:remove()
-
+
- #pcf #a22 b:upward(2) + b:upward(2)
-
+
- #pcf #a23 b:upward(.fail) + b:upward(.fail)
-
+
- #pcf #a24 b:upward(.fail):style(visibility: hidden !important) + b:upward(.fail):style(visibility: hidden !important)
@@ -208,10 +208,17 @@ const hostname = self.location.hostname; const filters = []; const fragment = document.createDocumentFragment(); - for ( const node of document.querySelectorAll('code') ) { + let i = 1; + for ( const tile of document.querySelectorAll('.tile') ) { + const id = `a${i}`; + tile.id = id; + const code = tile.querySelector('code'); + const filter = `#pcf #${id}${code.textContent}`; + code.textContent = filter; const div = document.createElement('div'); - div.textContent = `${hostname}#?#${node.textContent}`; + div.textContent = `${hostname}#?#${filter}`; fragment.appendChild(div); + i += 1; } const parent = document.querySelector('.filters'); while ( parent.lastElementChild !== null ) {