JupyterBook: change font size for code blocks and regular text

31 Views Asked by At

I have a fairly simple jupyterbook project whose structure looks like the image below.

I was able to control the text justification via a .css file under _static_ called myfil.css. The file looks like this:

This configuration kicks in automatically when building the project. I don't need to add anything to the _config.yml file. Though, I can't seem to be able to modify the text size and, more importantly, the text size within code blocks. I have a few different ways of defining a code block per the guidelines when using the MySt structure (see here).

So the question is: how can I explicitly control the font size of the text within code blocks? I would like this to affect both executable chunks (i.e., {code-cell} ...) and just regular blocks (i.e., ``` some code here ```). I don't want the inline code to be affected.

My intuition is that I need to add something in myfile.css but just don't know what.

0

There are 0 best solutions below