radix-ui / colors

A gorgeous, accessible color system.
https://www.radix-ui.com/colors
MIT License
1.38k stars 62 forks source link

✨ Update script to build scss files along css files #19

Open chtushar opened 2 years ago

chtushar commented 2 years ago

This PR will rename scripts/build-css-modules.js to scripts/build-stylesheets.js and update the script to export scss files along with css files.

Fix

Fixes #18

Checklist:

chtushar commented 2 years ago

Fixing this🔩.. It didn't appear on my vim setup.

chtushar commented 2 years ago

@vladmoroz Fixed it. Please do have a look.

eugenesvk commented 1 year ago

I think the commit below resolves the theming issue as it allows you to import the identical-to-css data with css custom props you can continue to dynamically use based on class selector, BUT it also allows you to:

For example, these imports allows overriding gray4 color and use :root.light for the light theme and :root:not(.light) for the dark one

@use "path/to/radix-ui-colors/gray"     with ($root:":root.light"      , $gray4:red)
@use "path/to/radix-ui-colors/grayDark" with ($root:":root:not(.light)", $gray4:red)

https://github.com/eugenesvk/colors/commit/3fded5881ba24186b5143ea6bc748e4a92790ff1