Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Living wiki of UI design patterns and best practices built with Fumadocs, Next.js, and Base UI components.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
rules/pseudo-first-line-styling.md
1---2title: Use ::first-line for Typographic Treatments3impact: LOW4tags: pseudo, first-line, typography5---67## Use ::first-line for Typographic Treatments89Use ::first-line for drop-cap-adjacent styling without JavaScript or hardcoded spans.1011**Incorrect (manual span):**1213```tsx14<p>15<span className={styles["first-line"]}>The opening line of this paragraph</span>16is styled differently from the rest.17</p>18```1920**Correct (native ::first-line):**2122```css23.article p:first-of-type::first-line {24font-variant-caps: small-caps;25font-weight: var(--font-weight-medium);26}27```28