Roger Binns schrieb: > Roger Binns wrote: >> If you are in the process of fixing styles, it would be nice to apply >> them to code-blocks too. For example if I have: > >> .. code-block:: python > >> Then have the CSS classes be "highlight" (currently done) and >> "highlight-python". (I want to mess with "highlight-text" to format >> output.) > > Thanks for implementing this. Is there an easy way to specify an > additional HTML/CSS stylesheet. I can use "html_style" in the config or > put a different default.css in static to change the main style sheet, > but in this case I want to add one line (to set background colour of > highlight-text) so I'd rather specify an additional stylesheet.
You can either put a style link into the HTML template, or just use the CSS construct @import url() in the new file, to include the main style sheet. > Also I'd suggest creating the highlights the other way around. > Currently it does this but it would be better if the outside div was > highlight and the inside one was highlight-language. > > <div class="highlight-python"> > <div class="highlight"> > blah blah > </div></div> > > You can actually make this even shorter by doing: > > <div class="highlight highlight-python"> > blah blah > </div> That's true. I did it this way because the inner <div> is generated by Pygments, while the outer is added by Sphinx. This is easy to prevent for normal code blocks, but for code blocks that use line numbers the <div class="highlight"> is actually inside the table that contains the line numbers. Georg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
