Skip to content

css style :pre { white-space: pre-wrap; } cease to be effective! #321

Answered by yhatt
yxj1010 asked this question in Q&A
Discussion options

You must be logged in to vote

<pre> tags rendered by Marp Core's built-in themes are enabled auto-scaling instead of text wrapping.
https://github.com/marp-team/marp-core/tree/main/themes#auto-scaling-flags

You have to use a custom theme if you want to disable auto-scaling and apply white-space: pre-wrap to <pre>. Exclude code from the scaling targets by using @auto-scaling metadata.

/* @theme custom-theme */
/* @auto-scaling fittingHeader,math */

@import 'default';

pre {
  white-space: pre-wrap;
}

Related

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yhatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants