what were your favorite SASS functions (not mixins)? or just other CSS functions you'd expect to be possible by a vanilla CSS function?
3 reposts28 likes
what were your favorite SASS functions (not mixins)? or just other CSS functions you'd expect to be possible by a vanilla CSS function?
3 reposts28 likes
Relative color syntax? developer.mozilla.org/en-US/docs/W...
they're the first functions in any language that I ever wrote so it's a mess but: - github.com/voyagerstudi... - github.com/voyagerstudi... - github.com/voyagerstudi...
you've seen the relative color syntax CSS feature? you can pass a hex and get back rgb channels (and alpha) background: rgb(from #abc r g b / 50%); developer.chrome.com/blog/css-rel...
Thank you for the suggestion! It's not perfect, but looks nice. My biggest concern at this point is mostly the browser support, especially on iOS (caniuse.com/css-relative...). Are there any workarounds for old devices? I assume, that they will simply ignore that values.
You want this! bsky.app/profile/nerd...
Chrome has this feature assigned to an engineer for Q1 2025 🤩++
spec has gotchu: random() random-item() nerdy.dev/css-values-5...
Worth noting this was released in the latest version of safari, still pending other browsers webkit.org/blog/16301/w...
This is actually possible using tan and atan2 😀 :root { --100vw: 100vw; --px-width: tan(atan2(var(--100vw), 1px)); } dev.to/janeori/css-...
Example: codepen.io/jakob-e/pen/... @nerdy.dev maybe you could consider something similar for OpenProps 🙂
First, I need custom media. And next, I want this thing.
yoo, checkout media query vars by @janeori.propjockey.io github.com/propjockey/c...
There's a spec for accessing the element index, sounds like that? bsky.app/profile/nerd...
You want this! bsky.app/profile/nerd...
Also generating tints and shades pallettes as CSS custom properties and other formats. And I'm still using @kittygiraudel.com's themify!
Maybe off-topic but looking at nerdy.dev/hover-not-ho..., it would be nice to be able to assign ‘n’ to a custom prop when doing ‘:nth-child(n)’. Would somewhat mitigate the need for looping.
i believe what you're describing is sibling-index(), a function specced to return each elements individual index. this would remove the inline custom properties and become more dynamic, moving it towards your suggestion here yeah? github.com/w3c/csswg-dr...