Scheme Utility Classes
By default, widgets that implement Manifold CSS variables derive a "light" or "dark" mode according to the user's colour scheme preferences. Two additional utility classes are provided to easily enforce and switch between "light" and "dark" schemes.
The .manifold-scheme-light
and .manifold-scheme-dark
utility classes allow developers to quickly and easily change their widget's styling depending on the specific color scheme they are using. These classes work in conjunction with the Manifold CSS variables to provide a way to switch between different themes without having to manually adjust each element's styling. When assigned to the :root
selector, these classes will override the default color scheme of the page and apply the appropriate colors based on the chosen color scheme. This enables easy manipulation of colors and other styling elements, while also ensuring that the page looks consistent regardless of the end-user's colour scheme preference.
.manifold-scheme-light
and .manifold-scheme-dark
may also be applied directly to the HTML element with the data-widget
attribute. In such a case, the widget will take on the specified colour scheme without the rest of the page being affected.
It is suggested to place these utility classes on the root html
tag when using layout widgets (Marketplace, Campaign).
Light Scheme Defaults
Dark Scheme Defaults
Additional Readings
Last updated