Skip to content

lucide-static font: font-size: inherit prevents Tailwind CSS utility overrides #3835

@punga78

Description

@punga78

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions