matthewhowell / reasonable-colors

Reasonable Colors is an open-source color system that makes it easy to build accessible, nice-looking color palettes.
https://www.reasonable.work/colors
MIT License
417 stars 11 forks source link

feat: adding SCSS variables for reasonable colors #2

Closed davidsneighbour closed 2 years ago

davidsneighbour commented 2 years ago

solving matthewhowell/reasonable-colors#1

It's currently not possible to use var(--color) in SASS/SCSS files. A good feature would be to ass something along the lines of reasonable-colors.scss with content like:

  $color-red-1: rgb(255, 248, 246);
  $color-red-2: rgb(255, 221, 216);
  $color-red-3: rgb(255, 70, 71);
  $color-red-4: rgb(224, 0, 43);
  $color-red-5: rgb(131, 0, 20);
  $color-red-6: rgb(83, 0, 3);

no :root-brackets required for that.

matthewhowell commented 2 years ago

Thanks for this! Just pushed 0.4.0 which addresses this by adding, per color space .scss files. When I get the release notes out, I'll thank you there, too.