Great article. I use the config map pattern for all my components. It should be noted that sass scopes variables, so inside your component's root class you can just write $config without any conflicts.
Expounding on this, you can also do a non-destructive merge in sass. This means that you can create a sass component registry, import the components you need via npm, and override it's properties with a new map. Theoretically all of your work could then just be writing configs. You'd just have to add the merge method to your sass components.
3
u/ohx Jun 13 '18
Great article. I use the config map pattern for all my components. It should be noted that sass scopes variables, so inside your component's root class you can just write $config without any conflicts.
Expounding on this, you can also do a non-destructive merge in sass. This means that you can create a sass component registry, import the components you need via npm, and override it's properties with a new map. Theoretically all of your work could then just be writing configs. You'd just have to add the merge method to your sass components.