Open mdo opened 1 year ago
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 (https://github.com/twbs/bootstrap/pull/35857#issuecomment-1282864225), second only to the "Any updates?" comment directly beneath it.
Oh, didn't notice we have an issue. Related https://github.com/twbs/bootstrap/issues/37659
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.
Any update on this aspect? It is not hard to include both mechanisms (prefers-color-scheme
and data-bs-theme
) though it obviously increases bundle size a bit. I see that the mechanism can be changed when compiling though only one of them can be selected at once, which is rather limiting. Especially considering that the whole theming mechanism is intended to make it easier to adjust color etc to one's' liking without having to compile a custom BS variant.
Can we generate the new subtle bg, subtle border, and text emphasis colors from
$theme-colors
?
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 primary
color into primary-subtle
. This is just where I had to give up on the testing, as I'm just not sure how to proceed. Hopefully the docs can resolve that, but even more hopefully there will be a way to set the subtle
colors automatically via the $theme-colors
. Otherwise it's going to be a big challenge.
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.
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.
Any update on this aspect? It is not hard to include both mechanisms (
prefers-color-scheme
anddata-bs-theme
) though it obviously increases bundle size a bit. I see that the mechanism can be changed when compiling though only one of them can be selected at once, which is rather limiting. Especially considering that the whole theming mechanism is intended to make it easier to adjust color etc to one's' liking without having to compile a custom BS variant.
Would a option like $color-mode-type: data-media-query
that bundles both and fallbacks to media if and only if there is no data-bs-theme set, be the thing we need? so no-js will respect the user settings.
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 https://github.com/twbs/bootstrap/pull/35857#discussion_r1032531543).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 https://github.com/twbs/bootstrap/pull/35857#discussion_r1027116099 and https://github.com/twbs/bootstrap/pull/35857#discussion_r1030194604)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 #36029$color-mode-type
withmedia-query
set (see https://github.com/twbs/bootstrap/issues/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 https://github.com/twbs/bootstrap/pull/35857#discussion_r1031424238)Issues
After alpha release
:root
and color mode CSS vars. Fixed by https://github.com/twbs/bootstrap/pull/37742Dark mode in the themes website?Other tasks
.text-muted
by.text-body-secondary
in v6Issues raised by contributors
$component-*-color
Sass vars having anull
value