-
Notifications
You must be signed in to change notification settings - Fork 365
Description
Bug description
I am getting the following erros after compiling a Reveal presentation:
Error adding css vars block Error: Expecting punctuation: "}" (2828:53)
at InputStream.err (file:///opt/quarto/bin/quarto.js:48871:15)
at Object.err (file:///opt/quarto/bin/quarto.js:48890:23)
at TokenStream.err (file:///opt/quarto/bin/quarto.js:48960:27)
at Object.err (file:///opt/quarto/bin/quarto.js:49127:22)
at Parser.skip_type (file:///opt/quarto/bin/quarto.js:49185:25)
at Parser.skip_punctuation (file:///opt/quarto/bin/quarto.js:49189:21)
at Parser.parse_block (file:///opt/quarto/bin/quarto.js:49376:31)
at Parser.parse_rule (file:///opt/quarto/bin/quarto.js:49451:28)
at Parser.parse_node (file:///opt/quarto/bin/quarto.js:49271:59)
at Parser.parse_stylesheet (file:///opt/quarto/bin/quarto.js:49203:31)
The resulting CSS file will not have SCSS color variables exported as CSS.
This is likely a Quarto bug.
Please consider reporting it at https://github.com/quarto-dev/quarto-cli,
along with the _quarto_internal_scss_error.scss file that can be found in the current working directory.
Steps to reproduce
My CSS tweaks are in a file `personal.scss` such this.
/*-- scss:defaults --*/
@import url("https://fonts.googleapis.com/css?family=Montserrat:300,300italic,900,900italic");
$main-color: #eb2429;
$highlight-color: #eb2429;
$light-bg-text-color: #ffffff;
$font-family-sans-serif: "Montserrat", "Source Sans Pro", Helvetica, sans-serif;
$presentation-heading-font: "Montserrat", sans-serif !default;
$presentation-font-size-root: 42px;
$presentation-font-smaller: 80%;
$presentation-line-height: 1.3;
$link-color: $main-color;
$presentation-heading-color: $main-color;
$presentation-heading-line-height: 1.1;
$presentation-heading-font-weight: 700;
$presentation-block-margin: 20px;
$presentation-slide-text-align: left;
$presentation-title-slide-text-align: left;
$light-bg-link-color: $main-color;
$dark-bg-link-color: $main-color;
/-- scss:rules --/
.left-column {
display: inline-block;
overflow-x: initial;
vertical-align: top;
width: 48%;
padding-right: 2%;
}
.right-column {
display: inline-block;
overflow-x: initial;
vertical-align: top;
width: 48%;
padding-left: 2%;
}
.cell-output-display {
overflow-y: hidden !important;
}
.boxed {
border-width:4px;
border-style:solid;
border-color:$main-color;
padding: 2.5% 5% 5%;
border-radius: 15px;
overflow: hidden;
margin-top: 0.6em;
margin-bottom: 0.6em;
}
.badge {
display: inline-block;
padding: .25em .4em;
font-size: 75%;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: text-bottom;
padding-right: .6em;
padding-left: .6em;
border-radius: 10rem;
color: $dark-bg-text-color !important;
background-color: $main-color;
a {
color: $dark-bg-text-color !important;
}
}
.badge.fwd::after {
content: "\25B6";
display: inline-block;
margin-left: 0.5em;
font-size: 60%;
vertical-align: middle;
margin-bottom: 0.2em;
}
.badge.bwd::before {
content: "\25C0";
display: inline-block;
margin-right: 0.5em;
font-size: 60%;
vertical-align: middle;
margin-bottom: 0.2em;
}
.badge:hover {
background-color: mix($main-color, white, 70%)
}
figcaption {
text-align: center;
font-size: 60% !important;
}
pre {
font-size: 0.7em !important;
line-height: 1.5 !important;
}
ol ol {
list-style-type: lower-alpha !important;
}
ol ol ol {
list-style-type: lower-roman !important;
}
ul ul, ol ol {
margin-block-start: -0.2em !important;
font-size: 90% !important;
}
ul ul ul, ol ol ol {
margin-block-start: -0.2em !important;
font-size: 80% !important;
}
ul li, ol li {
padding-top: 0.3em;
margin-left: 0.5em;
}
ul ul li, ol ol li {
padding-top: 0.2em;
margin-left: 0.5em;
}
ul ul ul li, ol ol ol li {
padding-top: 0.1em;
margin-left: 0.5em;
}
li::marker {
font-variant-numeric: normal !important;
color: $main-color;
font-weight: 600;
}
aside {
font-size: 60%;
}
.aside-footnotes > li::marker {
font-weight: normal !important;
color: inherit !important;
}
.aside-footnotes > ul li, ol li, p {
padding-top: 0em !important;
margin-bottom: -0.5em !important;
}
strong {
color: $main-color;
font-size: 110%;
}
del {
text-decoration: none;
font-style: italic;
border-bottom: 4px solid;
border-bottom-color: $highlight-color;
}
figcaption {
color: lighten($body-color,20%);
}
h2, p {
padding-bottom: 0.5em;
}
h3 {
margin-top: -1.3em !important;
padding-bottom: 0.5em;
font-weight: normal!important;
font-style: italic;
font-size: 1em!important;
line-height: 1.2!important;
}
blockquote {
font-size: 80%;
}
img {
margin: 0 !important;
max-width: 100% !important;
max-height: 100% !important;;
}
#title-slide {
color: white;
.title {
font-size: 2.2em;
padding-top: 3.0em;
text-align: left;
line-height: 1.1 !important;
color: white;
}
.subtitle {
font-size: 1.5em;
font-weight: bold;
text-align: left;
line-height: 1.1 !important;
margin-top: 0px !important;
margin-bottom: 0.5em !important;
}
.quarto-title-authors {
text-align: left;
justify-content: left !important;
font-size: 1em;
line-height: 1.1 !important;
}
.quarto-title-author {
padding-left: 0 !important;
padding-right: 0 !important;
}
.date{
text-align: left;
margin-top: 0.8em;
line-height: 1.1 !important;
}
}
.slide-number, .footer {
font-family: $font-family-sans-serif !important;
color: $main-color !important;
}
.slide-logo {
max-height: 7.5% !important;
}
.csl-entry {
text-indent: -4em;
margin-left: 3em;
margin-top: 0.6em;
}
.hanged {
text-indent: -3em;
margin-left: 3em;
color: #555;
}
.small {
font-size: 80%;
}
The error may be reproduced with a simple document such as:
---
title: "My Fancy Title"
author: "I, me, myself"
date: ""
format:
revealjs:
theme: [default, personal.scss]
---
## Hello World
Hi
Expected behavior
I would expect a no error compilation.
Actual behavior
What I've described above: an error in the compilation log and a scss
file generated.
Your environment
- IDE: VScode 1.96.0
- OS: Pop!_OS 22.04 LTS, 64-bit
Quarto check output
Quarto 1.6.39
[✓] Checking environment information...
Quarto cache location: /home/ric/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.39
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/local/texlive/2024/bin/x86_64-linux
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.12
Path: /usr/bin/python3
Jupyter: 5.7.2
Kernels: python3, ir
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.4.2
Path: /usr/lib/R
LibPaths:
- /home/ric/R/x86_64-pc-linux-gnu-library/4.4
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.49
rmarkdown: 2.29
[✓] Checking Knitr engine render......OK