Bug
Lucide icons imported via lucide-react and sized with the size prop briefly render at the correct size, then shrink shortly after mount.
Reproduction
import { Star } from 'lucide-react';
<Star size={36} />
Expected behavior
The icon should render and stay at 36px, with no visible resize after mount.
Actual behavior
lucide-react's size prop sets width/height as inline SVG attributes on render. Once ArchCSS's base stylesheet loads and applies its svg.lucide rule (driven by --lucide-size, default 1.5rem), that rule overrides the inline size attributes, causing the icon to shrink from 36px down to the default 24px shortly after first paint.
Suspected cause
ArchCSS's CSS rule for svg.lucide size wins over the inline width/height set by the size prop, instead of the inline prop taking precedence when explicitly set by the developer.
Environment
- Next.js (App Router)
- ArchCSS v3.0.0-beta.2, installed via pnpm
- lucide-react, sizing via size prop (no className)
Possible fix
Remove the blanket size rule on svg.lucide (or drop the !important). Only apply width/height: var(--lucide-size) on elements that carry an ArchCSS .icon-* class. Icons rendered via lucide-react without an .icon-* class should be left untouched by ArchCSS's base styles, so the size/width/height prop set by the developer is respected as-is.
Bug
Lucide icons imported via
lucide-reactand sized with thesizeprop briefly render at the correct size, then shrink shortly after mount.Reproduction
Expected behavior
The icon should render and stay at 36px, with no visible resize after mount.
Actual behavior
lucide-react'ssizeprop setswidth/heightas inline SVG attributes on render. Once ArchCSS's base stylesheet loads and applies itssvg.luciderule (driven by--lucide-size, default1.5rem), that rule overrides the inlinesizeattributes, causing the icon to shrink from 36px down to the default 24px shortly after first paint.Suspected cause
ArchCSS's CSS rule for
svg.lucidesize wins over the inlinewidth/heightset by thesizeprop, instead of the inline prop taking precedence when explicitly set by the developer.Environment
Possible fix
Remove the blanket size rule on svg.lucide (or drop the !important). Only apply width/height: var(--lucide-size) on elements that carry an ArchCSS .icon-* class. Icons rendered via lucide-react without an .icon-* class should be left untouched by ArchCSS's base styles, so the size/width/height prop set by the developer is respected as-is.