ProDemos / pds

ProDemos Design System
0 stars 0 forks source link

Make overrides.scss overridable in your app #21

Open commonpike opened 2 years ago

commonpike commented 2 years ago

The purpose of overrides.scss was that you could override these in your app, but since main.scss includes them, you cant override them.

f.e., you cant define an extra theme in your app.

commonpike commented 1 year ago

eg import '@pds/variables.scss' import 'myoverrides.scss' import '@pds/main.scss'

main could optionally import variables.scss if some flag does not exist

https://stackoverflow.com/questions/8512802/checking-if-a-variable-is-defined-in-sass

commonpike commented 10 months ago

Conditional imports are not suppoerted and will not be supported in node-sass.

In dart-sass, you can @use files as a mixin and call those conditionally ... https://github.com/sass/sass/issues/739#issuecomment-359100028