Skip to content

Commit a50d6bb

Browse files
authored
Merge pull request #11251 from quarto-dev/callout-styles
2 parents ea8fac3 + 30d31ac commit a50d6bb

File tree

9 files changed

+413
-75
lines changed

9 files changed

+413
-75
lines changed

news/changelog-1.6.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ All changes included in 1.6:
4444
- Update to Reveal JS 5.1.0.
4545
- Support for a [Jump To Slide](https://revealjs.com/jump-to-slide/) menu to quickly navigate between slides. Set `jump-to-slide: false` to opt out.
4646
- Support for new [Scroll View](https://revealjs.com/scroll-view/) mode with configuration through new `scroll-view` revealjs's format configuration key. A new menu tool has been added to toggle scroll view mode on and off, associated with `R` key by default.
47+
- Styles improvements for Callouts in Revealjs:
48+
- SCSS variables can be used to customize the appearance of callouts in Revealjs. The following SCSS variables are available:
49+
- Border width and scale (`$callout-border-width`, `$callout-border-scale`)
50+
- Border colors (`$callout-color-note`, `$callout-color-tip`, `$callout-color-important`, `$callout-color-caution`, `$callout-color-warning`)
51+
- Margins (`$callout-margin-top`, `$callout-margin-bottom`)
52+
- Color for each callout type is now the same as in Bootstrap document `format: html`. This allows for consistent styling across formats. If you prefer other colors, you can override using the new SCSS variables
53+
- Icon for each callout type is now using SVG like in Bootstrap document `format: html`. This allows for consistent styling across formats.
54+
- Callouts looks better in slides made smaller and when containing code blocks.
55+
- To see how callouts looks like in revealjs, see this example: <https://examples.quarto.pub/revealjs-default-callouts-styles>
4756
- Prevent empty SASS built css file to be included in header.
4857
- Remove wrong `sourceMappingUrl` entry in SASS built css.
4958
- ([#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>.

src/format/reveal/format-reveal.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ export function revealjsFormat() {
285285
metadataOverride,
286286
templateContext,
287287
[kIncludeInHeader]: [
288-
formatResourcePath("html", "styles-callout.html"),
289288
stylesFile,
290289
],
291290
html: {

src/resources/formats/html/_quarto-rules.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,12 @@ a {
438438
text-underline-offset: 3px;
439439
}
440440

441+
/* Callout styling */
442+
443+
.callout pre.sourceCode {
444+
padding-left: 0;
445+
}
446+
441447
// ansi escaping
442448
div.ansi-escaped-output {
443449
font-family: monospace;

src/resources/formats/html/bootstrap/_bootstrap-rules.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -885,11 +885,6 @@ pre.sourceCode > code.sourceCode {
885885
}
886886
}
887887

888-
// no border inside callouts
889-
.callout pre.sourceCode {
890-
padding-left: 0;
891-
}
892-
893888
div.sourceCode {
894889
overflow-y: hidden;
895890
}

0 commit comments

Comments
 (0)