jaohara / ui-component-library

A Component library for various UI elements that I have built for use in my personal projects.
0 stars 0 forks source link

Research PostCSS + PostCSS mixins to replace SCSS mixins #32

Open jaohara opened 7 months ago

jaohara commented 7 months ago

I'm running into an issue with SCSS mixins + CSS Custom Properties when passing in colors stored as custom properties to a mixin and then using a SCSS function on them to change the color. This is due to SCSS variables being computed during the build stage, where CSS Custom Properties are runtime values and unknown to the SCSS function when it is being compiled to CSS.

I've read things about PostCSS and the PostCSS mixin plugin being used to add mixin functionality to CSS. This might be a good choice for me.