Problem
The lucide-static/font/lucide.css file contains font-size: inherit; which prevents CSS utility frameworks like Tailwind CSS from overriding the icon size.
Why it's a problem
When using Tailwind CSS 4 with @layer system:
- Lucide CSS is imported without a layer, so it has higher specificity
font-size: inherit overrides Tailwind utility classes like text-lg, text-xl
- Even using
@layer tailwind-base with font-size: unset doesn't work
Proposed solutions
Option A: Remove font-size: inherit entirely
Option B: Provide a CSS custom property
font-size: var(--lucide-font-size, inherit);
Option C: Provide two CSS files
- lucide.css - current behavior
- lucide-minimal.css - without opinionated styles
Environment
- lucide-static: v0.555.0
- Tailwind CSS: v4