mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +00:00
LibHTML: Handle stand-alone attribute selectors
A selector like "[foo]" is now parsed as a universal selector component with an attribute match type. Pretty neat :^)
This commit is contained in:
parent
c02f560f73
commit
61ba19f031
2 changed files with 13 additions and 4 deletions
|
@ -2,6 +2,10 @@
|
|||
<head>
|
||||
<title>CSS attribute selector test</title>
|
||||
<style type="text/css">
|
||||
[hello=friends] {
|
||||
background-color: #f0f;
|
||||
color: white;
|
||||
}
|
||||
div[id="foo"] {
|
||||
background-color: blue;
|
||||
color: #fff;
|
||||
|
@ -13,6 +17,7 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div hello=friends>This div is hello, friends!</div>
|
||||
<div id="foo">This div has id="foo" and is bloo!</div>
|
||||
<div cool="">This div has a "cool" attribute and a cool green color.</div>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue