@fcalderan gets even easier with scroll-state(sticky) queries!
```css
.stuck-top {
container-type: scroll-state;
position: sticky;
top: 20px;
> nav {
transition:
box-shadow .3s var(--ease-3),
margin .3s var(--ease-3),
border-radius .3s var(--ease-3);
@container scroll-state(stuck: top) {
box-shadow: var(--shadow-5);
border-radius: 10px;
margin: 20px;
}
}
}
```
try them in Canary: https://codepen.io/argyleink/pen/vYPzdGp
article out soon!
@argyleink @fcalderan finally! Is it a chrome only feature or other browsers plan to implement it too?