Skip to content

fix(css): greedy safelist for fl-button to fully restore brand red#338

Merged
pftg merged 1 commit into
masterfrom
fix/safelist-greedy-fl-button
May 11, 2026
Merged

fix(css): greedy safelist for fl-button to fully restore brand red#338
pftg merged 1 commit into
masterfrom
fix/safelist-greedy-fl-button

Conversation

@pftg
Copy link
Copy Markdown
Member

@pftg pftg commented May 11, 2026

Follow-up to #337 — incomplete fix

After #337 merged, production showed mixed state:

  • Header "Contact Us" button: red ✓ (.btn.btn-primary rule survived)
  • Hero "Talk to an Expert", card "Explore Use Cases": still blue pill ✗ (a.fl-button rule still purged)

Root cause: PurgeCSS's safelist.standard treats class-only selectors (.btn.btn-primary) and tag+class compound selectors (a.fl-button) differently. Adding fl-button to standard was enough to preserve .fl-button { ... } rules but NOT a.fl-button { ... } rules.

Fix

Move fl-button, btn, action-button from safelist.standard to safelist.greedy. Greedy preserves any rule whose selector mentions one of these classes regardless of tag prefix or compound structure.

Patterns added to greedy:

  • /^fl-button/
  • /^btn/
  • /^action-button/

Verification

Local build inlined navigation <style> now contains:

.fl-button-wrap a, a.fl-button, a.fl-button:visited {
  background-color: #cc342d !important;
  border-radius: 8px !important;
  ...
}

This rule was missing from production after #337 (despite fl-button in standard safelist). After this PR, it survives PurgeCSS.

🤖 Generated with Claude Code

…verride

Follow-up to #337: standard safelist preserved .btn.btn-primary
(class-only selector matched) but failed for a.fl-button
(tag+class compound). PurgeCSS treats class-only and tag+class
selectors differently for safelist matching, and only the class-only
rule survived. Result: Contact Us header button got brand red,
but hero CTAs ("Talk to an Expert", "Explore Use Cases") stayed
default blue pill.

Move fl-button, btn, action-button to safelist.greedy — preserves any
rule whose selector mentions these classes regardless of tag prefix.

Verified locally: red rule appears in inlined navigation <style>:
  .fl-button-wrap a, a.fl-button, a.fl-button:visited {
    background-color: #cc342d !important;
    border-radius: 8px !important;
    ...
  }

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@pftg has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 23 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eadfcbad-dfcd-49fc-8f95-6cb80794c912

📥 Commits

Reviewing files that changed from the base of the PR and between d3ef9cb and 2c59f0c.

📒 Files selected for processing (1)
  • postcss.config.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/safelist-greedy-fl-button

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pftg pftg merged commit cb50ec4 into master May 11, 2026
3 checks passed
@pftg pftg deleted the fix/safelist-greedy-fl-button branch May 11, 2026 07:25
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