Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#23184 closed enhancement (wontfix)

Twenty Eleven/Twelve: Mismatched lines in GitHub Gists

Reported by: obenland's profile obenland Owned by:
Milestone: Priority: lowest
Severity: normal Version: 3.5
Component: Bundled Theme Keywords:
Focuses: Cc:

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.

Example: http://themebuster.wordpress.net/gist-test/

Attachments (1)

23184.diff (1.1 KB) - added by obenland 12 years ago.

Download all attachments as: .zip

Change History (12)

@obenland
12 years ago

#1 follow-ups: @lancewillett
12 years ago

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.

#2 in reply to: ↑ 1 @DrewAPicture
12 years 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?

#3 in reply to: ↑ 1 @obenland
12 years ago

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?

#4 @obenland
12 years ago

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.

#5 @lancewillett
12 years 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.

#6 follow-up: @lancewillett
12 years 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.

#7 in reply to: ↑ 6 @DrewAPicture
12 years 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

#8 @lancewillett
12 years ago

  • Keywords has-patch removed
  • Priority changed from normal to lowest

#9 @lancewillett
11 years ago

  • Milestone changed from 3.6 to WordPress.org

Will loop back on this after 3.6 is stable.

#10 @georgestephanis
11 years 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)

#11 @obenland
11 years ago

  • Keywords close removed
  • Milestone WordPress.org deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Well, it looks like they followed georgestephanis' advice: https://gist.github.com/assets/embed-4252e560c3e6f4c476a216c2bb7938cd.css

Note: See TracTickets for help on using tickets.