Define the design-system classes that rendered as nothing - #4
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/nexusthat 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-cardon 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.