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
All admonitions are red #1825
Comments
@petsuter Could you tell me about this problem in detail (if you can remember)? I used Sphinx-1.3.4 and following reST on investigation::
|
@tk0miya I used Spinx-1.3.1 on Windows. I just reproduced it with these steps:
Inspecting HTML I see:
and in CSS (
|
I now ran |
Thanks, I missed it. I used the classic theme for testing. |
@birkenfeld @shimizukawa This is a issue about |
(FYI. #1346 is a discussion of new default theme.) |
It's hard to tell from these comments - @petsuter which exact version of Sphinx and which theme were you using where the admonition was not red/pink? I need to look at when Alabaster made that change but I've tried to be backwards compatible since the point where Sphinx added Alabaster as the default theme. In addition, the implied statement here is that "admonitions should not have any distinct styling" and I'm not sure if I agree with that - many popular themes have e.g. warnings as red and notes as yellow, etc. The lack of coloring earlier in Alabaster's history was largely an oversight IIRC. There are also configuration options in Alabaster allowing one to change both the background and border colors for the admonition blocks, so you can change it to suit your taste easily :) see https://github.com/bitprophet/alabaster#style-colors |
I was probably using Sphinx 1.2.2 and the default theme of that version when generic admonitions where still looking like normal text. I don't care if warnings etc. are yellow. But a plugin I use is providing a custom admonition subclass I have had a look at the site you linked before, but it does not mention the word "admonition" anywhere and sadly I have no clue what that list of "style colors" are for. An example might be helpful? |
@petsuter please attach (some where) your Sphinx project that includes source and html build output |
@shimizukawa T1825.zip contains four Sphinx projects including source and html build output. (Two without plugins, and two with the traceability plugin. In each case one with the alabaster theme in red and one with the classic theme without red.) Hope this helps. (All html build output was created with Sphinx 1.3.4 and alabaster 0.7.7) |
@petsuter See the |
OK thanks. So if I understand correctly I have to use this to get the plugin items to appear normal again:
Is there a way to keep warnings red? Or to specify the color as "like normal text" without hardcoding Would you say the root problem is with the plugin, and it shouldn't subclass |
@petsuter Oh, I see - is the issue that you've got a plugin adding additional admonition types besides the default (which I think is just I checked your zipfile real briefly and it does just look like your sources end up generating So yes, I think your best bet is to figure out how to make your plugin emit some other class for these, or alternately, whip up a basic theme inheriting from Alabaster which adds additional stylesheet rules for EDIT: I backed up and checked my own stuff, and when I use |
points up at the link github handily inserted there |
It seems alabater theme was already fixed. So I close this now. |
Generic admonitions used to look just like normal text. Now they are all red.
This also affects plugins that derives custom items from admonitions.
The text was updated successfully, but these errors were encountered: