Reputation: 541
I'm creating documentation in Python with the Sphinx default theme agogo
.
I would like to use the topic
directive to put a box around important information but agogo's CSS doesn't have a border in it's default CSS. I have the CSS to create the border created, but how to I include/override the old version of agogo's topic
to use my version instead.
I want to be able to generate the docs without changing the CSS manually every time. I researched a bit about using custom CSS with Sphinx but nothing seems to mention overriding an existing class.
Upvotes: 3
Views: 1677
Reputation: 50947
Here we (ago)go:
Create a file called custom.css in the _static
subdirectory of the Sphinx project.
In custom.css, add @import 'agogo.css';
and your own custom CSS code.
Add html_style = 'custom.css'
to conf.py (documentation).
Upvotes: 6