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

Long tables, formulas, code blocks, etc. break website width / overall site scrolling #990

Closed
ragibson opened this issue Oct 5, 2023 · 2 comments · Fixed by #1129
Closed

Comments

@ragibson
Copy link
Contributor

ragibson commented Oct 5, 2023

Describe the bug
Long (width-wise) elements in an article break the overall style of the site, especially on mobile.

To Reproduce
Steps to reproduce the behavior:

  1. Set up the website from scratch.
$ hugo new site test-site-20231005
$ cd test-site-20231005/
$ git init
$ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish
# set up the basic configuration from the documentation
  1. Create a post with this content and note that the table extends out of the viewport width on mobile (left-most screenshot below).
+++
title = 'Test Post'
+++

| Table LongHeader 1 | Table LongHeader 2 | Table LongHeader 3 | Table LongHeader 4 |
|--------------------|--------------------|--------------------|--------------------|
| content 1          | content 2          | content 3          | content 4          |
  1. Create a post with this content and note that the equation extends out of the viewport on mobile and breaks out of the website width compared to the header (middle screenshot below).
+++
title = 'Test Post'
+++

{{< katex >}}

$$
\int_2^3 \exp(10^x) \, dx = \left[ \frac{10^x}{\ln(x)} \right]_2^3 = \frac{10^2}{\ln(2)} - \frac{10^1}{\ln(1)} \approx 765.97
$$
  1. Create a post with this content and note that the long inline code block extends out of the viewport on mobile and breaks out of the website width compared to the header (right-most screenshot below).
+++
title = 'Test Post'
+++

Some long sentence referring to a very long bit of encoded data, say `gIkEdOl6WqnbMRhEsezBB8STzq0oTf9gOK1aqqf9fKKEysdkmymzsz3SXl02Y809`, before continuing onwards.

Expected behavior
The long article content either gets a scrollbar or broken onto multiple lines.

Screenshots

image

Desktop (please complete the following information):

  • OS: Linux Mint, Windows 10, iOS, and Android
  • Browser Chrome and Firefox

Hugo & Blowfish versions
Which version of Hugo and Blowfish are you using?

hugo v0.119.0 and the Blowfish repository from today, though the issue has persisted for a few months, at least.

@thedaxshepherd
Copy link

Excuse me if this is not the best place to add what I consider a similar issue. I notice if I write code with Line Numbers it does not provide a scrollbar. I was hoping this change would fix it and I updated my theme version to v2.49.1 and I am still seeing the issue.

I was able to add a scrollbar by using the Custom CSS:
.chroma .lntable {
overflow-x: auto;
}

However, I am not experienced with CSS and do not know if this is the best solution for all cases.

Screenshots:
No Line Numbers
NoLineNumbers_Scroll-0000

Line Numbers - No Scrollbar
LineNumbers_NoScroll-0000
Line Numbers - Scrollbar with added Custom CSS
LineNumbers_Scroll_WithCSS-0001

I am adding the code samples using fences:

SUMMARIZECOLUMNS

```dax {linenos=table,hl_lines=[8,"15-17"],linenostart=199}
EVALUATE
...

@nunocoracao
Copy link
Owner

should be fixed

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 a pull request may close this issue.

3 participants