Description
This PR adds the color mode JS in the example layout. It also replaces .bg-light
by .bg-body-tertiary
to fix some color issues; but more tweaks should be added to really fix the other issues.
Motivation & Context
Users should be able to access the examples in dark mode as well. This is a prototype to see how it would be if we just take into account the current color mode of the docs to display our examples. Another option would be to change it on the fly within the example OR to provide a light/dark button in the list of examples to display specifically one of them.
@mdo I'm not sure in which direction to go yet so your thoughts will be very important here :) IMHO it could be a first version before having something more complicated, but it'll "force us" to fix all the tiny issues in the examples in dark mode.
Another question here, do we need to mention in the migration guide that the markups (at least) have changed. Could be useful for people using the previous one as is and deciding to use the new dark mode.
Type of changes
- New feature (non-breaking change which adds functionality)
Checklist
-
I have read the contributing guidelines -
My code follows the code style of the project (using npm run lint
) -
My change introduces changes to the documentation -
I have updated the documentation accordingly -
All new and existing tests passed