mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:37:34 +00:00
LibWeb: Support multiple values in :lang()
selector
Parse them, and also don't give up completely if the first language listed doesn't match an element.
This commit is contained in:
parent
39cba61c2d
commit
12a2750d1e
5 changed files with 63 additions and 7 deletions
16
Tests/LibWeb/Ref/css-lang-selector-ref.html
Normal file
16
Tests/LibWeb/Ref/css-lang-selector-ref.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<html lang="en">
|
||||
<style>
|
||||
div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid black;
|
||||
background-color: red;
|
||||
}
|
||||
#fr, #de {
|
||||
background-color: blue;
|
||||
}
|
||||
</style>
|
||||
<div>Red</div>
|
||||
<div id="fr">Blue</div>
|
||||
<div id="de">Blue</div>
|
||||
</html>
|
18
Tests/LibWeb/Ref/css-lang-selector.html
Normal file
18
Tests/LibWeb/Ref/css-lang-selector.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<html lang="en">
|
||||
<style>
|
||||
div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
div:lang(en) {
|
||||
background-color: red;
|
||||
}
|
||||
div:lang("fr",de) {
|
||||
background-color: blue;
|
||||
}
|
||||
</style>
|
||||
<div>Red</div>
|
||||
<div lang="fr">Blue</div>
|
||||
<div lang="de">Blue</div>
|
||||
</html>
|
|
@ -2,5 +2,6 @@
|
|||
"square-flex.html": "square-ref.html",
|
||||
"separate-borders-inline-table.html": "separate-borders-ref.html",
|
||||
"opacity-stacking.html": "opacity-stacking-ref.html",
|
||||
"css-gradient-currentcolor.html": "css-gradient-currentcolor-ref.html"
|
||||
"css-gradient-currentcolor.html": "css-gradient-currentcolor-ref.html",
|
||||
"css-lang-selector.html": "css-lang-selector-ref.html"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue