OER-WEB-TEAM / design-system--drupal-theme

1 stars 0 forks source link

Support for Light/Dark Color Mode #3

Open AlexVanK opened 6 months ago

AlexVanK commented 6 months ago

Bootstrap 5.3 now supports out-of-the-box color mode: light vs dark. https://getbootstrap.com/docs/5.3/customize/color-modes/

Support for both color modes is enabled by default, and each color on the color scheme has a corresponding version for the dark theme.

This considerably bloatens the CSS for those who do not need such functionality. In theory you should be able to disable color mode in SCSS with $enable-dark-mode: false !default;. https://getbootstrap.com/docs/5.3/customize/color-modes/#building-with-sass This is ‼️ BUGGY ‼️ - upon recompiling nothing seems to change - investigate Bootstrap 5.3 repository for related issue/tickets.


Missing to get this to work on NIHOD:


Considerations:

Light vs Dark mode is not as straight forward as it may seem. For the color scheme to work properly, the website MUST be built leveraging bootstrap utilities/variables in it's entirety.

The following will not be affected by the color swith: