In my quest to push forward what is possible with custom properties in #CSS, I discovered another application of cyclic dependencies. Combined with a prior technique based on custom cascade layers, we are now even closer to something that resembles native CSS mixins.
@kizu Thanks! What a xmas gift! Looking forward to explore your techniques in the coming days. ”Please do not apply this technique in production“ – well… we'll see about that 😅
@kizu this is so cool! a third of the way into your article, i was already thinking about the ways it could be used in production. and then that Firefox bug had to be there 😔
@kizu Okay I had to read the examples a couple times but now I understand it (the quote from the spec helped — who'd have thought! :D). This is really, really clever, and interesting. Thank you for sharing, and happy holidays!
@argyleink The mix-solution gets rid of chroma "for free", but you don't control the curve! Relatedly, I wish you could do stuff like `calc(sin(l * pi) * c)` in rcs, but this crashes the browser😅. However it works fine if "l" is replaced with an external var(--l) 🤷
(example: https://codepen.io/Oddbj-rn-vernes/pen/LYwrYgr )
Just like last year, we – the Chrome DevRel team – have published CSS Wrapped, our end of year overview covering many of the new #CSS and Web UI features that landed in Chrome and The Web Platform in 2024.
It's awesome, and there's even a Level 2 version of the spec coming with a `:snapped` pseudo selector and `scrollsnapchange` and `scrollsnapchanging` events. 🎉
Have you tried it on the <html> element though? It should work, but there's a host of issues.
Todays wish is for Safari to improve support for CSS Scroll Snap on the <html> element.
@kizu Thanks! What a xmas gift! Looking forward to explore your techniques in the coming days. ”Please do not apply this technique in production“ – well… we'll see about that 😅
@kizu this is so cool! a third of the way into your article, i was already thinking about the ways it could be used in production. and then that Firefox bug had to be there 😔
thank you for all the work you put into this!
@kizu Okay I had to read the examples a couple times but now I understand it (the quote from the spec helped — who'd have thought! :D). This is really, really clever, and interesting. Thank you for sharing, and happy holidays!