Skip to content

Define the design-system classes that rendered as nothing - #4

Merged
sylvesterdamgaard merged 1 commit into
mainfrom
fix/console-a11y
Jul 27, 2026
Merged

Define the design-system classes that rendered as nothing#4
sylvesterdamgaard merged 1 commit into
mainfrom
fix/console-a11y

Conversation

@sylvesterdamgaard

Copy link
Copy Markdown
Contributor

Four cbx-* classes were used in Blade with no rule anywhere behind them. That fails silently — valid markup, HTTP 200, element just renders unstyled.

The one that mattered: .cbx-pill--danger (the variant is --destructive). On /console/nexus that made "3 triggered" — US economic-nexus thresholds crossed, an unregistered tax liability — render as the same neutral chip as any inert label. The severity signal was dropped on the page whose only job is severity. Same class on the three import screens, where a failed import read as routine.

Also .cbx-card on the topbar clone popover (transparent over the table beneath, on every console page), .cbx-pill--neutral (harmless — coincided with the default), and .cbx-label.

The guard

Compares every class in a class="…" attribute against every rule in the stylesheets and in Blade <style> blocks — the public storefront, paywall and quote pages are deliberately self-contained, so their inline rules must count as definitions. Getting that wrong would have pushed working CSS out of the pages designed to carry it.

It surfaced nine further names with no rule. Those are a different thing: their elements are styled by inline style= attributes, so nothing renders wrong and the class is a leftover hook. Listed explicitly as accepted rather than hidden, so a new undefined class still fails.

Gate

pint · PHPStan level max (0 errors) · 1027 tests — green. Verified by reverting the nexus class and watching the guard name it.

Four `cbx-*` classes were used in Blade with no rule anywhere behind them, which
fails silently — the element renders unstyled on a page that otherwise looks fine.

The one that mattered: `.cbx-pill--danger` (the design system's variant is
`--destructive`). On /console/nexus that made "3 triggered" — US economic-nexus
thresholds crossed, an unregistered tax liability — render as the same neutral chip
as any inert label. The severity signal was dropped on the page whose entire job is
severity. Same class on the three import screens, where a FAILED import read as
routine.

Also `.cbx-card` on the topbar's clone popover, which had no background, border or
shadow and so rendered transparent over the table beneath it — on every console
page; `.cbx-pill--neutral`, harmless because it coincided with the default; and
`.cbx-label`, which left section headings looking like body text. The first three
are repointed at the real variants; `.cbx-label` is defined, matching `.cbx-kv dt`
so the two read as one system.

A CI guard now compares every class used in a `class="…"` attribute against every
rule in the stylesheets AND in Blade `<style>` blocks — the public storefront,
paywall and quote pages are deliberately self-contained, so their rules legitimately
live inline and must count as definitions.

It surfaced nine further names with no rule. Those are NOT the same defect: their
elements are styled by inline `style=` attributes, so nothing renders wrong and the
class is a leftover semantic hook. They are listed explicitly as accepted rather than
hidden, so a NEW undefined class still fails the build. Verified by reverting the
nexus class and watching the guard name it.
@sylvesterdamgaard
sylvesterdamgaard merged commit 63b955e into main Jul 27, 2026
2 checks passed
@sylvesterdamgaard
sylvesterdamgaard deleted the fix/console-a11y branch July 27, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant