-
I am using triple backticks in my presentation (markdown file) to define some codeblocks. I would like to change the font-size of the code displayed. I tried:
based on this Stack Overflow answer, but it does not work. The slide does not only hold codeblocks, but also an h2 and normal text. What is the selector for the code blocks in marp? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The tweaked style that you've described should be worked in Marp built-in themes. However, if you are using some customized themes and plugins, it may be using more specific selector such as When pre > code {
font-size: 100px;
} pre {
font-size: 100px !important;
} |
Beta Was this translation helpful? Give feedback.
-
Thank you for the reply! In case anybode else stumbles across it: another reason for the font size not increasing in your code blocks seems to be too long lines. If you break them, the text will be displayed with increased font size |
Beta Was this translation helpful? Give feedback.
The tweaked style that you've described should be worked in Marp built-in themes. However, if you are using some customized themes and plugins, it may be using more specific selector such as
pre > code
to set the custom font size.When
pre
selector did not work, you can try to use more specific selectorpre > code
, or!important
keyword to override the font size.