Skip to content
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

Fixing coy theme + line numbers plugin overflowing on long blocks of text #762

Merged
merged 2 commits into from
Sep 9, 2015
Merged

Conversation

AnujRNair
Copy link
Contributor

Currently, with the coy theme and line numbers plugin, due to the before and after pseudo elements, long blocks of text overflow outside of the code blocks like so:

screen shot 2015-09-08 at 10 42 48 pm

This commit fixes this, making the code element's max height slightly smaller than the pre element's max height. All code is shown properly, and code no longer overflows outside of the pre element.

Seen on Mac, Chrome Version 45.0.2454.85 (64-bit)

@Golmote
Copy link
Contributor

Golmote commented Sep 9, 2015

Hi @AnujRNair. Thanks for contributing again.
I am unable to reproduce the issue in the first place, though. Can you please provide an online example of the problem, before I merge the fix?

@AnujRNair
Copy link
Contributor Author

Hi @Golmote, no problem! Im loving PrismJS :)

I've realised the problem actually exists because Bootstrap3 is applying some styling to the pre blocks, as seen here:

http://codepen.io/anon/pen/jbPjwm

2 options can help solve this:

  • The proposed commit
  • Setting pre[class*="language-"] { padding: 0; } to reset the bootstrap styling

Solution 1 leaves some nice space at the top and bottom of the code block.
Solution 2 resets the problematic styling, however, doesn't leave any spacing at the top and bottom of the code block

My proposed solution would be solution 2, as this fixes the actual issue, and then allow the developer to add more styling on their own in they would like to fix spacing.

If you're happy with solution 2, I can kill this merge request and create a new one?

@Golmote
Copy link
Contributor

Golmote commented Sep 9, 2015

I'll go with solution 2 as well. The creator of this theme did not include spacing, so let's respect that choice and only fix the issue.

You don't have to create a new PR, though. Just update your fork and this PR will be updated automagically.

@AnujRNair
Copy link
Contributor Author

Thanks, done!

Golmote added a commit that referenced this pull request Sep 9, 2015
Fixing coy theme + line numbers plugin overflowing on long blocks of text
@Golmote Golmote merged commit a0127eb into PrismJS:gh-pages Sep 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants