Modifying text formatting in Jupyterbooks for Sphinx Directives like admonitions

158 Views Asked by At

I know how to include my own css for a jupyterbook by creating a mine.css inside of _static.

But I would like to change the formatting of some standard features of the stock jupyterbook look and feel.

In particular, I'd like to change the formatting of text inside of admonitions but without knowing the css definitions for the stock versions I can't figure out how to do that.

I feel like if I knew the standard css definitions for Jupyterbooks, I could do a lot of customization but short of that resource I have to write my own css which seems unnecessary and redundant.

Is this available and I'm just not seeing it? Thanks...apologies if this is obvious!

Added after the original post...This is in response to comments by Steve:

This is not an answer, but a comment. But I need to show some code... So breaking the rules.

I was able to change the admonition title to sans serif by including in my own override css file:

p.admonition-title {
    margin: 0px 10px 5px 0px;
    font-weight: bold;
         font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

But body text is still problematic. It appears in the rendered html to be just whatever

is defined as. The body does not have its own css definition. For example

div.body p.centered {
    text-align: center;
    margin-top: 25px;
         font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

does not change anything,

The code inspection is

<p> == $0
stuff
</p>

So I'm not sure how to affect the font styling of the body of a stock admonition.

0

There are 0 best solutions below