mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-12-05 01:29:32 +01:00
fix(web): a markdown table column no longer shrinks to one letter per line
Rendered markdown sets `overflow-wrap: anywhere` so that a long path in prose wraps, and table cells inherited it. With `anywhere`, the browser counts every letter as a break point when it computes a cell's minimum width. The header cells never wrap, so in a table whose headers fill the width, the column under an empty header got only its minimum width, and its labels stood one letter per line. Table cells now use `overflow-wrap: break-word`. A cell still breaks a word that is wider than its column, but its minimum width is its longest word. In Chromium, the label column of a five-column table went from 36 px to 74 px and wraps between words. A table with an unbreakable cell wider than the view scrolls sideways inside its wrapper, which the wrapper already allows. The Response Viewer and the File Viewer's markdown view share these rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6db166f3f8
commit
2ea593c2e2
2 files changed
+50
No files matched your search
@@ -14119,6 +14119,11 @@ html:is([data-skin="paper-gray"], [data-skin="solarized-light"], [data-skin="cat
|
||||
text-align: start;
|
||||
vertical-align: top;
|
||||
white-space: normal;
|
||||
/* A cell breaks a word only when the word alone is wider than the column. The `anywhere`
|
||||
that cells inherit from .rv-text also lets the table count every letter as a break
|
||||
point when it sizes its columns, so a column beside wide headers shrank to one letter
|
||||
per line. */
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.rv-text th:last-child, .rv-text td:last-child,
|
||||
|
||||
Reference in new issue
Block a user