`title-block.scss` has bad layer delimiters
@cscheid is already working on this.
Since Jan 26, 2026.
Assessment
This issue has not been assessed yet.
Description
The hungry ghost spotted this problem while I was working on the Rust port:
⏺ The title block styles are now included in the compiled CSS.
Now let me explain the TS Quarto bug I found regarding the layer boundary parsing:
TS Quarto Layer Parsing Bug
I discovered that the title-block.scss file uses layer boundary markers that don't match TS Quarto's own regex:
The File Content (title-block.scss)
/*-- scss: functions --*/ ← Line 1: space AFTER colon
@function bannerColor() { ... }
/*-- scss:variables --*/ ← Line 32: "variables" not a valid name
$title-banner-color: null !default;
/*-- scss:rules --*/ ← Line 37: VALID marker
.quarto-title-banner { ... }
TS Quarto's Regex
"^\/\\*\\-\\-[ \\t]*scss:(uses|functions|rules|defaults|mixins)[ \\t]*\\-\\-\\*\\/$"
This regex has two requirements that title-block.scss violates:
1. No space after colon: The regex is scss:(...) with no whitespace between : and the layer name. But line 1 has scss: functions (with a space).
2. Only 5 valid layer names: uses|functions|rules|defaults|mixins. But line 32 uses variables, which isn't in this list.
The Result
In TS Quarto, when parsing title-block.scss:
- Line 1 (/*-- scss: functions --*/) does NOT match
- Line 32 (/*-- scss:variables --*/) does NOT match
- Line 37 (/*-- scss:rules --*/) DOES match
So all content before line 37 (the functions AND variables) gets dumped into the defaults section (the initial accumulator). Only the /*-- scss:rules --*/
marker is recognized.
Why It "Works"
The SCSS still compiles because:
- Functions in defaults aren't ideal but work (SCSS is permissive about order within the assembled string)
- Variables in defaults is actually where they should be (!default variables)
- Rules get correctly separated
But this means the layer separation is not working as intended - the functions should be in the functions section so they appear before the defaults in the
final assembled SCSS.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/quarto-cli
-
binder bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
quarto-dev/quarto-cli#14907 · 3 comments ·
-
brand bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them Openengines-jupyter enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14850 · 2 comments ·
All issues in quarto-dev/quarto-cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
ecosystem wording
Difficulty 1/5 Under an hour Newbie friendliness 90/100
matrix-org/matrix.org#3649 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·