Skip to content

Commit

Permalink
newsletters: Slim down the CSS nesting example a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Oct 31, 2024
1 parent 3e9f559 commit e79644d
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions src/content/newsletters/2024-10-31.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,36 +79,19 @@ Basic support for CSS nesting with the `&` selector is now in Ladybird! This all

```css
a {
color: blue;
text-decoration: underline;

&:hover {
color: magenta;
text-decoration: none;
}

> img {
border: 1px dotted green;
}
&:hover { text-decoration: none; }
> img { border: 1px dotted green; }
}

/*
* ...which is equivalent to:
*/
/* ...which is equivalent to... */

a {
color: blue;
text-decoration: underline;
}
a { text-decoration: underline; }

a:hover {
color: magenta;
text-decoration: none;
}
a:hover { text-decoration: none; }

a > img {
border: 1px dotted green;
}
a > img { border: 1px dotted green; }
```

Support for nesting `@media` queries is coming up next.
Expand Down

0 comments on commit e79644d

Please sign in to comment.