You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mixincolor-scheme($name) {
@media (prefers-color-scheme: #{$name}) {
@content;
}
}
.custom-element {
@includecolor-scheme(dark) {
// Insert dark mode styles here
}
@includecolor-scheme(custom-named-scheme) {
// Insert custom color scheme styles here
}
}
Using custom-named-scheme compiles to @media(prefers-color-scheme: custom-named-scheme) { } but schemes with custom names aren't supported by prefers-color-scheme.
Reduced test cases
n/a
What operating system(s) are you seeing the problem on?
Windows, macOS, Android, iOS, Linux
What browser(s) are you seeing the problem on?
Chrome, Safari, Firefox, Microsoft Edge, Opera
What version of Bootstrap are you using?
v.5.3.2
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue @Stan-Stani
You're right, Media Queries Level 5 mentions that the values are either light or dark.
However, it's also mentioned the following making our color-scheme rather generic enough for the future:
The values for this feature might be expanded in the future (to express a more active preference for light color schemes, or preferences for other types of color schemes like "sepia").
#39417 suggests fixing the description which is wrong in the sense that custom-named-scheme is not custom at all but limited to light and dark values, and will probably limited to fixed values in the future as well (not custom).
Prerequisites
Describe the issue
https://github.com/twbs/bootstrap/blob/v5.3.2/site/content/docs/5.3/customize/sass.md#color-schemes
Using custom-named-scheme compiles to @media(prefers-color-scheme: custom-named-scheme) { } but schemes with custom names aren't supported by prefers-color-scheme.
Reduced test cases
n/a
What operating system(s) are you seeing the problem on?
Windows, macOS, Android, iOS, Linux
What browser(s) are you seeing the problem on?
Chrome, Safari, Firefox, Microsoft Edge, Opera
What version of Bootstrap are you using?
v.5.3.2
The text was updated successfully, but these errors were encountered: