Skip to content

chore(deps): remove primeflex - #2317

Open
isaque-bock-azion wants to merge 1 commit into
feat/local-webkit-componentsfrom
chore/remove-primeflex
Open

chore(deps): remove primeflex#2317
isaque-bock-azion wants to merge 1 commit into
feat/local-webkit-componentsfrom
chore/remove-primeflex

Conversation

@isaque-bock-azion

Copy link
Copy Markdown
Contributor

What

Fourth PR in the docs modernization stack (base: #2316). Removes the primeflex dependency.

Why it's safe

The package was only ever used for 13 utility classes across 31 files: surface-hover, surface-border, surface-section, surface-card, surface-ground, surface-0/50/200/400, text-color, text-color-secondary. Every one of them is a thin wrapper around an azion-theme CSS variable (.text-color { color: var(--text-color) }) — the values come from azion-theme, not from primeflex itself, and azion-theme stays installed regardless of this PR.

What changed

  • Recreated just those 13 classes as Tailwind v4 @utility rules in main.css, matching the pattern already used there for px-shell/px-container. The project's global @import 'tailwindcss' important already forces !important on every generated utility, matching primeflex's own !important-by-default classes — no extra flag needed.
  • Removed the primeflex/primeflex.css import from BaseLayout.astro and the primeflex entry from package.json.

Verification

  • pnpm run build:local: 1494 pages, no errors. Confirmed the compiled CSS carries the expected rules (e.g. .surface-hover{background-color:var(--surface-hover)!important}).
  • Visual check via astro preview (production build): header (surface-ground/surface-border, 24 elements using these classes on a single doc page), search dialog (surface-section panel background, real Algolia results), left sidebar (current-page item highlighted via surface-200) — all render identically to before, zero console errors.

🤖 Generated with Claude Code

The package was only used for 13 utility classes (surface-hover,
surface-border, surface-section, surface-card, surface-ground, surface-0/50/
200/400, text-color, text-color-secondary), all thin wrappers around
azion-theme's own --surface-*/--text-color* CSS variables -- primeflex's
thousands of other flex/grid/spacing utilities were unused.

Recreate just that subset as Tailwind v4 @Utility rules in main.css,
following the same pattern already used there for px-shell/px-container.
`@import 'tailwindcss' important` already applies !important to every
generated utility, matching primeflex's own !important-by-default classes,
so no extra flag is needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant