diff options
author | bptato <nincsnevem662@gmail.com> | 2024-10-26 12:11:55 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-10-26 12:21:55 +0200 |
commit | 4aeb8699f96672103230e7826d7b4e3f0a8aae2f (patch) | |
tree | 9f791ea40e5be9b6ae962cf29fe1d91ea4e8d346 /test/layout | |
parent | 28bf2922a33dd987a0a3095bc461589ef23ad37d (diff) | |
download | chawan-4aeb8699f96672103230e7826d7b4e3f0a8aae2f.tar.gz |
selectorparser: fix parsing of invalid pseudo elements
Found this because the 5th largest tech company on Earth cannot bother itself with trivial matters such as "writing valid CSS".
Diffstat (limited to 'test/layout')
-rw-r--r-- | test/layout/invalid-pseudo-element-selectors.color.expected | 2 | ||||
-rw-r--r-- | test/layout/invalid-pseudo-element-selectors.html | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/layout/invalid-pseudo-element-selectors.color.expected b/test/layout/invalid-pseudo-element-selectors.color.expected new file mode 100644 index 00000000..21996c2c --- /dev/null +++ b/test/layout/invalid-pseudo-element-selectors.color.expected @@ -0,0 +1,2 @@ +[38;2;41;169;42mshould be green [39m +[38;2;191;64;191mshould be purple[39m diff --git a/test/layout/invalid-pseudo-element-selectors.html b/test/layout/invalid-pseudo-element-selectors.html new file mode 100644 index 00000000..bd5fbd1f --- /dev/null +++ b/test/layout/invalid-pseudo-element-selectors.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<style> +#x { color: green } +#x::before { content: "should" } +:is(#x::before) { color: pink } +#x::before span { color: magenta } +::before#x { color: blue } +:is(#x::before, #y) { color: purple } +:is(#x::before) span { color: red } +</style> +<span id=x> +be +<span> +green +</span> +</span> +<div id=y> +should be purple +</div> |