Opened 4 months ago
Last modified 4 weeks ago
#23184 new enhancement
Twenty Eleven/Twelve: Mismatched lines in GitHub Gists
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | WordPress.org |
| Component: | Bundled Theme | Version: | 3.5 |
| Severity: | normal | Keywords: | close |
| Cc: | DrewAPicture |
Description
GitHub Gists are displayed with the code and line numbers misaligned, due to the difference in font-size and/or line-height of <pre> and <table> elements.
Originally reported in this thread and on wp.com.
Attachments (1)
Change History (11)
comment:1
follow-ups:
↓ 2
↓ 3
lancewillett — 4 months ago
comment:2
in reply to:
↑ 1
DrewAPicture — 4 months ago
- Cc DrewAPicture added
23184.diff looks sane to me and I like it a lot better than all-out usurping the <pre> styles.
Replying to lancewillett:
So, while I'd love to fix this, I'd vote that this specific of a fix should be in the plugin itself, not in the default theme stylesheet.
Are you talking about upstream?
Replying to lancewillett:
So, while I'd love to fix this, I'd vote that this specific of a fix should be in the plugin itself, not in the default theme stylesheet.
I'm confused. I thought your example Gist test on themebuster is using the JavaScript embed provided by GitHub, no?
I can reproduce it in a local test with the javascript method.
Admitted, it is a prettic specific fix. While we provide custom code for third party services like Twitter and Jetpack, it could be argued that those are more likely to be tied in, than a Gist.
comment:5
lancewillett — 3 months ago
- Keywords close added
- Milestone changed from Awaiting Review to 3.6
Marking as "close" based on looking at the original thread: http://wordpress.org/support/topic/gists-look-crazy-with-twenty-twelve -- and looking at the URLs, the layout looks fixed in the plugin now.
comment:6
follow-up:
↓ 7
lancewillett — 3 months ago
I think we should ping Github team and ask them to update the embedded CSS to account for line-height and font-size. That way instead of just patching this one theme -- it'll work great everywhere.
comment:7
in reply to:
↑ 6
DrewAPicture — 3 months ago
Replying to lancewillett:
I think we should ping Github team and ask them to update the embedded CSS to account for line-height and font-size. That way instead of just patching this one theme -- it'll work great everywhere.
+1
comment:8
lancewillett — 3 months ago
- Keywords has-patch removed
- Priority changed from normal to lowest
comment:9
lancewillett — 2 months ago
- Milestone changed from 3.6 to WordPress.org
Will loop back on this after 3.6 is stable.
comment:10
georgestephanis — 4 weeks ago
This really shouldn't be an issue of manually specifying a line height. It can be easily resolved with:
.gist pre {
font: inherit;
line-height: inherit;
white-space: pre;
}
(The white-space: pre is to resolve a twentythirteen issue, where the lines can wrap and then not match up with the numbers)

So, while I'd love to fix this, I'd vote that this specific of a fix should be in the plugin itself, not in the default theme stylesheet.