CSS Blockquote with Gradient Drop Cap

CSS Blockquote with Gradient Drop Cap

A unique drop cap is created with modern CSS techniques - its complex background is generated by layering linear-gradient and repeating-conic-gradient, while its responsive size is managed by calc().

Drop Cap, Please!

Drop Cap, Please!

A creative “torn paper” text effect powered by SVG filters such as feTurbulence and feDisplacementMap for realistic edge distortion. This snippet showcases advanced CSS pseudo-element styling and fluid typography, providing a lightweight and high-performance solution for organic UI design.

See the Pen Drop Cap, Please!.

Big Drop Cap

Big Drop Cap

The demo showcases a classic yet relevant technique for creating an extra-large drop cap via :first-letter using negative horizontal margins (margin-right: -1000px) and line-height: 1, allowing the element not to affect the main text flow, thus ensuring clean typography.

See the Pen Big Drop Cap.

Frequently Asked Questions

What is the structural advantage of using the modern CSS initial-letter property over traditional floating ::first-letter hacks?

The initial-letter property automatically calculates both the proportional font size and exact baseline vertical alignment relative to the surrounding line heights. Traditional methods require hacky float, custom padding, and negative margin combinations that constantly break when font families, viewport widths, or body line heights are dynamically modified.

How do the dual parameter values inside initial-letter: 3 2; operate mathematically?

The first parameter defines the size of the initial letter in terms of the number of text lines it should span (3 lines tall). The second, optional parameter specifies the sink, which indicates how many lines down into the paragraph the letter should drop (sinking 2 lines down), leaving the remaining height to extend above the baseline as a raised cap.

How do we ensure that CSS drop caps remain fully accessible to screen readers and assistive technologies?

Styling a drop cap using the native ::first-letter pseudo-element and initial-letter property preserves the semantic integrity of the DOM text because no wrapper elements are inserted. This guarantees that screen readers parse the starting word as a single coherent string, avoiding the accessibility bugs of legacy systems that isolated the first letter inside separate span tags.

Why do custom web fonts sometimes cause rendering alignment shifts on initial caps, and how are they resolved?

Different web fonts have unique cap-height scales and glyph metrics, causing the initial letter to sometimes align poorly with adjacent lines. Resolve this in Blink-based engines by utilizing the @supports query to apply custom padding-top offsets or explicitly declaring the initial-letter-align property to align the cap-height to the baseline.

What is the safest progressive enhancement strategy for browsers (such as Firefox) that do not support the native initial-letter property?

Structure your styles using progressive enhancement by wrapping the modern layout rules inside an @supports (initial-letter: 3) block. For unsupported browsers, provide a robust fallback by applying a slightly enlarged font-size and a standard float: left transition to the ::first-letter selector to maintain editorial hierarchy.