Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/resources/filters/quarto-post/typst-brand-yaml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ function render_typst_brand_yaml()
end
if brandColor.foreground then
quarto.doc.include_text('in-header', '#set text(fill: brand-color.foreground)')
quarto.doc.include_text('in-header', '#set table.hline(stroke: (paint: brand-color.foreground))')
quarto.doc.include_text('in-header', '#set line(stroke: (paint: brand-color.foreground))')

end
local decl = '// theme colors at opacity ' .. BACKGROUND_OPACITY .. '\n#let brand-color-background = ' .. to_typst_dict_indent(themebk)
quarto.doc.include_text('in-header', decl)
Expand Down
35 changes: 35 additions & 0 deletions tests/docs/smoke-all/typst/brand-yaml/color/foreground-lines.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Foreground and background colors
format:
typst:
keep-typ: true
brand:
color:
foreground: "#ccd2b2"
background: "#30104f"

_quarto:
tests:
typst:
ensureTypstFileRegexMatches:
-
- '#set page\(fill: brand-color\.background\)'
- '#set text\(fill: brand-color\.foreground\)'
- 'heading-color: unescape-eval\("rgb\(\\"\\#ccd2b2\\"\)"\)'
- '#set table.hline\(stroke: \(paint: brand-color\.foreground\)\)'
- '#set line\(stroke: \(paint: brand-color\.foreground\)\)'

- []
---



| Col1 | Col2 |
|------|------|
| A | B |

------------------------------------------------------------------------

See footnote [^1]

[^1]: Here's a footnote
Loading