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
Is your feature request related to a problem? Please describe.
Switching a theme should be as easy as swapping out one design token lib for another. The problem is that the SCSS for the auro-button element's SCSS uses tokens directly as the value per CSS property.
A proposed solution is to create a mapping from any pre-defined list of design tokens to a more generic set of values. A possible solution is to use fallback values.
While this simplifies the addition of the different themes, this also means that we need to update individual element SCSS if there are changes.
Another way to consider this is to have a single map.scss file that uses a fallback method to redefine the value of generically used tokens. It is also recommended that the mapping of these values is not contained per custom element. This should be a global resource that is subscribed to.
It is assumed that we could create this from the tokens repo.
For this issue to be closed, a user must be able to subscribe to an alternate set of design tokens and HTML custom elements within the scope of that project will change themes based on those tokens.
After discussion with @jason-capsule42, we feel as though auro-input would be a better component to use for design token value mapping. The reason behind this is that auro-button is an older component that uses the imports for Sass properties and variables to build out a CSS variable file. While auro-input directly imports the Custom CSS tokens directly onto its demo page, easily allowing for us to switch between this import and any other theming imports with simple JS.
Is your feature request related to a problem? Please describe.
Switching a theme should be as easy as swapping out one design token lib for another. The problem is that the SCSS for the auro-button element's SCSS uses tokens directly as the value per CSS property.
Describe the solution you'd like
A proposed solution is to create a mapping from any pre-defined list of design tokens to a more generic set of values. A possible solution is to use fallback values.
While this simplifies the addition of the different themes, this also means that we need to update individual element SCSS if there are changes.
Another way to consider this is to have a single map.scss file that uses a fallback method to redefine the value of generically used tokens. It is also recommended that the mapping of these values is not contained per custom element. This should be a global resource that is subscribed to.
It is assumed that we could create this from the tokens repo.
Then the SCSS would be the following.
Exit criteria
For this issue to be closed, a user must be able to subscribe to an alternate set of design tokens and HTML custom elements within the scope of that project will change themes based on those tokens.
Dependency
The text was updated successfully, but these errors were encountered: