Skip to content

Style content links: muted underline by default, brand red on hover#17

Merged
tiagov8 merged 1 commit into
mainfrom
feature/content-link-styling
May 26, 2026
Merged

Style content links: muted underline by default, brand red on hover#17
tiagov8 merged 1 commit into
mainfrom
feature/content-link-styling

Conversation

@tiagov8

@tiagov8 tiagov8 commented May 22, 2026

Copy link
Copy Markdown
Member

Summary

Adds a senior-designer-grade hover treatment to inline content links: every <a> rendered inside body copy now ships with a subtle muted underline by default and lifts to brand red on hover/focus with a small thickness + offset bump.

What the treatment does

State Color Underline color Underline thickness Offset
Default --text-neutral 35% of current color (via color-mix) 1px 3px
Hover / focus-visible --red-600 --red-500 2px 4px
Active --red-700 --red-700 2px 4px

The 3px → 4px offset shift gives a small "lift" effect that reads as intentional rather than browser-default. text-decoration-skip-ink: auto keeps the underline tidy under j and p descenders. prefers-reduced-motion: reduce disables transitions entirely so motion-sensitive users aren't surprised.

Where it's applied

A single .content-link class — opt-in, not a global p a selector that could accidentally restyle nav, CTAs, or the "Built with TinaCMS" lockup. Used on:

  • The 5 parseInlineLinks anchors inside descriptions/lead text (benefits lead, services AI-assisted, how-it-works Step 03, why-SSW Practical AI adoption, why-SSW Strong engineering standards) — these link out to ssw.com.au rule pages
  • The contact form's privacy policy link
  • The footer's Terms & conditions link

Deliberately excluded

  • Nav links (own underline-from-below treatment)
  • Buttons (.btn family — solid backgrounds)
  • Logo / "Built with TinaCMS" anchor (decorative lockups)
  • The mailto in the contact form's error message (lives on a different branch — PR Wire contact form to Jotform #11)

Cleanup

Removes the two per-location underline rules that previously lived in landing.css (.form-actions .privacy a and .footer-bottom .legal a / :hover) — styling now lives in one place at the top of the file with a short pointer comment where each used to sit.

Test plan

  • pnpm run dev, scroll to Benefits → hover the "AI-assisted development practices" link → underline thickens, text + underline shift to brand red, smooth transition
  • Keyboard-tab to the same link → same hover state via :focus-visible
  • Footer T&C link and contact form privacy link match the new treatment
  • Nav links, hero CTAs, and "Built with TinaCMS" lockup are visually unchanged
  • Browser zoom to 200% — underline offset still reads cleanly
  • DevTools prefers-reduced-motion: reduce — link state changes are instant (no transition)

🤖 Generated with Claude Code

Adds a single .content-link class with a senior-designer-grade
treatment for every inline anchor in body copy. Default state shows
a muted underline (decoration-color = ~35% of current text via
color-mix) so links are discoverable without shouting. Hover/focus
lifts the text + underline to the brand red, bumps the underline
thickness 1px -> 2px, and increases the offset 3px -> 4px for a
subtle "rise" that reads as intentional rather than CSS default.

- Single rule, opt-in via class — no global `p a` selector that
  could accidentally restyle nav, CTAs, or the "Built with Tina" mark
- Underline-offset matches the type scale (3px default, 4px hover)
  for clean separation from descenders
- text-decoration-skip-ink: auto keeps the underline tidy under "j", "p"
- Active state darkens to red-700 to confirm the press
- prefers-reduced-motion: reduce disables transitions entirely

Applied to: the 5 parseInlineLinks anchors (benefits/services/how/why
descriptions linking out to ssw.com.au rules), the contact form's
privacy policy link, and the footer's Terms & conditions link. The
per-location underline rules they used to share (.form-actions
.privacy a, .footer-bottom .legal a:hover) are removed so styling
lives in one place; a short pointer comment is left where each rule
used to sit.

Decorative links (logo, "Built with TinaCMS") and chrome links (nav,
CTAs styled as .btn) are deliberately untouched — those carry their
own visual treatment.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ssw-website-global 7fcce6a Commit Preview URL

Branch Preview URL
May 22 2026, 10:10 PM

@tiagov8 tiagov8 merged commit 47e8e7b into main May 26, 2026
1 check passed
@0xharkirat 0xharkirat deleted the feature/content-link-styling branch June 30, 2026 00:42
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