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

Code blocks without associated rendered code can overflow without a scroll bar #527

Open
MDLC01 opened this issue Jan 29, 2025 · 0 comments
Labels
bug Something isn't working. docs Improvements or additions to documentation UX.

Comments

@MDLC01
Copy link

MDLC01 commented Jan 29, 2025

Description

In the Table guide, block code examples that are not associated with a rendered preview do not have overflow-x: auto. This makes them visually overflow on mobile, and induce a scroll bar on the entire page.

The first such code example is accessible by searching for "your whole document" in the page.

This issue is due to the CSS following CSS rule:

.previewed-code pre {
  overflow-x: auto;
}

This rule does not apply to code blocks without previews, which are bare pre elements with no container.

Another similar issue is that code elements have whitespace: nowrap, which prevents the inline code [FDP], table.cell(fill: yellow)[Theodor Heuss] from being wrapped as well. This is also an issue on mobile.

Both those issues need to be solved in order to prevent the page from being horizontally scrollable.

Reproduction URL

https://typst.app/docs/guides/table-guide/

Browsers

No response

OS

No response

@MDLC01 MDLC01 added the bug Something isn't working. label Jan 29, 2025
@laurmaedje laurmaedje added the docs Improvements or additions to documentation UX. label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. docs Improvements or additions to documentation UX.
Projects
None yet
Development

No branches or pull requests

2 participants