-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stylesheet order prevents custom css overrides #15
Comments
sphinx-tabs was adding its stylesheets (and JS) at the end of the list of files when the context gets created. I've changed it to prepend them instead so they come before any custom ones. Should fix your issue. I'm pushing a new version to pypi now. |
I may have a wrong expectation about how the overriding of CSS should work. This post here let's me assume that I should use my own custom templates to override CSS and JS: https://stackoverflow.com/questions/32079200/how-do-i-set-up-custom-styles-for-restructuredtext-sphinx-readthedocs-etc#32079202 |
The javascript doesn't get correctly loaded which makes a switch of tabs impossible. See this issue: executablebooks/sphinx-tabs#15
Ooops... the sphinx-tabs js files need to be included after jquery, so prepending them breaks it. Annoyingly my test script has a bug so I didn't catch this before releasing the update... I'm not sure what the best practice is for overriding css in Sphinx, but I think including custom.css after sphinx-tabs css is sensible behaviour. I've made the js including smarter so that it includes the tabs js after jquery so that it's not broken! Released as 1.1.4. Let me know if that works for you! |
Version 1.1.4 works perfectly for me! It allows me to have a |
Cool :) |
The stylesheets of
sphinx_tabs
get appended at the very last, which makes overriding CSS styles in acustom.css
impossible (or I simply don't know how).My
conf.py
which includessphinx_tabs
:I try to override a sphinx_tabs style in my
_static/css/custom.css
:This doesn't override the default color, as the
custom.css
needs to be the last file for that in myindex.html
:There's a good chance that I do something wrong, any help would be appreciated.
The text was updated successfully, but these errors were encountered: