Is your feature request related to a problem? Please describe.
When we want to nest our design system web components, the parent component colors (background, border, icons, etc.) do not take effect on child components. This forces the user of the design system to explicitly style the child component to match and contrast the parent component.
See CityOfDetroit/detroitmi#1167 as an example where a workaround is needed to make a button standout when nested within a card.
Describe the solution you'd like
Implement themes (i.e. color modes) for various styles of components. Themes / color modes override CSS variables (background, border, icons, etc.) to encapsulate colors that are consistent with one another. These variables bleed through the shadow DOM so they will also take effect on child components.
Work necessary to properly support themes / color modes in design system:
[ ] Customize bootstrap to include custom color modes for the city design system. Options to implement: light (white as primary color), dark (city green as primary color), highlight (accent yellow as primary color).
[ ] Update complex components to support setting themes. E.g., see #124 where setting a single theme can replace usage of various classes to colorize the navbars.
[ ] Remove custom attributes on complex components (e.g. data-background-color) currently used to colorize components. If users of the components would like to override specific colors (like background) they can use data-extra-classes and typical bootstrap classes to set those.
Describe alternatives you've considered
Alternatives considered:
Allow the user of the design-system to explicitly set the borders in these scenarios. Cons: the user may forget, it takes more effort to use the components.
Parent components communicate their background color to child components via Javascript, then child component styling is responsible for setting the sensible default colors (borders, background, text). Cons: implementation via Javascript is less desirable than implementation purely via stylesheets per Bootstrap approach.
Is your feature request related to a problem? Please describe.
When we want to nest our design system web components, the parent component colors (background, border, icons, etc.) do not take effect on child components. This forces the user of the design system to explicitly style the child component to match and contrast the parent component.
See CityOfDetroit/detroitmi#1167 as an example where a workaround is needed to make a button standout when nested within a card.
Describe the solution you'd like
Implement themes (i.e. color modes) for various styles of components. Themes / color modes override CSS variables (background, border, icons, etc.) to encapsulate colors that are consistent with one another. These variables bleed through the shadow DOM so they will also take effect on child components.
Work necessary to properly support themes / color modes in design system:
light
(white as primary color),dark
(city green as primary color),highlight
(accent yellow as primary color).data-background-color
) currently used to colorize components. If users of the components would like to override specific colors (like background) they can usedata-extra-classes
and typical bootstrap classes to set those.Describe alternatives you've considered
Alternatives considered:
Pseudocode example:
Additional context Add any other context or screenshots about the feature request here.