I tried every solution i found but none of it works. Maybe cause of differences in Python 2 or 3, and/or older Sphinx version. This is what I have:
- A Sphinx project with a seperated build and source directory
- A file called custom.css which I placed in source/_static. Content:
.blue {
parent: bodytext;
textColor: blue;
}
I've edited my conf.py and added
html_css_files = ['custom.css']belowhtml_static_path = ['_static']I've added
.. role:: blueat the top of my *.rst document.I've edited the file itself and wrote: This is a sentence with a :blue:`blue` word.
When I render my project the html source code contains: This is a sentence with a <span class="blue">blue</span> word.
All good except the fact the word isn't blue at all. It has the same color as the rest.
What am I missing?
custom.cssget copied over to the build directory? Do you see any 404s for that file in your browser's developer tools? - Steve Piercy