Skip to content

Line break exception & Abnormal mobile screen width #7955

@Explorer-Dong

Description

@Explorer-Dong

Context

When I rendered a series of MD articles into HTML using the mkdocs-material theme, many compatibility rendering anomalies occurred.

Bug description

I have three bugs for feedback, both of which are about mobile content overflowing the screen width.

The following figures are the rendering results of the mobile model when using the latest Chrome browser on local Windows 11 and enabling developer mode.

bug1: Super long continuous strings cannot automatically wrap.

as the details below

Image

bug2: The inline formulas of KaTeX cannot be wrapped properly.

I raised a similar question not long ago #7941, that is, MathJax's inline formulas cannot wrap normally, and the conclusion I got was that it was an upstream problem, that is, MathJax has not yet implemented the line wrapping behavior of inline formulas in version 3.

Now KaTeX also has this problem.

Image

bug3: Abnormal screen width when there are inline formulas in the table

When there are inline formulas in a table, no content will overflow, but the screen width will be abnormally enlarged.

Image

Related links

Reproduction

bug.zip

Steps to reproduce

  1. pip install mkdocs-material
  2. cd bug/
  3. mkdocs serve
  4. enter 127.0.0.1:8000
  5. press F12
  6. select any mobile model

then you will see all the three bugs in different pages

Browser

Chrome

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugupstreamIssue must be taken upstream

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions