-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Awesome library - thanks!
I'm needing to define multiple colorVariants on core colors like in the example below. As can be seen they are a light and dark variants of core colors accent and primary. These are not to be confused with a light and dark themes - they are unrelated - they are variants on the core theme colors of each theme.
When I build this I get an error Error: Variant light already exists.
I would have expected these to not clash since they are scoped uniquely. I have had a look at the source and notice that class ColorVariant does not consider the scope as part of it's uniqueness, hence the clashes.
As a workaround for now I will move the variant colors into the colors(...) definitions.
const lightTheme = new Theme()
.name('light')
.default()
.assignable()
.colors({
'on-accent': '#FFFFFF',
'accent': '#CB116E',
'on-primary': '#292929',
'primary': '#FAFAFA',
})
.colorVariant('light', '#FF569C', 'accent')
.colorVariant('dark', '#940043', 'accent')
.colorVariant('light', '#FFFFFF', 'primary')
.colorVariant('dark', '#C7C7C7', 'primary');Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request