Skip to content
Open
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
17 changes: 17 additions & 0 deletions packages/lit-dev-content/site/css/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,23 @@ table {
background-color: var(--sys-color-surface-container-dim);
}

/* Tables can contain content that can't wrap (e.g. code), so let them scroll
horizontally instead of overflowing the article on narrow viewports. Sizing
to max-content keeps tables that fit as wide as their content. Tables nested
inside another table's cell are left alone. */
table:not(:is(td, th) table) {
display: block;
width: max-content;
max-width: 100%;
overflow-x: auto;
}

/* Tables with a .wide-cell fill the article, as they do without the rule
above. */
table:has(.wide-cell) {
width: 100%;
}

th {
background-color: var(--sys-color-surface-container-highest);
text-align: left;
Expand Down