Is there a way to change the line-height of code blocks using local styles? #1501
-
I set the global style for code block like bellow. :root {
--slidev-code-font-size: 20px;
--slidev-code-line-height: 28px;
} But sometimes I write long code block. ```
// very loooong code...
```
<style>
/* #1 -> x */
code {
font-size: 12px;
line-height: 18px;
}
/* #2 -> x */
.slidev-code {
line-height: 18px;
}
/* #3 -> x */
:root {
--slidev-code-line-height: 18px;
}
</style> Anyone know the way to change the line-height of code blocks using local styles? |
Beta Was this translation helpful? Give feedback.
Answered by
KermanX
Apr 6, 2024
Replies: 1 comment 1 reply
-
Try ```ts {*}{class:'!children:leading-16'}
I have larger line-height
``` |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mikanIchinose
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try