WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
296785
Decimal value for initial-letter is not accepted
https://bugs.webkit.org/show_bug.cgi?id=296785
Summary
Decimal value for initial-letter is not accepted
Frank Conijn
Reported
2025-07-31 19:38:07 PDT
Safari 18 on iOS 18 does not accept decimal values for (-webkit-)initial-letter, while Chrome 132 on Windows does. With decimal values, one can correct for a text-shadow of the initial letter.
Attachments
testcase
(766 bytes, text/html)
2025-08-03 19:15 PDT
,
Karl Dubost
no flags
Details
rendering in safari, firefox, chrome
(162.91 KB, image/png)
2025-08-03 19:16 PDT
,
Karl Dubost
no flags
Details
Patch
(12.55 KB, patch)
2025-08-11 11:02 PDT
,
alan
no flags
Details
Formatted Diff
Diff
[fast-cq]Patch
(14.07 KB, patch)
2025-08-11 15:20 PDT
,
alan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2025-08-02 12:04:57 PDT
This reproduces in Safari 26 beta on
https://developer.mozilla.org/en-US/docs/Web/CSS/initial-letter
.
Karl Dubost
Comment 2
2025-08-03 19:15:12 PDT
Created
attachment 476266
[details]
testcase Test case code. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>initial letter test-case decimal</title> <style> .normal::first-letter { -webkit-initial-letter: normal; -moz-initial-letter: normal; initial-letter: normal; } .integer::first-letter { -webkit-initial-letter: 2; -moz-initial-letter: 2; initial-letter: 2; } .decimal::first-letter { -webkit-initial-letter: 4.5; -moz-initial-letter: 4.5; initial-letter: 4.5; } p {background-color: gold; outline: 2px dashed pink;} </style> </head> <body> <p class="normal">Initial letter is normal</p> <p class="integer">Initial letter is integer: 2</p> <p class="decimal">Initial letter is decimal: 4.5</p> </body> </html>
Karl Dubost
Comment 3
2025-08-03 19:16:36 PDT
Created
attachment 476267
[details]
rendering in safari, firefox, chrome Safari Technology Preview 26.0 (224) 20622.1.20.1 Firefox Nightly 143.0a1 14325.7.28 Google Chrome Canary 140.0.7331.0 7331.0
Karl Dubost
Comment 4
2025-08-03 19:21:39 PDT
-webkit-initial-letter is being applied on macOS Safari Technology Preview. initial-letter is not yet working with unprefixed values. This is
Bug 229090
. This is also working on iOS 18.5 22F76. Or maybe I do not have the right test case ?
Karl Dubost
Comment 5
2025-08-03 19:22:57 PDT
Note also that initial-letter is not implemented in Firefox.
https://bugzilla.mozilla.org/show_bug.cgi?id=1223880
Radar WebKit Bug Importer
Comment 6
2025-08-07 19:39:14 PDT
<
rdar://problem/157808105
>
alan
Comment 7
2025-08-11 11:01:05 PDT
IFC already handles non-integral initial letter values. This fails because the computed style is integral based (IntSize).
alan
Comment 8
2025-08-11 11:02:16 PDT
Created
attachment 476357
[details]
Patch
alan
Comment 9
2025-08-11 15:20:28 PDT
Created
attachment 476362
[details]
[fast-cq]Patch
EWS
Comment 10
2025-08-12 07:32:12 PDT
Committed
298564@main
(de87c0207026): <
https://commits.webkit.org/298564@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 476362
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug