Bug 233960 - 'border-radius shorthand is getting expanded in WebKit
Summary: 'border-radius shorthand is getting expanded in WebKit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2021-12-07 16:49 PST by Mario Alzugray
Modified: 2021-12-08 07:42 PST (History)
14 users (show)

See Also:


Attachments
Patch (2.23 KB, patch)
2021-12-08 02:10 PST, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (6.56 KB, patch)
2021-12-08 03:29 PST, Antoine Quint
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Alzugray 2021-12-07 16:49:00 PST
Setting `el.style['border-radius'] = '25px'` causes webkit to modify the style string to:
<div style="border-top-left-radius: 25px; border-top-right-radius: 25px; border-bottom-right-radius: 25px; border-bottom-left-radius: 25px;" />

Example:
https://codepen.io/onedayitwillmake/pen/BawKxWm

In Chrome and Firefox the style property left as it was authored. 

The expanded version is also returned in the following scenarios:

`el.style.cssText` or `el.outerHTML`
Comment 1 Antoine Quint 2021-12-08 02:10:40 PST
Created attachment 446338 [details]
Patch
Comment 2 Antoine Quint 2021-12-08 03:29:56 PST
Created attachment 446346 [details]
Patch
Comment 3 EWS Watchlist 2021-12-08 03:30:45 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 4 Antoine Quint 2021-12-08 03:41:56 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/31953
Comment 5 EWS 2021-12-08 05:52:32 PST
Committed r286652 (244965@main): <https://commits.webkit.org/244965@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446346 [details].
Comment 6 Radar WebKit Bug Importer 2021-12-08 05:53:20 PST
<rdar://problem/86207957>