mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
LibWeb: Add a CSS parsing test for selectors containing ':' in @media
While updating the parser to the latest spec algorithms, this started parsing incorrectly as a declaration, and we had no tests covering it.
This commit is contained in:
parent
ac48222ed7
commit
9241f37823
Notes:
github-actions[bot]
2024-10-14 06:09:55 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9241f37823
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1729
2 changed files with 17 additions and 0 deletions
|
@ -0,0 +1 @@
|
||||||
|
Color is: "rgb(0, 128, 0)", should be "rgb(0, 128, 0)"
|
|
@ -0,0 +1,16 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
@media all {
|
||||||
|
div:is(#target) {
|
||||||
|
color: rgb(0, 128, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script src="../include.js"></script>
|
||||||
|
<div id="target">This text should look green</div>
|
||||||
|
<script>
|
||||||
|
test(() => {
|
||||||
|
let target = document.getElementById("target");
|
||||||
|
println(`Color is: "${getComputedStyle(target).color}", should be "rgb(0, 128, 0)"`);
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue