You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a suggestion of enhancement of ToStyleSheetTheme: concatenation of themes
Example
I have a Theme specialize in Buttons and i have a Theme specialize in Lists. I want a Theme specialized in Buttons and Lists.
Currently i should create a new theme class and add manually the style rules and the tokens for the Buttons and the style rules and the tokens for the Lists.
With concatenation: I concatenate the theme Buttons and the theme Lists in a variable.
I create application A with my main theme and a specialized theme for application A.
I create application B with my main theme and a specialized theme for application B.
If i update my main theme, the applicaiton A and application B will be updated since they have a the same main theme.
managing simplier theme classes
We could imagine having a theme composed of the theme Buttons, the theme Lists, the theme Panel, the theme Header, ...
We have multiple small themes inside the main theme.
I personnaly think smaller classes will be easier to understand and modify.
common tokens between multiple theme.
The concatenation will combine the styleRules collection but also the theme tokens.
The last Theme in the concatenation will have the priority to modify the value of a token.
We could use this property to update the default value of a concatenated theme.
The last theme we concatenate contains the default tokens values, like for example the primary color.
Hello,
I have a suggestion of enhancement of ToStyleSheetTheme: concatenation of themes
Example
I have a Theme specialize in Buttons and i have a Theme specialize in Lists. I want a Theme specialized in Buttons and Lists.
Currently i should create a new theme class and add manually the style rules and the tokens for the Buttons and the style rules and the tokens for the Lists.
With concatenation: I concatenate the theme Buttons and the theme Lists in a variable.
Use cases
multiple applications with small modifications.
I create application A with my main theme and a specialized theme for application A.
I create application B with my main theme and a specialized theme for application B.
If i update my main theme, the applicaiton A and application B will be updated since they have a the same main theme.
managing simplier theme classes
We could imagine having a theme composed of the theme Buttons, the theme Lists, the theme Panel, the theme Header, ...
We have multiple small themes inside the main theme.
I personnaly think smaller classes will be easier to understand and modify.
common tokens between multiple theme.
The concatenation will combine the styleRules collection but also the theme tokens.
The last Theme in the concatenation will have the priority to modify the value of a token.
We could use this property to update the default value of a concatenated theme.
The last theme we concatenate contains the default tokens values, like for example the primary color.
What do you think of this idea ?
The text was updated successfully, but these errors were encountered: