Bug 276156 - text-decoration-thickness does not render properly with display flex or grid
Summary: text-decoration-thickness does not render properly with display flex or grid
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 17
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2024-07-02 16:16 PDT by Sam Warnick
Modified: 2024-07-04 15:07 PDT (History)
6 users (show)

See Also:


Attachments
rendering in safari, firefox, chrome (327.41 KB, image/png)
2024-07-02 20:51 PDT, Karl Dubost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Warnick 2024-07-02 16:16:11 PDT
Example: https://codepen.io/samwarnick/pen/ExzqLWp

In the example I have 3 anchor elements all styled with text-decoration-thickness: 4px. Only the anchor element with display block (or inline-block) renders the thickness correctly. If display is flex or grid, it appears to render as the default 1px thickness.

Seeing it in Safari 17.5 on macOS 14.5, but also same issue in Safari 18 beta on iPad OS. Renders as expected in Chrome and Firefox.
Comment 1 Karl Dubost 2024-07-02 20:51:42 PDT
Created attachment 471803 [details]
rendering in safari, firefox, chrome

Safari Technology Preview  197           20619.1.18
Firefox Nightly            129.0a1       12924.6.27
Google Chrome Canary       128.0.6572.0  6572.0


with the code in the example being

<style>a {text-decoration-thickness: 4px;}</style>
<a href="#" style="display: block">block</a>
<a href="#" style="display: flex">flex</a>
<a href="#" style="display: grid">grid</a>
Comment 2 Radar WebKit Bug Importer 2024-07-02 20:52:26 PDT
<rdar://problem/131020810>
Comment 3 fantasai 2024-07-03 10:03:19 PDT
Guessing we need to update this code here? TextDecorationPainter.cpp/ collectStylesForRenderer()
https://searchfox.org/wubkat/source/Source/WebCore/rendering/TextDecorationPainter.cpp#323
Comment 4 Karl Dubost 2024-07-04 15:07:12 PDT
There are multiple issues around this depending on the browser, the text and the font-size.
https://codepen.io/webcompat/pen/mdYNjKa