How do I use _brand.yml
in styles.css
for light/dark mode?
#13365
-
DescriptionI am trying to use I have made a minimal repository where I tried to make it work here. In .table {
background-color: var(--brand-danger);
} I have separate color:
palette:
white: "#FFFFFF"
grey: "#606060"
danger: white and color:
palette:
white: "#FFFFFF"
grey: "#606060"
danger: grey And format:
html:
theme:
light: [cosmo, brand/light.yml]
dark: [cosmo, brand/dark.yml]
css: styles.css
toc: true or including them under brand:
light: brand/light.yml
dark: brand/dark.yml Is this even possible, or am I missing something? It's worth mentioning that it seems that the files are being picked up, as I can set I am using the Quarto pre-release version: quarto --version
1.8.24 And am on MacOS Sequoia 15.6. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Thanks for the message! Two things. First, you're experiencing one of the weak points in Quarto's tooling: the relative lack of visibility into our CSS/SCSS. We're planning on adding some tooling, but it will be a while until it's ready for consumption. Second, the brand spec says:
Emphasis on "for each color in the palette". |
Beta Was this translation helpful? Give feedback.
Give your palette semantic names, and then use them. ("main" instead of "white", and then make "main" be "white" or "black" depending on brand.)