Skip to content

Dark mode #309

Answered by vovayatsyuk
apedicdev asked this question in 1. Help
Aug 2, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Breeze Blank has dark theme support when the visitor setting is set to a prefer-dark color scheme. You can use it together with @media-dark hack to get the dark theme for all visitors:

@respect-color-scheme: true;
// Trick to enable dark scheme for all visitors:
@media-dark: ~"(prefers-color-scheme: light), (prefers-color-scheme: dark)";
View result

As you can see from the source code dark colors defined as CSS properties, so you can achieve the same effect without (prefers-color-scheme: light), (prefers-color-scheme: dark) trick:

@base__text-color: @white
@base__background-color: @black;
// put other color variables here...

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@apedicdev
Comment options

Answer selected by apedicdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants