-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking: Color modes #37549
Comments
Another TODO I would like to add is that this should work without JS (which at least the preview in the PR does not). For the sake of accessibility and js-less users, it should default to respecting the system preferences. Thus, in its current form, the implementation also does not resolve #27514. I would like to point out that this is the most upvoted comment in the PR (#35857 (comment)), second only to the "Any updates?" comment directly beneath it. |
This comment was marked as outdated.
This comment was marked as outdated.
Any update on this aspect? It is not hard to include both mechanisms ( |
This would be really valuable, for me. This is where I got very confused/lost. I have seen this PR here, but that seems to be focused on adding a custom color, and not on how to adapt the |
I suggest classes "bg-light" and "bg-dark" get automatically swapped with the light/dark color mode toggle. Thank you for this great feature. |
It should be noted that the examples actually do not include full source, as it's missing javascript files. |
Would a option like |
Calling out some outstanding todos and questions from #35857 as we'll merge that PR and tackle these things in smaller batches.
General todos
$theme-colors
? This has been improved with CSS variables being generated from new maps. No way to generate new Sass variables from a map though.Do we provide hex colors,No, not in this version.rgba()
colors, or both for the new variables?css-variables.md
$theme-colors
(alerts and list groups) so Customize > Sass > Add to map isn't completely true anymore?SplitI think for now, we leave as-is. Let's let this back while we get onto v6 where we can revamp.:root
,[data-bs-*
rules? (see Add dark mode support #35857 (comment)).dropdown-menu-dark
? If so, mention in Migrationmove icons into HTML as SVGs as well? similar to navbars if soRefactor new bg, border, and text utilities to useSkipping in v5.rgba()
values? TBD on this, would change a lot (+ see Add dark mode support #35857 (comment) and Add dark mode support #35857 (comment))calc()
function in the comparison on L78? (see https://github.com/twbs/bootstrap/pull/35857/files#r1020883939)Third slide in dark mode, difficult to distinguish the normal color and the hovered one`This is the same colors as in default/light mode, so if we want to redo these, let's redo them all over. Saving for another time.Add something to automatically testAlready tackled by Add SCSS testing of the utilities API #36029$color-mode-type
withmedia-query
set (see Setting $color-mode-type to media-query (rather than data) causes a Sass compilation erro #37673)$tooltip-color: var(--#{$prefix}body-bg)
and$tooltip-bg: var(--#{$prefix}emphasis-color)
since we use a background color to define the color of tooltips, and a text color to define the background of tooltips.Q&A
Docs todos
/examples
?bootstrap-grid.scss
file by not importing all of_root.scss
?variables-dark
as well incolor.md
,api.md
andcustomize.html
$*-text
,$*-bg-subtle
and$*-border-subtle
(see Add dark mode support #35857 (comment))Issues
After alpha release
:root
and color mode CSS vars. Fixed by Fix CSS variables mentioned in our docs #37742Dark mode in the themes website?Other tasks
.text-muted
by.text-body-secondary
in v6Issues raised by contributors
btn-outline-dark
is not visible in button group component #37753navbar-dark
withdata-bs-theme
breaks toggler icon color #37754$component-*-color
Sass vars having anull
value--bs-emphasis-color
set value #37809prefers-color-scheme
in @media for automatically rendering the client's preferred colour scheme #37973The text was updated successfully, but these errors were encountered: