Skip to content

Commit 20a7a6d

Browse files
committed
revealjs - add style for <kbd> in Revealjs format
1 parent 6173a70 commit 20a7a6d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

news/changelog-1.6.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ All changes included in 1.6:
1919
- Remove wrong `sourceMappingUrl` entry in SASS built css.
2020
- ([#7715](https://github.com/quarto-dev/quarto-cli/issues/7715)): Revealjs don't support anymore special Pandoc syntax making BulletList in Blockquotes become incremental list. This was confusing and unexpected behavior. Supported syntax for incremental list is documented at <https://quarto.org/docs/presentations/revealjs/#incremental-lists>.
2121
- ([#9742](https://github.com/quarto-dev/quarto-cli/issues/9742)): Links to cross-referenced images correctly works.
22+
- ([#6012](https://github.com/quarto-dev/quarto-cli/issues/6012)): Add styling for `kbd` element in Revealjs slides.
2223

2324
## `typst` Format
2425

src/resources/formats/revealjs/quarto.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ $overlayElementFgColor: 0, 0, 0 !default;
156156

157157
// -- END setting.scss --
158158

159+
// KBD variables
160+
$kbd-padding-y: 0.4rem !default;
161+
$kbd-padding-x: 0.4rem !default;
162+
$kbd-font-size: $presentation-font-size-root !default;
163+
$kbd-color: $body-color !default;
164+
$kbd-bg: $body-bg !default;
165+
159166
/*-- scss:functions --*/
160167

161168
@function colorToRGB($color) {
@@ -738,3 +745,16 @@ div.cell-output-display div.pagedtable-wrapper table.table {
738745
.reveal .scrollable ol li:first-child:nth-last-child(n + 10) ~ li {
739746
margin-left: 1em;
740747
}
748+
749+
/* kbd rules */
750+
751+
kbd {
752+
font-family: $font-family-monospace;
753+
font-size: $kbd-font-size;
754+
color: $kbd-color;
755+
background-color: $kbd-bg;
756+
border: 1px solid;
757+
border-color: $code-block-border-color;
758+
border-radius: 5px;
759+
padding: $kbd-padding-y $kbd-padding-x;
760+
}

0 commit comments

Comments
 (0)