mymth / vanillajs-datepicker

A vanilla JavaScript remake of bootstrap-datepicker for Bulma and other CSS frameworks
MIT License
720 stars 147 forks source link

Adding support for CSS custom properties #104

Closed xdev1 closed 2 years ago

xdev1 commented 2 years ago

sass/date-picker.scss currently only supports design tokens (color values etc.) which are given as "normal" SASS variables. It does not support colors etc. that are given as CSS properties. The reason is that SASS operations like *, math.div or darken are (obviously) not working with CSS properties like var(--some-color-property). Unfortunately there's currently no native CSS counterpart for more complex SASS operations like darken. So a solution could be that each SASS expression (there are not too many) will be substituted with a (defaulted) new SASS variable, so every SASS expression can be overriden if wanted.

It's not a big deal to do this. I'll prepare a pull request that tries to be as less invasive as possible (will look something like the this).

mymth commented 2 years ago

Thank you for the PR. I'll close this now.