Skip to content

Restore blog drop caps in Safari/iOS - #152

Merged
3mdistal merged 1 commit into
mainfrom
fix/safari-drop-caps
Sep 25, 2026
Merged

3mdistal merged 1 commit into
mainfrom
fix/safari-drop-caps

Conversation

@3mdistal

Copy link
Copy Markdown
Owner

Problem

Drop caps on blog posts show up at normal size on iOS (and desktop Safari). The first letter gets the serif font and a gap after it, but it's no bigger than the rest of the text.

Cause

Safari only supports -webkit-initial-letter. We only ever wrote the unprefixed initial-letter. Until now, Vite 7's esbuild CSS minifier added the prefix for us. The Vite 8 upgrade (#151) switched CSS minification to Lightning CSS, and it doesn't add this prefix. I checked this locally: with Safari 16 targets, Lightning CSS turns initial-letter: 2 into just initial-letter:2.

Fix

Add -webkit-initial-letter: 2 next to the unprefixed declaration in src/lib/styles/prose.css. Lightning CSS keeps both in the minified output.

Testing

  • pnpm lint passes
  • Ran the stylesheet through Lightning CSS 1.33 locally and confirmed the output contains -webkit-initial-letter:2;initial-letter:2
  • Not yet checked on a real iPhone. Please look at a blog post on the Vercel preview.

🤖 Generated with Claude Code

Vite 8 minifies CSS with Lightning CSS, which does not add the
-webkit-initial-letter prefix that esbuild previously inserted.
Safari only supports the prefixed property, so drop caps collapsed
to normal-sized letters on iOS.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
alicealexandra.com Ready Ready Preview, v0 Sep 25, 2026 11:38am UTC

@3mdistal
3mdistal merged commit f7e2bfb into main Sep 25, 2026
3 checks passed
@3mdistal
3mdistal deleted the fix/safari-drop-caps branch September 25, 2026 11:45

This branch was successfully deployed

1 active deployment
Preview — 447211a1 Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant