SVG
Covers: inline SVG, SVG color styling, fill, stroke, currentColor, and SVG markup conventions.
- Omit
xmlnson inline<svg>in HTML/JSX: only needed for standalone.svgfiles - Style SVG colors with Tailwind classes (
fill-*,stroke-*,text-*withfill="currentColor"/stroke="currentColor"), not hardcoded attributes or ternaries: usedata-*/aria-*variants or conditional classes to switch colors - Never combine
fill="currentColor"/stroke="currentColor"attributes withfill-*/stroke-*classes on one element (they conflict): usefill-current/stroke-currentto inherit text color, or drop the attribute when using a specific class likefill-zinc-400