Skip to content

[bug] Tables in blog posts do not scroll horizontally on mobile devices #166

Description

@Druadach

Run command like bun astro-pure info, bun astro info

Astro v6.1.8
Node v24.11.0
System Windows (x64)
Package Manager bun
Output static
Adapter none
Integrations astro-pure

Describe the Bug

On mobile devices or narrow screens, tables with many columns or wide content do not scroll horizontally. Instead, they either get cut off or overflow and break the page layout.

Reason:
In uno.config.ts, the custom typography configuration resets table to display: 'block', but lacks overflow-x: 'auto'. Without it, block-level tables cannot scroll horizontally when their content exceeds the screen width.


Steps to Reproduce

  1. Create a blog post with a wide markdown table (e.g., 5+ columns with text).
  2. View the post on a mobile device or responsive simulator (width < 640px).
  3. Observe that the table cannot be scrolled horizontally to view hidden columns.

Proposed Solution / Fix

Add 'overflow-x': 'auto' to the table style inside the UnoCSS configuration.

File: uno.config.ts (around line 105)

Code Diff:

  table: {
    display: 'block',
-   'font-size': '.875em'
+   'font-size': '.875em',
+   'overflow-x': 'auto'
  }

### If this issue only occurs in one browser, which browser is a problem?

_No response_

### Participation

- [ ] I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions