Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed

- **A page narrow enough to hide columns gives up their shares without `!important`.** `LayoutCss`
hides a filling table's `<colgroup>` there instead of overriding each column's inline width, so a
site whose stylesheets forbid `!important` can carry the rule as written.

## 2.11.0 — 2026-10-07

### Added

- **Tables that fill their width.** `TableColumn.Grow` gives a column a share of the width a table has
Expand Down
2 changes: 1 addition & 1 deletion MarkupString.Html/LayoutCss.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ public static class LayoutCss
".ms-table th { border-bottom: 1px solid var(--ms-header-rule, var(--ms-header-rule-default, currentColor)); color: var(--ms-heading, var(--ms-heading-default, inherit)); }\n" +
".ms-table.ms-striped > tbody > tr:nth-child(even) { background: var(--ms-stripe, var(--ms-stripe-default, rgba(127, 127, 127, 0.12))); }\n" +
".ms-table .ms-nowrap, .ms-table .ms-nowrap .ms-text { white-space: pre; overflow-wrap: normal; }\n" +
"@media (max-width: 48em) { .ms-table .ms-p3 { display: none; } .ms-table.ms-fill > colgroup > col { width: auto !important; } }\n" +
"@media (max-width: 48em) { .ms-table .ms-p3 { display: none; } .ms-table.ms-fill > colgroup { display: none; } }\n" +
"@media (max-width: 32em) { .ms-table .ms-p2 { display: none; } }\n";
}
2 changes: 1 addition & 1 deletion MarkupString.Tests/Layout/WidgetLayoutTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public async Task Table_InHtml_AGrowingTableFillsThePage()
await Assert.That(BlockLayout.Build(Who(), 60).Render(MarkupFormat.Html, Registry)).DoesNotContain("<colgroup>")
.Because("a table that does not fill is as wide as its cells");
await Assert.That(LayoutCss.Fixed).Contains(".ms-table.ms-fill { width: 100%; }");
await Assert.That(LayoutCss.Fixed).Contains(".ms-table.ms-fill > colgroup > col { width: auto !important; }")
await Assert.That(LayoutCss.Fixed).Contains(".ms-table.ms-fill > colgroup { display: none; }")
.Because("on a page narrow enough to hide columns, their shares are given up");
}

Expand Down
Loading