Reputation: 73
I am building own UI lib for internal use in my projects. I already have some modules ready and started using it and it make me think how can I 'expose' scss variables to be overwritten in application consuming that library. Something like what ionic is doing for its components (on each component there is list of scss variables it is using which can be overriden in apps scss.
Upvotes: 0
Views: 434
Reputation: 24406
Usualy you will start with _variables.scss , theme.scss (where you import all prtial files ) , but as advice you have to create a prtial scss file for each component like dropdown , card , button ....etc for example primeng has something like this and you may give a look to bootstrap repo.
Upvotes: 1
Reputation:
Make two files : one for configuration, one for styling.
The user will import the configuration, edit the variables, then import the styling. This would give
@import 'myLib/variables';
$color: green,
$background: yellow;
@import 'myLib/styling';
Upvotes: 2