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

pre element too tall? #2164

Closed
merlinstardust opened this issue May 21, 2018 · 4 comments
Closed

pre element too tall? #2164

merlinstardust opened this issue May 21, 2018 · 4 comments

Comments

@merlinstardust
Copy link

For some reason pre blocks are taking up more height than they should. In the example screenshots, the pre block is taller than the code block by about 90 pixels.

But the CSS does not seem to indicate why. pre does not have a height defined and code does not have that amount of padding, so I don't understand why it is taking up so much space.

Why is pre's height so much higher than code? Why does pre not simply wrap code and match its height?

I have images showing this issue at StackOverflow.

@szechyjs
Copy link

I'm having the same problem. (rev a82c433)

screen shot 2018-06-19 at 8 45 06 pm

@szechyjs
Copy link

I figured it out thanks to #1874, the problem was whitespace between the pre and code tags.

@merlinstardust
Copy link
Author

Can it only be fixed by removing the whitespace between the tags or is there another option?

I much prefer to have each tag on a separate line

@bnjmnt4n
Copy link
Collaborator

bnjmnt4n commented Nov 4, 2018

Currently the only solution is to remove the whitespace between the pre and code tags. This is due to the semantics of the pre element which displays all whitespace between pre tags as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants