3 ms·
Variables are not mentioned. What if you want to use the same color for backgrounds here, border there, and text there? CSS can do that today with something lik
by qznc 3y ago
Variables are not mentioned. What if you want to use the same color for backgrounds here, border there, and text there? CSS can do that today with something like var(--my-color).
To me, that makes a CSS build unnecessary. Sorry, sass and co.
- FractalHQ 3y agoCustom properties are great until you need to access them from JavaScript and realize it’s impossible and are sent back to the drawing board. After building countless design systems with CSS/SCSS/Tailwind/Svelte/SASS/PostCSS/etc, I’m convinced that CSS as a separated language in separate files needs to die. I’m building an experimental design system in pure Typescript and I feel like I’m finally able to free my UI from the Stone Age. I’m sure I’ll be back to the drawing board again soon enough.
- wildrhythms 3y agoIndeed, and you can have fallback values like var(--my-color, #B22222) and combined with calc() you can do some amazing things in pure CSS.
- mtsr 3y agoRight, this and native nesting support.