Skip to content

Optionally configure ONLY light and dark themes, no auto theme? #857

Closed Answered by pradyunsg
cmoliverio asked this question in Ideas
Discussion options

You must be logged in to vote
:root {
    --blue: #031db0;
    --background-color: #eaeef3;
}

[data-theme="dark"] {
    --blue: #366aca;
    --background-color: #4184ff;
}

Instead of doing this, I suggest using https://pradyunsg.me/furo/customisation/#light-css-variables-dark-css-variables for injecting the CSS variables that you want to inject.

https://github.com/pradyunsg/furo/blob/fd3e7b94e9959870aa3c8efb221de66be923421d/src/furo/assets/styles/base/_theme.sass#L6-40 shows the specifics of how things work for the CSS variables, wherein it basically duplicates the dark mode CSS declarations in a couple of spots.

Replies: 1 comment 1 reply

Comment options

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

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