除非您想要构建一个定制主题(在这种情况下,您应该使用SCSS),否则使用一个CSS样式文件来定义四分块输出的CSS属性就足够了
因此,在一个styles.css
文件中编写类 Select 器的css属性,并使用css
YAML键从一个Quarto文档文件中引用这个styles.css
.
style.css个
.output {
color: green;
background-color: black;
}
quarto-doc.qmd个个
---
title: "Output-style"
format:
html:
css: styles.css
---
```{r}
#| class-output: output
x = "hello quarto"
print(x)
1 + 1
```
You can add options to executable code like this
```{r}
#| class-output: output
2 * 2
```
现在,对于SCSS,要引用SCSS文件,您需要使用theme
YAML键而不是css
.
custom_style.scss个
/*-- scss:rules --*/
.output {
color: green;
background-color: black;
}
quarto-doc.qmd个个
---
title: "Output-style"
format:
html:
theme: output_style.scss
---
```{r}
#| class-output: output
x = "hello quarto"
print(x)
1 + 1
```
输出类似于上面的内容.