Open ghost opened 7 years ago
Hi @Omnia-Code Do you mean v2 dev branch?
Yes, I talking about the v2 dev branch, sorry I wasn't clear. The v1 uses plain SASS. By the way, the custom CSS properties feature is a experimental technology. Therefore I would be careful using it.
@Omnia-Code this is a great question, I'll try to give a detailed response soon )
@Omnia-Code ok finally got some time to respond, sorry for the delay.
The reason for src/_theme/variables.js
and src/_theme/theme.js
is because in some component JS files we need to refer to theme's variables: mostly colors. So variables.js is kind of single source of truth for the theme. variables.js are also injected into SASS variables.scss files in SASS format.
This is mostly for theme demo on-the fly customization without the need to precompile different variations. So in most of browsers you can customize the theme on the fly just by changing CSS properties. For the browsers that don't support css custom properties (Hello IE :) ) there is a fallback.
CSS properties can be omitted for real production use.
Could you please explain the benefits and why there is a "theme compiler" (theme.js etc.)? In my opinion only using SASS would make more sense because: