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

System horizontall scroll in <pre> tags #2876

Closed
difhel opened this issue Apr 25, 2021 · 1 comment
Closed

System horizontall scroll in <pre> tags #2876

difhel opened this issue Apr 25, 2021 · 1 comment

Comments

@difhel
Copy link

difhel commented Apr 25, 2021

Information

  • Language: python and others
  • Plugins: none

Description
Prism, when highlighting wide code, exposes a horizontal scrollbar to the user without css design, which looks very ugly. This can be seen in the simple code, the link to the site is left. I ask you to stylize this scroll or at least remove it, as it is very unpleasant to see this in the documentation for the project.

Code snippet

Test page

The code being highlighted incorrectly.
test = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis."
print(test)
@RunDevelopment
Copy link
Member

exposes a horizontal scrollbar to the user without css design

That's the default for HTML pre elements. If you want to wrap your code instead, set white-space: pre-wrap; for pre elements.

Keep in mind that the line wrapping implemented by the browser doesn't look that good. However, implementing smart line wrapping is very difficult, see #2202.

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

No branches or pull requests

2 participants