WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 20 months ago

#23184 closed enhancement (wontfix)

Twenty Eleven/Twelve: Mismatched lines in GitHub Gists

Reported by: 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 2 years ago.

Download all attachments as: .zip

Change History (12)

@obenland2 years ago

comment:1 follow-ups: @lancewillett2 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.

comment:2 in reply to: ↑ 1 @DrewAPicture2 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?

comment:3 in reply to: ↑ 1 @obenland2 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?

comment:4 @obenland2 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.

comment:5 @lancewillett2 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.

comment:6 follow-up: @lancewillett2 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.

comment:7 in reply to: ↑ 6 @DrewAPicture2 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

comment:8 @lancewillett2 years ago

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

comment:9 @lancewillett2 years ago

  • Milestone changed from 3.6 to WordPress.org

Will loop back on this after 3.6 is stable.

comment:10 @georgestephanis2 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)

comment:11 @obenland20 months 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.