-
I have some custom css which is different for the dark mode. How do I activate them when switching to dark theme. In pervious version of the theme I had something like [data-dark-mode] body {
background: $body-bg-dark;
color: $body-color-dark;
}
[data-dark-mode] body a {
color: $link-color-dark;
} |
Beta Was this translation helpful? Give feedback.
Answered by
h-enk
Oct 6, 2024
Replies: 1 comment 1 reply
-
Use the Bootstrap Sass mixin // Put your custom SCSS code here
h1 {
background-color: yellow;
}
@include color-mode(dark) {
h1 {
background-color: lime;
}
} See also the Boostrap docs: Building with Sass |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
papanito
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use the Bootstrap Sass mixin
color-mode()
. For example:See also the Boostrap docs: Building with Sass