fix(css): greedy safelist for fl-button to fully restore brand red#338
Conversation
…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>
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Follow-up to #337 — incomplete fix
After #337 merged, production showed mixed state:
.btn.btn-primaryrule survived)a.fl-buttonrule still purged)Root cause: PurgeCSS's
safelist.standardtreats class-only selectors (.btn.btn-primary) and tag+class compound selectors (a.fl-button) differently. Addingfl-buttontostandardwas enough to preserve.fl-button { ... }rules but NOTa.fl-button { ... }rules.Fix
Move
fl-button,btn,action-buttonfromsafelist.standardtosafelist.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:This rule was missing from production after #337 (despite
fl-buttonin standard safelist). After this PR, it survives PurgeCSS.🤖 Generated with Claude Code