feat(theme): adopt @aziontech/webkit and migrate to its design tokens - #2320
Open
isaque-bock-azion wants to merge 1 commit into
Open
feat(theme): adopt @aziontech/webkit and migrate to its design tokens#2320isaque-bock-azion wants to merge 1 commit into
isaque-bock-azion wants to merge 1 commit into
Conversation
Installs @aziontech/webkit@4.3.0 + @aziontech/theme@4.3.0 and moves every component off the legacy azion-theme design system, which is removed. The tokens live in @aziontech/theme (webkit depends on it): a single dist/v4/globals.css that registers the whole scale as native Tailwind v4 `@theme` tokens plus ready-made `@utility` classes. There is no preset or config step, so **tailwind.config.cjs is deleted**. What it still carried moved into src/styles/main.css as CSS-first equivalents: - class-based dark mode -> `@custom-variant dark (&:where(.dark, .dark *))` - the mono family -> a two-line `@theme` block Its custom color scale and breakpoints are now the theme's own; the three `max-w-xl xxxl:max-w-xxl` layout sites moved to the theme scale (`max-w-5xl 2xl:max-w-6xl`, 1200->1192px and 1600->1536px). Token mapping applied across 31 files (class usages) and every `var()` reference: --text-color -> --text-default, --text-color-secondary -> --text-muted, --text-color-link(-hover) -> --text-link(-hover), --surface-hover -> --bg-hover, --surface-border -> --border-default, --surface-section/-0 -> --bg-surface, --surface-card/-50 -> --bg-surface-raised, --surface-ground -> --bg-canvas, --surface-200 -> --bg-selected, --primary-text-color -> --primary-contrast, --secondary-button-* -> --secondary/--secondary-contrast, --p-tag-* -> the --success/--warning/--danger status tokens. The legacy `@utility surface-*` / `text-color*` block added for the primeflex removal is gone: those are the theme's own utilities now. Components: Tag, Divider, LinkButton, HeroButton, Header, HeaderMenuNav, HeaderRightSidebar, Breadcrumb, SelectLang, DropdownThemeSwitcher, SystemStatus, ArticleNavigation, CardBase, ReadableContent, AlgoliaInstantSearch. All PrimeVue-era `.p-*` class names are gone (they were styled by azion-theme's SCSS, so they would have rendered unstyled), rebuilt with the theme's tokens/utilities per the webkit styling rules -- no hardcoded hex left. The three orphaned vendored stylesheets are deleted and the surviving one is renamed src/styles/base.css, since it is now just base resets and font-family helpers. Three real bugs found and fixed along the way: - The site is now theme-aware through tokens alone: the `dark:` variants and the `text-white`/`bg-header` classes on the header, footer and body are gone. `bg-header`/`border-header`/`bg-header-button-hover` had been dead since the azion-webkit removal (they came from its v3 config and generate no CSS), which left the header forcing white text on a light background in the light theme. - `@aziontech/theme` sets no color on `body`, so the document fell back to the browser default (black) and anything relying on inheritance -- the whole left sidebar nav -- was invisible in the dark theme. base.css now sets `color: var(--text-default)`. - LinkButton/HeroButton/CardBaseClickable now carry `not-prose`. Their label color was being overridden by ReadableContent's `prose-a:*` utilities: this repo imports Tailwind in important mode, so those land as `!important` inside `@layer utilities`, and for `!important` declarations the cascade inverts layer order -- a layered `!important` beats an unlayered one regardless of specificity, so the component's scoped style could never win. `not-prose` is the typography plugin's own opt-out and the only reliable fix; the earlier specificity-based attempt at this bug never actually worked. Also adds `vue-demi: true` to pnpm-workspace.yaml allowBuilds -- it arrives via @aziontech/webkit -> @vueuse/core and pnpm 11 fails the install without an explicit decision. Build verified: 1494 pages, no errors, and the semantic utilities confirmed present in the compiled CSS. Exercised in the browser against an `astro preview` production build, in BOTH themes: theme switcher, left sidebar (#FAFAFA dark / #141414 light), TOC, breadcrumb, header buttons, content Tag badges, secondary LinkButtons (1179 content usages) and the Algolia search dialog -- zero console errors. Note for review: `severity="secondary"` LinkButtons -- the "Get Started" buttons, 1179 of them in content -- change from a subtle dark grey to a solid white button in the dark theme. That is the design system's intent (`--secondary` is an inverted high-contrast button; @aziontech/webkit's own Button maps its `secondary` kind to exactly these tokens), but it is the most visible change here and worth a design sign-off.
isaque-bock-azion
requested review from
a team,
bruno-andrade-azion,
marcus-souza-azion and
pedro-ribeiro-azion
as code owners
August 20, 2026 00:35
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.
What
Sixth PR in the docs modernization stack (base: #2318). Installs
@aziontech/webkit@4.3.0+@aziontech/theme@4.3.0and migrates every component off the legacyazion-themedesign system, which is removed.How the new design system works
Worth knowing before reviewing: the tokens are not in
@aziontech/webkit— they live in the sibling@aziontech/theme(webkit depends on it). It publishes a singledist/v4/globals.cssthat registers the entire scale as native Tailwind v4@themetokens plus ready-made@utilityclasses (bg-surface,text-muted,border-default, …). There is no preset, plugin, or config step.Consequence:
tailwind.config.cjsis deleted. What it still carried moved into main.css as CSS-first equivalents — class-based dark mode became@custom-variant dark (&:where(.dark, .dark *)), and the mono font became a two-line@themeblock. Its custom color scale and breakpoints are now the theme's own; the threemax-w-xl xxxl:max-w-xxllayout sites moved to the theme scale (max-w-5xl 2xl:max-w-6xl, i.e. 1200→1192px and 1600→1536px — approximate by design).Token mapping
Applied across 31 files (class usages) and every
var()reference:--text-color/-secondary--text-default/--text-muted--text-color-link(-hover)--text-link(-hover)--surface-hover--bg-hover--surface-border--border-default--surface-section/--surface-0--bg-surface--surface-card/--surface-50--bg-surface-raised--surface-ground--bg-canvas--surface-200--bg-selected--primary-text-color--primary-contrast--secondary-button-*--secondary/--secondary-contrast--p-tag-*--success/--warning/--danger(+-contrast)The
@utility surface-*/text-color*block added during the primeflex removal (#2317) is gone — those are the theme's own utilities now.All PrimeVue-era
.p-*class names are also gone. They were styled byazion-theme's SCSS, so leaving them would have rendered those components unstyled; they were rebuilt with the theme's tokens/utilities following webkit's own styling rules. Zero hardcoded hex remains. Three orphaned vendored stylesheets are deleted and the survivor is renamed tosrc/styles/base.css, since it is now just base resets and font-family helpers.Three real bugs found and fixed
dark:variants and thetext-white/bg-headerclasses on the header, footer and body are gone.bg-header/border-header/bg-header-button-hoverhad been dead since the azion-webkit removal (they came from its v3 config and generate no CSS) — which left the header forcing white text on a light background in the light theme. Verified against the previous build's CSS that this predates the PR.@aziontech/themesets no color onbody, so the document fell back to the browser default (black) and anything relying on inheritance — the entire left sidebar nav — disappeared in dark mode.base.cssnow setscolor: var(--text-default).not-proseon LinkButton/HeroButton/CardBaseClickable. Their label color was being overridden by ReadableContent'sprose-a:*utilities. This repo imports Tailwind in important mode, so those land as!importantinside@layer utilities— and for!importantdeclarations the cascade inverts layer order, meaning a layered!importantbeats an unlayered one regardless of specificity. The component's scoped style could never win.not-proseis the typography plugin's own opt-out and the only reliable fix. Note this also means the earlier specificity-based attempt at this same bug (in feat(components): remove azion-webkit, port all components locally with Tailwind #2316) never actually worked.Also adds
vue-demi: truetopnpm-workspace.yamlallowBuilds— it arrives via@aziontech/webkit→@vueuse/core, and pnpm 11 fails the install without an explicit decision (this would have broken CI).Verification
pnpm run build:local: 1494 pages, no errors. Confirmed the semantic utilities actually compile into the output CSS (worth checking, since the theme ships its own Tailwind entry point).astro previewproduction build, in both themes: theme switcher, left sidebar (#FAFAFAdark /#141414light), TOC, breadcrumb, header buttons, contentTagbadges, secondaryLinkButtons, and the Algolia search dialog (panel/cards on the new surface tokens, real results, closes on Escape) — zero console errors.Needs a design sign-off
severity="secondary"LinkButtons — the "Get Started" / "View details" buttons, 1179 usages in content — change from a subtle dark grey to a solid white button in the dark theme. That is the design system's intent (--secondaryis an inverted high-contrast button, and@aziontech/webkit's ownButtonmaps itssecondarykind to exactly these tokens), but it is by far the most visible change in this PR.Two smaller intentional deviations, both documented in code:
Tag severity="info"keeps the neutral surface look rather than the theme's blueinfostatus color — it is the severity used by ~390 content badges ("Preview", "Compute", "Static"), which read as labels, not alerts.SystemStatus's status-dot colors stay as literal hex: they mirror status.azion.com's severity palette, the theme's raw color primitives are pruned from the runtime output, and there is no semantic token for "maintenance".Follow-up (not in this PR)
No
@aziontech/webkitcomponent is imported yet — this PR adopts the token layer only, keeping our own components as agreed. Swapping suitable local components (Button, Tag, Divider, Breadcrumb…) for webkit's own is the natural next step.🤖 Generated with Claude Code