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

Make code blocks scrollable horizontally #11

Open
ebkalderon opened this issue Jan 31, 2021 · 4 comments
Open

Make code blocks scrollable horizontally #11

ebkalderon opened this issue Jan 31, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@ebkalderon
Copy link
Contributor

It seems that code blocks currently default to word-wrapping the text horizontally instead of allowing the reader to scroll left and right. This means that code samples published with this theme that drift rightward end up being wrapped, breaking their formatting and readability. This could be fixed by adjusting overflow, I think?

@ejmg
Copy link
Owner

ejmg commented Jan 31, 2021

does #12 do the job well enough? i added a long code segment that demonstrates the styling update here

@ejmg ejmg added the enhancement New feature or request label Jan 31, 2021
@ejmg
Copy link
Owner

ejmg commented Jan 31, 2021

i restricted overflow to the x axis because otherwise i would have to make a decision over what constitutes an adequately long code block along the y axis and i punted on that issue. i could be arbitrary and put a line in the sand now but i didn't care to.

@ebkalderon
Copy link
Contributor Author

ebkalderon commented Feb 2, 2021

Would overflow-x: auto; not be sufficient here? Why or why not? I'll give the PR with overflow-x: scroll; a try regardless, though. Thanks for opening it.

@damccull
Copy link
Contributor

damccull commented May 4, 2021

I personally like this solution. I prefer the Y-axis show the full length code instead of trying to scroll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants