Skip to content

Commit

Permalink
newsletter: Fill-in CSS nesting note
Browse files Browse the repository at this point in the history
  • Loading branch information
AtkinsSJ committed Nov 29, 2024
1 parent f1752a3 commit a2670cd
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions src/content/newsletters/2024-11-30.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,45 @@ We now support the `scale`, `rotate` and `translate` CSS properties, which offer

### CSS nesting

We now support `@media` rules inside a CSS nesting context.
We completed our implementation of CSS nesting by adding support for `@media`, `@supports` and `@layer` rules inside a CSS nesting context. For example:

FIXME: Add example.
```css
.thing {
font-size: 20px;

img {
max-width: 100%;
}

@media (min-width: 800px) {
font-size: 30px;

img {
max-width: 25%;
}
}
}

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

.thing {
font-size: 20px;
}

.thing img {
max-width: 100%;
}

@media (min-width: 800px) {
.thing {
font-size: 30px;
}

.thing img {
max-width: 25%;
}
}
```

### Vertical text

Expand Down

0 comments on commit a2670cd

Please sign in to comment.