Website projects ignore `$border-color` and `$border-radius` defaults because of an invalid `scss:variables` boundary in `quarto-listing.scss`
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 74/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- sass
- Domínio
- build-system
Direção de pesquisa
Leia src/core/sass.ts em torno das linhas 201–202 e inspecione src/resources/projects/website/listing/quarto-listing.scss em torno da linha 4 e das linhas 80–98. Confirme como o analisador de camadas trata o limite scss:variables e, em seguida, renderize a reprodução fornecida do site e compare o CSS dela com a saída independente. O trabalho estará concluído quando o site respeitar os valores padrão $border-color e $border-radius do tema.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
In a website project, a theme that sets $border-color or $border-radius with !default in scss:defaults has no effect.
The same theme works in a standalone document.
Colours and radii that a theme sets for borders, form controls and cards are replaced by Quarto's own values.
quarto-listing.scss starts the functions layer with a valid boundary.
A later line is /*-- scss:variables --*/, followed by variables such as $border-color: $gray-300 !default; and $border-radius: 0.25rem !default;.
The layer parser only accepts uses, functions, rules, defaults and mixins, so variables is read as a comment.
Those variables therefore stay in the functions layer.
Functions are written before all defaults, so they are set first, and the !default of a theme or user layer that comes later is ignored.
With QUARTO_SAVE_SCSS set, the saved file shows the order.
$border-color: $gray-300 !default; is at line 620, inside the 'functions' section from Quarto (lines 490 to 1036).
The theme's $border-color: #ff0000 !default; is at line 1042, under Defaults from user-defined SCSS.
#13960 reports the same kind of bad delimiter for title-block.scss, where the variables are all null !default and nothing breaks.
This file is different, because its variables shadow real theme variables.
Steps to reproduce
custom.scss:
/*-- scss:defaults --*/
$border-color: #ff0000 !default;
$border-radius: 1rem !default;
_quarto.yml of a website project:
project:
type: website
website:
title: t
format:
html:
theme: [default, custom.scss]
index.qmd is any page with a title.
For comparison, render a standalone document with the same theme: [default, custom.scss].
quarto render
grep -o -- '--bs-border-color:[^;]*' _site/site_libs/bootstrap/bootstrap-*.min.css
grep -o -- '\.form-control{[^}]*}' _site/site_libs/bootstrap/bootstrap-*.min.css | grep -o 'border-radius:[^;]*'
Actual behavior
| Output | --bs-border-color |
.form-control border-radius |
|---|---|---|
| website project | #dee2e6 |
.25rem |
| standalone document | #ff0000 |
1rem |
Rendered in a website project, the form control and the button keep Quarto's .25rem radius and the grey border:
The same theme in a standalone document:
Expected behavior
The !default values of the theme apply in a website project, as they do in a standalone document.
Your environment
- IDE: none, terminal only
- OS: macOS (Darwin 27.0.0, Apple Silicon)
Quarto check output
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.101.0: OK
Deno version 2.7.14: OK
Typst version 0.15.1: OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 69592e5c1718d3e1b2f3d11e757d32e23a16af67
- Linguagem predominante
- JavaScript
- Estrelas
- 6.1k
- Forks
- 478
- Merge médio
- 17h 58min
- PRs com merge (30d)
- 135
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de quarto-dev/quarto-cli
-
brand bug typst
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
quarto-dev/quarto-cli#15311 ·
Mantenedores costumam responder em até 1 dia
-
Notebook preview header title takes the heading colour on the primary backgroundTalvez já em andamento @SabyaXSachi assumiu há 1 dia. Abertaaccessibility bug embed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
quarto-dev/quarto-cli#15306 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bootstrap bug themes
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
quarto-dev/quarto-cli#15304 ·
Mantenedores costumam responder em até 1 dia
-
accessibility bug code-blocks html themes
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
quarto-dev/quarto-cli#15303 ·
Mantenedores costumam responder em até 1 dia
-
accessibility brand bug dark-mode
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
quarto-dev/quarto-cli#15301 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de quarto-dev/quarto-cli
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 2 dias
-
desktop v3 windows
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
esengine/DeepSeek-Reasonix#15016 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Fei2411/DeepSeek-Bot#1113 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
arfct/timezone.fyi#19 ·