Repository navigation
Lay a table cell's one text inline, so a copied row stays on one line - #75
Merged
Merged
Conversation
Each cell's text is a <div class="ms-text">, and a browser copies a block as a line of its own: copying +bbread from the portal gave one line per cell, with the empty cells gone. A cell that holds only its text now lays it out as an inline-block filling the cell, which looks the same and copies as the cells of the row with tabs between them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7VgCvTw68ucmmEZ5tV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Grave · project thread
Why
LayoutHtmlwrites each table cell's text as<div class="ms-text">. A browser copies a block as its own line, so a copied table came out one cell per line with the empty cells gone. Copying SharpMUSH's+bbreadfrom the portal gives this:Change
LayoutCss.Fixedgains.ms-table :is(th, td) > .ms-text:only-child { display: inline-block; width: 100%; }. A cell holding just its text looks the same, and a copied row is its cells with tabs between them:A cell that holds several blocks keeps them stacked.
Checked
+bbread's real HTML plus the portal'sshell.css: the copy is fixed and row heights are the same (17 px each, 154 px for the table).tools/responsive-sweep/table-layout.test.mjspasses with the new rule. That test covers headers keeping whole words, long cells wrapping, and narrow tables fitting.MarkupString.Tests: 1,384 passed, including a new check for the rule.CHANGELOG: 2.24.1, Fixed.
Generated by Claude Code
Summary by CodeRabbit