fix(#3397): use existing design tokens in Astro docs#3515
Conversation
✅ Deploy Preview for goa-design-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Updates the v2 docs’ Astro base layout to stop redefining GoA design-token CSS variables inline and instead rely on the shared design token styles already imported into the layout.
Changes:
- Removed the custom
:rootdesign token overrides fromBaseLayout.astro. - Switched global base styles (body/headings/links/focus) to reference existing GoA design tokens.
There was a problem hiding this comment.
Looks good @bdfranck . A few things I noticed that we should address:
- Other files still use the removed custom properties
Most of the removed :root properties were duplicates of real V2 tokens (--goa-color-text-secondary, --goa-space-*, etc.) so those will keep working fine. But a few were not real V2 tokens, and other files still reference them:
- ExampleCard.astro uses --goa-color-border, --goa-color-background-light, --goa-color-brand, --goa-radius-s/m
- ComponentSandbox.tsx uses --goa-color-border, --goa-color-brand, --goa-radius-m (these have inline fallbacks so they won't break visually, but still worth migrating)
- GuidanceGrid.astro uses --goa-color-background-light, --goa-radius-m
We should either keep those properties in :root for now, or update those files too. We can create a separate issue for migrating them if we want to keep this PR focused.
- Inline code loses its background
code background went from --goa-color-background-light (#f5f5f5, light grey) to --goa-color-greyscale-white (#fff). Since the page background is also white, inline code blocks won't have any visual distinction. Maybe something like --goa-color-greyscale-100 to keep the contrast?
- Mobile header hardcoded values
font-size: 18px, margin-left: -8px, background: white. Since we're already in this file, these should move to tokens too.
1a76c0c to
a3b32d1
Compare
|
@twjeffery I've amended my commit with changes that address you above three comments. |
vanessatran-ddi
left a comment
There was a problem hiding this comment.
I have some comments about using a token instead of hard-code values
09641d2 to
47b2cb3
Compare
Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
|
@vanessatran-ddi I've replaced the instances you mentioned and did a find and replace of similar ones. |
Co-authored-by: bdfranck <1479091+bdfranck@users.noreply.github.com> Co-authored-by: Vanessa Tran <vanessa.m.tran@gov.ab.ca> Co-authored-by: GitHub Copilot <copilot@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Benji Franck <benjamin.franck@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Thomas Jeffery <thomaswjeffery@gmail.com> Co-authored-by: Eric Hoff <eric@highfructose.ca> Co-authored-by: Dustin Nielsen <nielsen.dustin@gmail.com> Co-authored-by: Thomas Jeffery <82968683+twjeffery@users.noreply.github.com> Co-authored-by: mxsoco <miguel.soco@gov.ab.ca> fix(#3399): correct V2 checkbox spacing behavior fix(#3493): show tooltip on hover for Work Side Menu Group fix(#3455,#3450): Updated top and bottom positioning for Popover fix(#3273): keep Side Menu Group open Closes #2893 fix the PushDrawer open prop so the docs site works (#3542) fix: use Node 22 for Netlify deploys (#3543) fix(#3397): use existing design tokens in Astro docs (#3515) fix(#3581): use dynamic content collection for nav instead of hardcoded list Closes #3581 fix(#3498): modified padding and border on radio group. fix(#3497): fixed how the Angular Calendar and DatePicker components pass Dates to the Svelte Calendar component fix(#3497): remove build dependency on tests using library code fix(#3607): update the interaction area to just around the checkbox or radio input and label fix(#3505): Fix icon click and focus on Link fix(#3673): docs site bug sweep - push drawer filters, side menu, multi-sort, responsive grids Fixes workaround (chevrons hidden after #3595) fix(#3540): add manual positioning to Popover when the browser does not support CSS anchor positioning fix(#3614): add padding for all IconSizes fix(#3411): audit and improve all component configuration examples fix(#3685): adjust width of "reveal" slot for checkbox and radio buttons fix(#3685): remove width calculation from Radio Item
|
🎉 This PR is included in version 2.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 7.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 5.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 7.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Before (the change)
The Astro layouts and components for our v2 Docs used custom design tokens that overwrote some existing ones.
After (the change)
The Astro layouts and components for our v2 Docs uses existing design tokens.
Make sure that you've checked the boxes below before you submit the PR
Steps needed to test