0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
The tbody element groups body rows of a table. Vanilla Breeze adds a hover highlight on rows and supports a striped variant for easier scanning.
Description
The <tbody> element contains one or more <tr> elements that make up the data portion of a table. It should appear after <thead> and before <tfoot> in the source order.
Vanilla Breeze applies a hover highlight on tbody tr rows using var(--color-hover-bg), and supports a data-striped variant that applies alternating background colors to odd rows for easier row tracking.
When to Use
Every data table: All tables should use tbody to group data rows
Multiple tbody sections: Group related rows for visual or semantic separation (e.g., by department or category)
Dynamic content: JavaScript can target tbody directly for adding or removing rows without touching headers or footers
Examples
Basic Table with tbody
A complete table structure with <thead>, tbody, and <tfoot>. Hover over rows to see the built-in highlight.
Add the boolean data-stripedattribute to the <table> element. VB alternates backgrounds on odd visible rows within tbody, making it easier to track data across wide tables. Rows hidden by <data-table> filtering or paging (data-state-hidden, hidden) and expandable detail rows (data-expand-content) are skipped, so the stripes keep alternating.
Striped table
<tabledata-striped><thead><tr><thscope="col">ID</th><thscope="col">Name</th><thscope="col">Status</th></tr></thead><tbody><tr><td>001</td><td>Project Alpha</td><td>Active</td></tr><tr><td>002</td><td>Project Beta</td><td>Planning</td></tr><!-- More rows... --></tbody></table>
Row States
tbody rows can carry state information for visual indicators like selection or status.
Density
Adjust cell padding for compact or spacious tables.
CSS Reference
Vanilla Breeze applies these styles to rows within tbody:
VB tbody CSS
/* Rows paint through --_row-bg so frozen (sticky) cells can repeat the same tint over an opaque surface */tr { background: var(--_row-bg); }/* VB default hover state */tbodytr:hover {--_row-bg: var(--color-hover-bg);}/* Striped variant — add data-striped to the table. Hidden and detail rows don't count toward odd/even. */table[data-striped]tbodytr:nth-child(odd of :where(:not([data-state-hidden], [hidden], [data-expand-content]))) {--_row-bg: var(--color-row-stripe);}table[data-striped]tbodytr:hover {--_row-bg: color-mix(in oklch, var(--color-text) 10%, transparent);}
Selector
Property
Purpose
tbody tr:hover
--_row-bg: var(--color-hover-bg)
Highlights the row under the pointer for easier scanning
table[data-striped] tbody tr:nth-child(odd of …)
--_row-bg: var(--color-row-stripe)
Alternating backgrounds on visible rows; a text-tinted wash that stays distinct from the hover colour
Accessibility
Structural separation: Helps assistive technologies distinguish data from headers and footers
Implicit role: tbody has an implicit ARIA role of rowgroup
Row headers: When rows have their own headers, use <th scope="row"> in the first cell
Stripes are decoration: they help sighted users track wide rows but carry no meaning, and in forced-colors mode they are painted out (rows stay ruled by their borders)