-
Notifications
You must be signed in to change notification settings - Fork 72
stylesheet order prevents custom css overrides #15
Copy link
Copy link
Closed
Description
The stylesheets of sphinx_tabs get appended at the very last, which makes overriding CSS styles in a custom.css impossible (or I simply don't know how).
My conf.py which includes sphinx_tabs:
extensions = [
'sphinx_tabs.tabs',
'sphinx.ext.extlinks',
'sphinx.ext.graphviz',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'alabaster',
'ablog',
'sphinxcontrib.blockdiag'
]
# [...]
# add custom css here
def setup(app):
app.add_stylesheet('css/custom.css') # may also be an URL
I try to override a sphinx_tabs style in my _static/css/custom.css:
.sphinx-tabs .sphinx-menu a.item {
color: yellow !important;
}
This doesn't override the default color, as the custom.css needs to be the last file for that in my index.html:
<link rel="stylesheet" href="../../../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/css/custom.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/sphinx_tabs/tabs.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/sphinx_tabs/semantic-ui-2.2.10/segment.min.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/sphinx_tabs/semantic-ui-2.2.10/menu.min.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/sphinx_tabs/semantic-ui-2.2.10/tab.min.css" type="text/css" />
There's a good chance that I do something wrong, any help would be appreciated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels