-
Notifications
You must be signed in to change notification settings - Fork 734
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
Add CSS class to pre tag instead of code tag #191
Conversation
Background colours have been broken since `v1.4.0`, as noted here: rouge-ruby#141 (comment) This is because the highlight CSS class is added to the `code` tag, which is an inline element. Adding the class to the surrounding `pre` tag makes the background display correctly, since it's a block element.
In that thread I mentioned wanting
|
This feature has seen really a lot of churn lately, and I'd like to solve it once and for all, especially since changes like these can break user code. I don't care nearly as much about html semantics as I do about not breaking user code, and also not nearly as much as I care about compatibility with existing rendered pygments stylesheets. So if we aren't getting the background color from a given pygments stylesheet, I consider that a high-priority bug. |
I haven't used pygments, so I found this monokai style and it has no instead of |
I think what I'm going to do is merge this for this version (since it's what people's stylesheets expect), and re-think the assumptions of the Theme generator and the HTML formatter for 2.0. I'll start an open thread to discuss that track. |
Add CSS class to pre tag instead of code tag
Rouge’s HTML formatter was changed so that the class appears on the `pre` element rather than the `code` element. See also rouge-ruby/rouge#191.
The bug introduced because of the rouge gem updated to version 1.8.0 [d7d2701] and it is rooted back in version 1.7.4 with the merge of rouge-ruby/rouge#191.
Background colours have been broken since
v1.4.0
, as noted here: #141 (comment)This is because the highlight CSS class is added to the
code
tag, which is an inline element. Adding the class to the surroundingpre
tag makes the background display correctly, since it's a block element.