Skip to content

refactor(website): substrate migration batch 5 — marketing components off inline styles - #855

Merged
blove merged 4 commits into
mainfrom
blove/style-substrate-batch-5
Aug 29, 2026
Merged

refactor(website): substrate migration batch 5 — marketing components off inline styles#855
blove merged 4 commits into
mainfrom
blove/style-substrate-batch-5

Conversation

@blove

@blove blove commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

What

Batch 5 of the substrate migration (plan, Task 5): 15 files across pricing, blog, contact, and solutions move to src/styles/marketing.css. Three commits, one per area.

Highlights: CompareTable's 31 repeated style sites collapse to a handful of shared classes; LeadForm's six onFocus/onBlur handler pairs become one .lead-form-input:focus rule (verified present, targeting --color-accent + --shadow-focus — exactly what the handlers wrote); highlight/first/last ternaries become data-* modifiers.

Also amends the plan for mid-arc reality: #851 gave the website suite an nx target and repaired the rotted specs, so the "5 tolerated failures" baseline batches 1–4 asserted against is retired — this and all remaining batches hold the suite fully green.

Verified: four pages signature-identical to production

Per-page aggregate signatures (element count + tag-order hash + hash of per-element hashes over 26 computed properties, pinned 1280×900):

page elements result
/pricing 420 identical to prod
/blog 169 identical to prod (fresh baseline — a post published mid-arc)
/contact 34 identical to prod
/solutions/customer-support 352 identical to prod

Plus nx test website fully green (347 tests, including the newly-live PostCard/Differentiator specs over migrated components), 0 lint errors, prod build green.

Notes

  • PostCard/FeaturedPostCard keep their batch-1 data-ui="card" data-hoverable treatment and layer one override class after it — source order in global.css's import list resolves the equal-specificity cascade the way the inline styles used to.
  • ContactForm turned out to have no focus/validation handlers (the plan's table overstated it) — migrated as plain static styles.
  • SolutionDemoBlock/SolutionCodeBlock's per-page accent color prop stays inline (unbounded value, the documented escape hatch).

🤖 Generated with Claude Code

blove added 4 commits August 29, 2026 15:06
CompareTable, LeadForm, CompatibilityMatrix, and PricingFAQ move their
static presentation (backgrounds, borders, type scale, table cell
shapes) from inline style props into src/styles/marketing.css, with
zero visual change.

- CompareTable's repeated cell/header style objects (shape D) collapse
  into a handful of `.pricing-compare-*` classes reused across tiers
  and rows; bounded tier/row states (highlighted tier, active billing
  cycle, last row) become `data-highlight`/`data-active`/`data-last`
  modifiers instead of inline ternaries.
- LeadForm's 6 focus/blur handler pairs (border-color + box-shadow) are
  replaced by a single `.lead-form-input:focus` rule; the handlers are
  deleted.
- CompatibilityMatrix's TONE_COLORS lookup becomes a `data-tone`
  modifier on `.compat-matrix-td-label`.
- Values computed from external config (CtaStrip's
  `gridTemplateColumns` keyed off `TIERS.length`) stay inline per the
  migration's "unbounded/computed" exception.

Migration: docs/superpowers/plans/2026-08-29-inline-style-substrate-migration.md
PostCard, FeaturedPostCard, BlogTagFilter, AuthorByline, and TagChips
move their static presentation into src/styles/marketing.css, with
zero visual change.

- PostCard/FeaturedPostCard keep the existing `data-ui="card"
  data-hoverable` hooks (ui.css) for the resting/hover treatment from
  Batch 1, and layer a single component class after it in import order
  (marketing.css loads after ui.css) to override background/border/
  padding/radius, matching the specificity precedence the inline
  styles previously had.
- BlogTagFilter's PILL_BASE/ACTIVE/INACTIVE variant maps (shape B)
  become one `.blog-tag-pill` class with a `data-active` modifier; the
  non-link "current tag" span keeps its `cursor: default` override via
  a `data-static` modifier.
- RecentArticles (batch 4) only consumes `<PostCard>` with no wrapping
  style — confirmed no double-styling.

Migration: docs/superpowers/plans/2026-08-29-inline-style-substrate-migration.md
….css

ContactForm, AltChannelRow, SlaCard, GitHubStarsPill, SolutionDemoBlock,
and SolutionCodeBlock move their static presentation into
src/styles/marketing.css, with zero visual change.

- ContactForm has no focus/blur/invalid handling in the source (the
  batch brief mentions focus/validation states for the contact+pricing
  pair, but only LeadForm, migrated in commit 1, actually implements
  it) — moved as plain shape A/D, `'use client'` kept for form state.
- SolutionDemoBlock/SolutionCodeBlock's `<Eyebrow style={{ color:
  accent, marginBottom: 12 }}>` stays inline: `accent` is a per-page
  prop (unbounded value), the migration's documented exception.
- SolutionCodeBlock's `marginTop: index === 0 ? 0 : 24` ternary becomes
  a `data-first` modifier on `.sol-code-block-item`.
- SolutionCodeBlock's code-frame styles merge into the `.solution-code`
  class the component already applied via className (unstyled until
  now).

Migration: docs/superpowers/plans/2026-08-29-inline-style-substrate-migration.md
@blove
blove enabled auto-merge (squash) August 29, 2026 22:26
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview Aug 29, 2026 10:29pm

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 425a0b5 into main Aug 29, 2026
24 checks passed
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