Skip to content

Primer branding: remove off-brand purple gradients and glassmorphism - #274

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
primer-branding-audit-1789012917-e76b1449a5135cda
Draft

Primer branding: remove off-brand purple gradients and glassmorphism#274
github-actions[bot] wants to merge 1 commit into
mainfrom
primer-branding-audit-1789012917-e76b1449a5135cda

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What changed

Color — Removed off-brand purple/indigo gradients and glassmorphism, flagged directly by the Primer Brand review tool (primer_brand_review):

  • .btn-assistant (rest, hover, disabled): replaced linear-gradient(135deg, var(--agent-purple), var(--agent-purple-dark)) with a flat var(--agent-purple-dark) fill; hover now lightens to var(--agent-purple) instead of a second gradient/shadow layer.
  • .copy-modal-card: replaced a radial purple gradient + box-shadow combo with a flat var(--bg-card) surface and a solid var(--agent-purple) 1px border.
  • .copy-modal::backdrop: removed backdrop-filter: blur(4px) (glassmorphism).
  • .copy-modal-icon, .copy-modal-action: replaced purple gradients with flat var(--agent-purple-dark) fills.
  • .option-card.priority-archetype: replaced a linear-gradient blue wash with a flat rgba(var(--accent-blue-rgb), 0.05) tint (same subtle highlight, no gradient).

All colors already came from existing site accent variables (--agent-purple, --agent-purple-dark, --accent-blue-rgb), so no new hex values were introduced — only the gradient/shadow/blur techniques were removed.

Guidance that motivated each change (from the primer-brand MCP server)

Ran primer_brand_review against the modified CSS sections. It returned these warnings, which drove the fixes:

  • off-brand-gradient: "A purple/indigo gradient is the classic off-brand 'SaaS' tell and is penalized hard. Use neutral surfaces with a sparing functional accent." → removed all .btn-assistant / .copy-modal-* purple gradients.
  • shadow-and-gradient: "Combining box-shadow with a gradient is a retired GitHub style. Prefer flat surfaces with thin 1px borders." → .copy-modal-card now uses a flat surface with a 1px border instead of a gradient + large box-shadow.
  • glassmorphism: "Glassmorphism / frosted blur is off-brand. Use flat surfaces separated by subtle 1px borders." → removed backdrop-filter: blur(4px) on the modal backdrop.

After the fixes, a full-file primer_brand_review re-run confirmed 0 errors and only pre-existing, lower-risk warnings remain (see below).

Deviations found but deliberately not fixed

  • hardcoded-hex on #ffffff, #f6f8fa, #24292f, #57606a, etc.: these are all var(--color-*, #hex) fallback values for Primer CSS custom properties (the standard progressive-enhancement pattern used throughout this file for browsers/contexts where @primer/css variables aren't set), not raw hardcoded colors. Leaving as-is to avoid breaking the fallback chain.
  • hardcoded-px (various pixel sizes for icon dimensions, border widths): these are fixed-size UI elements (icon squares, focus outlines) rather than layout spacing, and don't have an obvious Primer spacing-token equivalent without a larger refactor. Flagged as a follow-up.
  • pill-button (border-radius: 50% on .copy-modal-close): this is a small circular icon-only close button (×), not a CTA/label pill. Left as-is since it doesn't read as an off-brand rounded button in context.
  • The landing hero's blue→green gradient text (.landing-title) and ambient thermo glow (.landing-glow) were reviewed separately with primer_brand_review and passed clean (0 warnings for gradient/shadow/glass) — they use only Primer-aligned accent colors (blue, green) in one family, so they were kept per the "tasteful shine" allowance.

Tests / build

  • npm test: all 323 tests pass. Two existing tests asserted on the specific linear-gradient/var(--agent-purple) implementation details that this PR intentionally changes; they were updated to assert on the new flat-color implementation while preserving the same behavioral intent (subtle highlight present, hover/disabled colors correct).
  • npm run build: the Vite bundling step itself succeeds (verified directly via npx vite build). The prebuild step (scripts/fetch-vendor-assets.mjs) failed in this sandbox because outbound npm pack requests to the npm registry return 403 Forbidden — this is a pre-existing environment/network restriction, reproduced identically on a clean main checkout with no changes applied, and is unrelated to this change set.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "registry.npmjs.org"

See Network Configuration for more information.

Generated by Primer Branding · copilot · auto · 131.9 AIC · ⌖ 8.23 AIC · ⊞ 8.3K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

0 participants