Skip to content

Use shared scales for type, spacing, corners and colours - #75

Merged
gausoft merged 6 commits into
mainfrom
refactor/css-scales
Dec 4, 2026
Merged

gausoft merged 6 commits into
mainfrom
refactor/css-scales

Conversation

@gausoft

@gausoft gausoft commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Styles now come from shared scales, so a new component gets the same sizes, corners, spacing and colours as the rest of the site. It no longer picks its own values.

What changes for visitors

  • Pages are 1 to 5% more compact. Values that were close to each other (13.5px, 14px, 14.5px…) now share one step, rounded to the nearest.
  • The layout switches at four widths: 360, 640, 900 and 1180px. Three side effects:
    • the footer map now shows from 1180px;
    • the home hero, catalogue and glossary switch to their tablet layout about 100px earlier;
    • fee and coverage tables switch at 640px instead of 720px.
  • No text, data or behaviour changes.

What changes for contributors

  • site.css defines the type, radius, spacing, shadow and colour variables. A component uses them instead of raw pixel or colour values.
  • Payment method chips have a size prop and "soon" links have a tone prop. Parents no longer restyle their insides.
  • Two unused global classes are removed.
  • The country grid keeps its own breakpoints, because its column count is tied to how many countries the preview shows.

Checked

  • npm run verify passes.
  • Before/after full-page screenshots of 13 pages, desktop and mobile, English and French.
  • No horizontal overflow at 660, 1120 and 1200px.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.

Worker Status Deployment Commit
paymap Build succeeded No Preview URL was reported.
This is likely because workers.dev previews are disabled and no custom domain is enabled for previews.
2b6827d

Updated: Dec 4, 2026, 10:41 UTC | Dashboard

@gausoft
gausoft merged commit 3aca012 into main Dec 4, 2026
2 checks passed
@gausoft
gausoft deleted the refactor/css-scales branch December 4, 2026 11:03
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