Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fcc1736
Stat tiles: a change is colored text with an arrow, not an edit mark …
evangress Nov 10, 2026
087c71b
Footer columns sit at the end of the row (D5)
evangress Nov 10, 2026
32d5710
Expand buttons: a chevron on button[aria-expanded] (P1)
evangress Nov 10, 2026
2b169a8
Toggle buttons: aria-pressed="true" looks held down (P1)
evangress Nov 10, 2026
77171d9
Destructive buttons: data-tone on buttons (P1)
evangress Nov 10, 2026
ef6bef5
Required fields: a red asterisk on the label (P1)
evangress Nov 10, 2026
2bd9d08
Status banners: role="status" and role="alert" blocks (P1)
evangress Nov 10, 2026
a3ccb79
Disclosure: chevron marker and an easing open (P1)
evangress Nov 10, 2026
8013246
Modal dialogs lock the page behind them (P1)
evangress Nov 10, 2026
0a00935
Required fields: also a label before a row holding the field (P1 foll…
evangress Nov 10, 2026
62bc1ca
Sticky top bar: <header data-layout="sticky"> (P2)
evangress Nov 10, 2026
789261f
New-tab links say so: " ↗" (P2)
evangress Nov 10, 2026
e879cb4
Menu popovers open next to their button and stay on screen (P2)
evangress Nov 11, 2026
53e5310
Selectable rows: a checked first-cell checkbox tints the row (P2)
evangress Nov 11, 2026
a42db39
Print: leave controls out, keep cards whole, print details content (P2)
evangress Nov 11, 2026
3dad200
Test: a focused field lands below the sticky bar (P1 forms leftover)
evangress Nov 11, 2026
b7b1159
Tooltips: popover="hint" is small and inverted, above its trigger (P3)
evangress Nov 11, 2026
9b12ef9
Search bars: a magnifier in the search field (P3)
evangress Nov 11, 2026
2714c2f
On phones a modal dialog is a bottom sheet (P3)
evangress Nov 11, 2026
4112092
Sidebar menu on phones: the sidebar's nav behind a popover button (P3)
evangress Nov 11, 2026
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
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ All notable changes to TagBrush.css are listed here. This project follows [Seman
## Unreleased

### Added
- Sidebar menu on phones: a `body > aside` holding a `button[popovertarget]` and its `[popover]` shows the popover's nav in the sidebar on wide screens (the popover is `display: contents`, the button hidden) and only the button on phones, so the sidebar doesn't push the page down; the nav opens as a menu under the button. Checked first: at 360px a plain sidebar stacks its whole list above `<main>`.
- On a phone (under 30rem) a modal `<dialog>` is a bottom sheet: full width, docked to the bottom edge with its top corners rounded, sliding up instead of growing. Wider screens and non-modal dialogs are unchanged.
- A search field in a `<search>` (or `form[role="search"]`) shows a magnifier, drawn with gradients in `--color-text-muted` so it follows the theme. Search fields elsewhere are unchanged.
- Tooltips: a `[popover="hint"]` (opened on hover and focus by an `interestfor` trigger) is small and inverted, placed above its trigger with anchor positioning where supported. CSS only, with no JavaScript fallback: browsers without `interestfor` don't open it (modern-web-guidance `interest-triggered-tooltips`). A link with `interestfor` gets a dotted underline.
- Printing: navigation, search bars, buttons (not a table's sort buttons), and tab rows are left out of a printout; cards, stat tiles, steps, details, and banners aren't split across pages; and closed `<details>` print their content where `::details-content` is supported. TagAction opens them before printing in every browser.
- Selectable rows: a table row whose first cell holds a checked checkbox is tinted. Toggle switches and checkboxes in later cells don't select a row. TagAction adds select-all, indeterminate, and Shift-click ranges.
- Menus stay on screen: a popover holding a nav or a list (a user menu) opens next to the button that opened it, below it and flipping up or to the other side near an edge, with CSS anchor positioning (`position-area`, `position-try-fallbacks`), gated on `@supports (position-area: block-end)` so other browsers keep it centered (modern-web-guidance `viewport-aware-dropdowns`). Other popovers and the phone menu are unchanged.
- New-tab links: a link in running text with `target="_blank"` ends in " ↗", read as "(opens in a new tab)". Buttons, nav links, heading links, image links, and document links are left alone.
- Sticky top bar, opt-in: `<header data-layout="sticky">` stays at the top on the page background, the root gets `scroll-padding-top: 5rem` so a heading you jump to or a focused field doesn't land under it, and once it's stuck a soft shadow appears where `container-type: scroll-state` is supported (Chromium; elsewhere the hairline alone), following the modern-web-guidance `state-aware-sticky-headers` guide.
- Modal dialogs lock the page: while a `dialog:modal` is open the page behind doesn't scroll (`overflow: hidden` on the root via `:has()`), and the root keeps the scrollbar's space (`scrollbar-gutter: stable`), so nothing shifts sideways. Non-modal dialogs leave the page alone. Not in the scoped and Shadow DOM builds.
- Disclosure: a `<details>` marker is a chevron instead of the browser's triangle, at the start of the summary and turning down when open, or at the end in an accordion (neighboring `<details>`, or a `name`) and turning up. Opening eases the height where `interpolate-size` and `::details-content` are supported (Chromium); elsewhere, and with reduced motion, it opens at once. The header-nav dropdown keeps its own chevron.
- Status banners: a `<p>`, `<div>`, `<section>` or `<aside>` with `role="status"` ("Saved") is an info-tinted banner and one with `role="alert"` ("Couldn't save") a red one; `data-tone` recolors either. Server-rendered or swapped in by htmx; nothing dismisses it. Empty live regions, inline ones, and regions TagAction adds are left alone.
- Required fields: in a form that also has optional fields, the label of a `required` field (a `<label>` right before it, or one wrapping it) ends in a red asterisk, hidden from screen readers. A form where every field is required, like a sign-in, shows none.
- Destructive buttons: `data-tone` now colors buttons too. `<button data-tone="error">Delete</button>` is solid red and `class="outline" data-tone="error"` red-bordered; the other tones and `style="--tone: …"` work the same way. The fill is darkened as far as white text needs (4.5:1 in both schemes, tested).
- Toggle buttons: a `<button aria-pressed="true">` looks held down, with the hover color and an inset shadow, or a tint of the primary color on an `outline` or `secondary` button. TagAction's Show/Hide and theme buttons now show their state. `aria-pressed="false"` looks like any button.
- Expand buttons: a `<button aria-expanded>` shows a chevron after its label that points up while `aria-expanded="true"`, so a dropdown button (TagAction's, or your own) says it opens something. Buttons without the attribute are unchanged.
- Landing-page patterns that sites were writing by hand, found by moving the Kovir LLC site onto TagBrush.css (about 0.8 KB gzipped together):
- Steps: an `<ol>` whose items each start with a heading is a numbered timeline. Other ordered lists are unchanged.
- Phone menu: links in a `<div popover>` inside the header's `<nav>` sit in the bar on wide screens; on phones the `<button popovertarget>` before them opens them as a panel under the bar. No JavaScript.
Expand Down Expand Up @@ -39,9 +55,11 @@ All notable changes to TagBrush.css are listed here. This project follows [Seman
- The guide for AI agents is split so it can grow (roadmap chunk 24). `llms.txt` is now an index every agent reads: the rules and every pattern in one line, grouped by what you're building, each group linking to a detail file in `llms/` (pages, apps, forms, content, chat) with full examples and what each pattern leaves alone. `llms-full.txt` holds everything in one file. The Claude Code skill gets the detail files as references it reads on demand, Cursor gets one rule per topic, and `AGENTS.md` gets the full text. Tests check every snippet in every file, and that every pattern in a detail file is named in the index. The index is capped at 4,000 tokens (it's 3,038, down from 3,910 before the split), the full guide at 20,000 (it's 8,311).
- Coverage over size: the size ceiling is now 15 KB gzipped (it was 10 KB), and `llms.txt` is capped at 4,000 tokens, since agents read it on every page. See the guiding principle in `ROADMAP.md`.

**Changes to existing pages:** sections inside `<main data-layout="full">` used to get no side padding; they now get the page column's padding. Cards in an article grid are flex columns. Every `<dialog>` and `[popover]` now starts at `opacity: 0` and `scale: 0.97` until it's open, so a popover you show some other way than the popover API needs its own `opacity: 1`.
**Changes to existing pages:** the page always keeps room for a scrollbar (`scrollbar-gutter: stable` on the root), so with classic scrollbars (Windows, Linux) a short page has an empty strip at the side; set `scrollbar-gutter: auto` on `:root` to undo it. Sections inside `<main data-layout="full">` used to get no side padding; they now get the page column's padding. Cards in an article grid are flex columns. Every `<dialog>` and `[popover]` now starts at `opacity: 0` and `scale: 0.97` until it's open, so a popover you show some other way than the popover API needs its own `opacity: 1`.

### Fixed
- Footer columns no longer bunch at the start and leave half the row empty: the navs sit at the end of the row, and a leading paragraph takes the space before them (up to 24rem wide). The footer is a wrapping flex row instead of a grid, so the columns wrap on phones.
- A change in a stat tile, `<ins>` or `<del>` in a `<dl>` of `<div>`s, is green or red text after ▲ or ▼, with no background and no line. A drop written `<del>−0.4%</del>` was struck through on a red highlight, so it read as a deleted value. `<ins>` and `<del>` elsewhere are unchanged.
- A docs page whose `<aside>` holds only hidden content (`<aside><nav data-tag-toc hidden></nav></aside>`, a table of contents TagAction fills and shows) no longer gets an empty sidebar column: the article takes the width, as on a page without the aside. Readers without JavaScript saw a blank column. The sidebar column needs an element in the aside that isn't `hidden`. Found by the Tag family agent evaluation.

### Docs
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@ TagBrush.css sits in a family of drop-in stylesheets for semantic HTML. [Pico CS
| Code highlighting | Token colors for Prism, highlight.js, Hugo (Chroma), Jekyll (Rouge), Pandoc, and Pygments output, and Shiki's dual themes and `css-variables` theme. Follows the theme and dark mode; a highlighter theme you load yourself still wins |
| Markdown | Footnotes from GitHub-flavored Markdown, markdown-it, and Pandoc (smaller, muted, highlighted when linked to); long URLs and words wrap instead of widening the page |
| Article grids | A `<section>` of two or more `<article>`s, or a `<ul>` of `<li><article>`s, becomes a responsive grid of cards; an icon `<svg>` first in a card sits on a tinted tile, an `<img>` first runs to the card's edges, a last footer or paragraph of buttons sits at the bottom so buttons line up, a card whose heading holds its only link is clickable all over, a `<blockquote>` in a card is a testimonial, and the one card in a row with a solid button (the rest outlined) is featured |
| Status badges | `<mark data-tone="success">` (also `warning`, `error`, `info`, `neutral`, or any color with `style="--tone: …"`) is a tinted pill that stays readable in both schemes; `data-tone` on an `article aside` colors the callout |
| Status badges | `<p role="status">` and `<p role="alert">` (or a `div`, `section`, `aside`) are info and error banners, recolored by `data-tone`; `<mark data-tone="success">` (also `warning`, `error`, `info`, `neutral`, or any color with `style="--tone: …"`) is a tinted pill that stays readable in both schemes; `data-tone` on an `article aside` colors the callout |
| App patterns | `<aside>` next to `<main>` is a sidebar layout (vertical navigation, stacks on phones), full height when the `<aside>` comes before the `<header>`; `<aside>` next to an `<article>` in `<main>` is a sticky table of contents; a `<dl>` of `<div>`s is stat tiles; a `<header>` with a heading and buttons is one row; `<search>` lays out filters; an `<hgroup>` in the page header is a hero, with a `<figure>` or image beside it if you add one, or a photo behind it when an `<img>` comes first in the header; a `<section>` of just a `<figure>` and a `<div>` puts them side by side; a page `<footer>` with two or more `<nav>`s is a site map in columns |
| Structure | `nav` (with `ul`/`menu` rendered as a horizontal menu, `aria-current` highlighted; links in a `[popover]` in the header nav become a phone menu behind its `popovertarget` button), a skip link (`<a href="#main">` first in `<body>`, shown on focus), `header`, `main`, `footer`, `search`, `article aside` (callout), breadcrumbs (`<nav aria-label="Breadcrumb">` gets `/` separators) |
| Buttons | `button`, `input[type=submit/button/reset]`, `.button`, `:disabled`, `aria-disabled` |
| Structure | `<header data-layout="sticky">` (a top bar that stays, with room kept above jumped-to headings), `nav` (with `ul`/`menu` rendered as a horizontal menu, `aria-current` highlighted; links in a `[popover]` in the header nav become a phone menu behind its `popovertarget` button), a skip link (`<a href="#main">` first in `<body>`, shown on focus), `header`, `main`, `footer`, `search`, `article aside` (callout), breadcrumbs (`<nav aria-label="Breadcrumb">` gets `/` separators) |
| Buttons | `button`, `input[type=submit/button/reset]`, `.button`, `:disabled`, `aria-disabled`; a chevron on `button[aria-expanded]` that flips when open; `aria-pressed="true"` looks held down; `data-tone="error"` (or any tone) colors a button, solid or `.outline`, for destructive actions |
| Loading | `aria-busy="true"` on a button or any element shows a spinner |
| Forms | `fieldset`, `legend`, `label` (including inputs wrapped in their label), `textarea` (grows as you type unless it has a `rows` attribute), `select` (consistent arrow in the theme's colors; with a mouse, a themed picker where `appearance: base-select` is supported), `select[multiple]`, `optgroup`, every text-like `input` type (including `date`, `time`, `search`, …), `checkbox`, `radio`, toggle switches (`<input type="checkbox" role="switch">`), `range`, `color`, `file`, `image` |
| Form states | `:focus`, `:disabled`, `readonly`, `::placeholder`, `aria-invalid="true"` / `"false"`, `:user-invalid`, `:user-valid` on fields with a rule (`required`, `pattern`, `type="email"`, …), a radio or checkbox label with a `<small>` description as a choice card, help text via `<small>` after a field. Fields are spaced automatically. |
| Links | Links to `.pdf`, `.doc(x)`, `.xls(x)`, `.csv` and `.zip` files get a small label saying so; `download` links get an arrow. Buttons and nav links are left alone |
| Tables | `table`, `caption`, `<data>` values in cells (right-aligned, tabular figures), rows highlighted under the pointer, `thead`, `tbody`, `tfoot`, `th`, `td`, and the `align` attribute. A table is as wide as its content and scrolls sideways inside itself when it doesn't fit. Wrap it in `<figure>` to make it fill the full width instead. Wide tables and code blocks show a shadow at an edge with more to scroll to |
| Interactive | tabs (`role="tablist"`, `role="tab"`, `role="tabpanel"`; TagAction switches the panels), `details`, `summary` (neighboring `details` join into an accordion; a `details` in a header nav list is a dropdown menu), `dialog` (with `::backdrop`; a `header` with a close button and a `footer` of right-aligned buttons), `[popover]` (dialogs and popovers fade in and out), `progress`, `meter` (green / amber / red from its `low`, `high`, and `optimum` attributes) |
| Form states | a red asterisk on the label of a `required` field in a form that also has optional fields, `:focus`, `:disabled`, `readonly`, `::placeholder`, `aria-invalid="true"` / `"false"`, `:user-invalid`, `:user-valid` on fields with a rule (`required`, `pattern`, `type="email"`, …), a radio or checkbox label with a `<small>` description as a choice card, help text via `<small>` after a field. Fields are spaced automatically. |
| Links | A link in text with `target="_blank"` ends in ↗ ("opens in a new tab" for screen readers); links to `.pdf`, `.doc(x)`, `.xls(x)`, `.csv` and `.zip` files get a small label saying so; `download` links get an arrow. Buttons and nav links are left alone |
| Tables | `table`, `caption`, `<data>` values in cells (right-aligned, tabular figures), rows highlighted under the pointer, a row tinted when the checkbox in its first cell is checked, `thead`, `tbody`, `tfoot`, `th`, `td`, and the `align` attribute. A table is as wide as its content and scrolls sideways inside itself when it doesn't fit. Wrap it in `<figure>` to make it fill the full width instead. Wide tables and code blocks show a shadow at an edge with more to scroll to |
| Interactive | tabs (`role="tablist"`, `role="tab"`, `role="tabpanel"`; TagAction switches the panels), `details`, `summary` (a chevron marker, at the end in an accordion; opening eases where the browser can animate height; neighboring `details` join into an accordion; a `details` in a header nav list is a dropdown menu), `dialog` (with `::backdrop`; the page behind a modal doesn't scroll or shift; a `header` with a close button and a `footer` of right-aligned buttons), `[popover]` (dialogs and popovers fade in and out), `progress`, `meter` (green / amber / red from its `low`, `high`, and `optimum` attributes) |

### Utility classes

Expand Down
Loading
Loading