mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
For example, this:
```css
.foo {
color: red;
&:hover {
color: green;
}
}
```
now has the same effect as this:
```css
.foo {
color: red;
}
.foo:hover {
color: green;
}
```
CSSStyleRule now has "absolutized selectors", which are its selectors
with any `&`s resolved. We use these instead of the "real" selectors
when matching them, meaning the style computer doesn't have to know or
care about where the selector appears in the CSS document.
19 lines
381 B
HTML
19 lines
381 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.test {
|
|
background-color: green;
|
|
width: 30px;
|
|
height: 30px;
|
|
margin-bottom: 10px;
|
|
}
|
|
</style>
|
|
<div class="test"></div>
|
|
<div class="test"></div>
|
|
<div class="test"></div>
|
|
<div class="test"></div>
|
|
<div class="test"></div>
|
|
<div class="test"></div>
|
|
<div class="test"></div>
|
|
<div class="test"></div>
|
|
<div class="test"></div>
|