Brand palette colours reach Bootstrap colour variables only when `defaults.bootstrap` is set
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 57/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- sass, typescript, yaml
- Ambito
- build-system, design
Direzione di ricerca
Start in src/core/sass/brand.ts, especially brandBootstrapSassLayers and brandDefaultsBootstrapLayer; compare how light and dark brand data add the palette mapping. Reproduce with the _brand.yml examples and render index.qmd with quarto render. Done when palette colors reach Bootstrap variables without a defaults.bootstrap block and the precedence of an explicit Bootstrap default is resolved.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When a color.palette name matches a Bootstrap colour (blue, red, green and the others), #11108 sets the Bootstrap variable to the brand colour, so $blue takes color.palette.blue.
That only happens when the brand also has a defaults.bootstrap block.
With a palette alone, $brand-blue is set but $blue keeps the Bootstrap value.
Anything built on $blue, such as $callout-color-note, then ignores the brand.
The cause is in brandBootstrapSassLayers in src/core/sass/brand.ts.
The palette mapping lives in brandDefaultsBootstrapLayer, and that layer is only added under if (brand?.light?.data?.defaults?.bootstrap) (and the same for dark).
The PR describes the mapping with no such condition, so this looks unintended.
There's a second, smaller point in the same layer.
When both color.palette.blue and defaults.bootstrap.defaults.blue are set, the palette wins.
I'd have expected the explicit Bootstrap default to take precedence.
If the current order is by design, it would help to document it.
Related: #11108, #14092.
Steps to reproduce
_brand.yml:
color:
palette:
blue: "#ff00aa"
index.qmd:
---
title: Brand palette
format: html
---
::: {.callout-note}
A note.
:::
Render with quarto render index.qmd, then look at the generated Bootstrap CSS.
Next, add any unrelated key under defaults.bootstrap and render again:
color:
palette:
blue: "#ff00aa"
defaults:
bootstrap:
defaults:
enable-shadows: false
Actual behavior
With the palette only:
--bs-blue: #0d6efd
--brand-blue: #ff00aa
div.callout-note.callout{border-left-color:#0d6efd}
With the unrelated defaults.bootstrap key added:
--bs-blue: #ff00aa
--brand-blue: #ff00aa
div.callout-note.callout{border-left-color:#f0a}
With defaults.bootstrap.defaults.blue: "#00aa00" as well, --bs-blue is still #ff00aa.
Expected behavior
$blue (and so --bs-blue and the note callout) takes color.palette.blue whether or not the brand has a defaults.bootstrap block.
Your environment
- OS: macOS 27.2.
Quarto check output
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.107.1: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 089ba530b3ed4ec156a355d41b6b7de2db3e44ea
- Lingua principale
- JavaScript
- Stelle
- 6.2k
- Fork
- 482
- Merge medio
- 17h 46m
- PR unite (30g)
- 135
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di quarto-dev/quarto-cli
-
Listing category filter and URL hash disagree after Back, or with `&`, `=` or `%` in a categoryApertabug listings
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
quarto-dev/quarto-cli#15340 ·
I maintainer di solito rispondono entro 1 giorno
-
brand bug typst
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/quarto-cli#15311 ·
I maintainer di solito rispondono entro 1 giorno
-
Notebook preview header title takes the heading colour on the primary backgroundForse già presa @SabyaXSachi l’ha presa 5 giorni fa. Apertaaccessibility bug embed
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
quarto-dev/quarto-cli#15306 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bootstrap bug themes
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
quarto-dev/quarto-cli#15304 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility bug code-blocks html themes
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/quarto-cli#15303 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quarto-dev/quarto-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
0. Needs triage bug feature: api
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
agent-os ai bug good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area: documentation good first issue package: rule-data status: accepting prs
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
mastra-ai/mastra#30109 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno