Add full support for the CSS text-transform property following the established pattern for inherited text properties (white-space, letter-spacing). The transform is applied after whitespace normalization and before text measurement in box tree construction. Key design decisions: - Uses Cow<str> return type to avoid allocations for the common None case - Capitalize uses whitespace-only word boundaries (matching browser behavior) - Applied to all text content paths: text nodes, pseudo-elements, form controls - 10 WPT tests promoted to pass, 3 shaping tests demoted (pixel mismatch) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
403 B
HTML
19 lines
403 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
body { margin: 0; font-size: 16px; }
|
|
.upper { text-transform: uppercase; }
|
|
.lower { text-transform: lowercase; }
|
|
.cap { text-transform: capitalize; }
|
|
.none { text-transform: none; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p class="upper">hello world</p>
|
|
<p class="lower">HELLO WORLD</p>
|
|
<p class="cap">hello world foo</p>
|
|
<p class="none">Hello World</p>
|
|
</body>
|
|
</html>
|