mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +00:00
LibWeb: Ensure |=
value selector handles multiple segments correctly
Previously, the `|=` would not compare strings containing `-` characters correctly because it would only compare the element attribute up to the first `-` character.
This commit is contained in:
parent
1c3d849b8b
commit
74c803c87b
Notes:
github-actions[bot]
2025-04-28 10:30:50 +00:00
Author: https://github.com/tcl3
Commit: 74c803c87b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4495
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 148 additions and 4 deletions
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Reference</title>
|
||||
<style>
|
||||
.green {
|
||||
background-color: green;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="green">This line should be green</div>
|
||||
<div class="green">This line should be green</div>
|
||||
<div class="green">This line should be green</div>
|
||||
<div class="green">This line should be green</div>
|
||||
<p class="green">This line should be green <em>and this should be green too</em></p>
|
||||
|
||||
<div>This line should NOT be green</div>
|
||||
<div>This line should NOT be green</div>
|
||||
<div>This line should NOT be green</div>
|
||||
<div>This line should NOT be green</div>
|
||||
<div>This line should NOT be green</div>
|
||||
<div>This line should NOT be green<p>This line should NOT be green</p></div>
|
||||
<p>This line should NOT be green <em>and this should not be green either</em></p>
|
||||
</body>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Reference</title>
|
||||
<style>
|
||||
.green {
|
||||
background-color: green;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="green">This line should be green</div>
|
||||
<div class="green">This line should be green</div>
|
||||
<div class="green">This line should be green</div>
|
||||
<div class="green">This line should be green</div>
|
||||
<div class="green">This line should be green</div>
|
||||
<p class="green">This line should be green <em>and this should be green too</em></p>
|
||||
|
||||
<div>This line should NOT be green</div>
|
||||
<div>This line should NOT be green</div>
|
||||
<div>This line should NOT be green</div>
|
||||
<div>This line should NOT be green</div>
|
||||
<div>This line should NOT be green<p>This line should NOT be green</p></div>
|
||||
<p>This line should NOT be green <em>and this should not be green either</em></p>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue