Skip to content

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Nov 12, 2024

This fixes #11373 by adapting previous changes in #11028 and then #11237. The changes initially introduced for Brands were making code font size default being pixels, while previous is was set to em and so code font size was adapting based on context like headers.

This PR is making code font size being based on em like Quarto 1.5 while keeping the customizable values. Defaults are chosen like this

  • $code-font-size in Revealjs is em units by default which seems more coherent with its bootstrap counter part, also as em. Value is 1em for revealjs.
  • $code-block-font-size is set to 0.55em - same as previous Revealjs default, smaller than bootstrap to save some slide space.
  • $code-inline-font-size is set to 0.875em - same as bootstrap

This also simplifies previous logic with smaller context (like callout or smaller slides), and so previous adaptation from previous followed up PR are removed (and test adapted).

I believe this is closer to default RevealJS and previous Quarto 1.5 style, while keeping the $code-font-size

And it is probably better for brand for size being passed to code-font-size in same units for revealjs and bootstrap.

Quarto example has been updated with this PR

- Scale inline code font size same as bootstrap
- Scale block code font size same as previous Revealjs default, smaller than bootstrap to save some slide space
@cscheid cscheid merged commit 6676124 into main Nov 14, 2024
47 checks passed
@cscheid cscheid deleted the revealjs/inline-code-style branch November 14, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline code font size is smaller in Revealjs headers

2 participants