Skip to content

Commit 3b7d6ec

Browse files
brand short code light dark test for #12365
this was not a pure refactor; it did introduce another parameter to the brand color shortcode at shortcode time there is no user or auther preference, this just defaults to light
1 parent f125971 commit 3b7d6ec

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

news/changelog-1.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ All changes included in 1.7:
121121
- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix `\f` (`{{< pagebreak >}}`) form feed character not valid in PowerPoint (`pptx`).
122122
- ([#11664](https://github.com/quarto-dev/quarto-cli/issues/11664)): `lipsum` shortcode is no longer randomly generated by default, use `{{< lipsum random=true >}}` to restore randomness.
123123
- ([#11379](https://github.com/quarto-dev/quarto-cli/issues/11379)): Add `version` shortcode to display the current Quarto version.
124+
- ([#12365](https://github.com/quarto-dev/quarto-cli/pull/12365)): `brand color` shortcode takes an optional `brandMode` second parameter, default `light`.
124125
- ([#12326](https://github.com/quarto-dev/quarto-cli/issues/12326)): Add `quarto.shortcode.*` API entry points for shortcode developers.
125126

126127
## Quarto Lua API
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Test brand light/dark shortcodes
3+
format: html
4+
brand:
5+
light:
6+
color:
7+
palette:
8+
blue: "#82aeef"
9+
background: '#fff8ee'
10+
foreground: '#116423'
11+
dark:
12+
color:
13+
palette:
14+
blue: "#415777"
15+
background: '#071217'
16+
foreground: '#ffeecc'
17+
_quarto:
18+
tests:
19+
html:
20+
ensureHtmlElements:
21+
-
22+
- 'div#default-brand[style="background-color: #82aeef"]'
23+
- 'div#light-brand[style="background-color: #82aeef"]'
24+
- 'div#dark-brand[style="background-color: #415777"]'
25+
- []
26+
---
27+
28+
::: {#default-brand style='background-color: {{< brand color blue >}}'}
29+
Default brand blue background.
30+
:::
31+
32+
::: {#light-brand style='background-color: {{< brand color blue light >}}'}
33+
Light brand blue background.
34+
:::
35+
36+
::: {#dark-brand style='background-color: {{< brand color blue dark >}}'}
37+
Dark brand blue background.
38+
:::

0 commit comments

Comments
 (0)