WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
230083
Make text-decoration CSS property spec-compliant
https://bugs.webkit.org/show_bug.cgi?id=230083
Summary
Make text-decoration CSS property spec-compliant
Manuel Rego Casasnovas
Reported
2021-09-08 22:29:17 PDT
WebKit supports the old "text-decoration" property from CSS2 (
https://www.w3.org/TR/CSS2/text.html#propdef-text-decoration
), which is somehow similar to the new "text-decoration-line" property (
https://drafts.csswg.org/css-text-decor-4/#text-decoration-line-property
). Apart from that WebKit also has a shorthand "-webkit-text-decoration" that allows to set "text-decoration-line", "text-decoration-style" and "text-decoration-color" in just one delcaration. "text-decoration" is now a shorthand in the spec (
https://drafts.csswg.org/css-text-decor-4/#text-decoration-property
), so it'd be nice to remove the prefix from "-webkit-text-decoration" and make it a shorthand. Ideally including the possibility to set "text-decoration-thickness" as that's also supported in WebKit. Websites using the old CSS2 property would still keep working as "text-decoration: underline" will work without problems. And we'd add support for things like "text-decoration: green underline".
Attachments
Patch
(103.73 KB, patch)
2021-10-25 12:33 PDT
,
Tim Nguyen (:ntim)
no flags
Details
Formatted Diff
Diff
Patch
(66.51 KB, patch)
2021-12-10 07:08 PST
,
Tim Nguyen (:ntim)
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(44.43 KB, patch)
2022-08-31 17:32 PDT
,
Tim Nguyen (:ntim)
no flags
Details
Formatted Diff
Diff
Patch
(45.42 KB, patch)
2022-08-31 18:09 PDT
,
Tim Nguyen (:ntim)
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch with editing changes
(45.18 KB, patch)
2022-11-14 01:42 PST
,
Tim Nguyen (:ntim)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-09-15 22:30:31 PDT
<
rdar://problem/83182835
>
Tim Nguyen (:ntim)
Comment 2
2021-10-25 12:33:49 PDT
Created
attachment 442400
[details]
Patch
Tim Nguyen (:ntim)
Comment 3
2021-12-10 07:08:35 PST
Created
attachment 446721
[details]
Patch
EWS Watchlist
Comment 4
2021-12-10 07:09:33 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
Lorin H
Comment 5
2021-12-21 01:07:30 PST
(In reply to Tim Nguyen (:ntim) from
comment #3
)
> Created
attachment 446721
[details]
> Patch
I'm curious what's blocking this? Been patiently waiting for a few years for something along these lines to land to allow for text-decoration /w thickness without a prefix. Thanks!
Tim Nguyen (:ntim)
Comment 6
2021-12-24 10:50:52 PST
(In reply to Lorin H from
comment #5
)
> (In reply to Tim Nguyen (:ntim) from
comment #3
) > > Created
attachment 446721
[details]
> > Patch > > I'm curious what's blocking this? Been patiently waiting for a few years for > something along these lines to land to allow for text-decoration /w > thickness without a prefix. Thanks!
editing/ tests are failing unfortunately. Needs someone familiar with that code to take a look at it. Everything else in the patch works reasonably well however.
Tim Nguyen (:ntim)
Comment 7
2022-03-02 14:56:16 PST
Bug 237175
made it a shorthand, there are still some things to do to make it spec compliant (see attached patch).
Oriol Brufau
Comment 8
2022-03-02 15:07:32 PST
Some things remaining to do: - Remove -webkit-text-decoration, or make it an alias of text-decoration. - For some reason, text-decoration-thickness is inherited, it shouldn't be according to the spec. - text-decoration should parse and serialize values for any longhand, not just text-decoration-line.
Oriol Brufau
Comment 9
2022-03-14 15:57:47 PDT
In the reland of
bug 237175
I made text-decoration be a shorthand of only text-decoration-line. It should be a shorthand of all the text-decoration-* longhands. This will probably need changing the editing code like in
https://commits.webkit.org/r290756
Tim Nguyen (:ntim)
Comment 10
2022-08-12 18:02:40 PDT
***
Bug 243865
has been marked as a duplicate of this bug. ***
Tim Nguyen (:ntim)
Comment 11
2022-08-31 17:32:04 PDT
Created
attachment 462063
[details]
Patch
Tim Nguyen (:ntim)
Comment 12
2022-08-31 18:09:55 PDT
Created
attachment 462065
[details]
Patch
Tim Nguyen (:ntim)
Comment 13
2022-11-14 01:42:06 PST
Created
attachment 463517
[details]
Patch with editing changes This is a patch with Oriol's editing changes (that were reverted due to perf regression). For simplicity, I'll deal with editing in a separate patch, so we can land this easily.
Tim Nguyen (:ntim)
Comment 14
2022-11-14 02:45:10 PST
I might include editing changes after all, but restrict certain work to text-decoration to avoid perf regressions.
Tim Nguyen (:ntim)
Comment 15
2022-11-14 02:47:40 PST
Pull request:
https://github.com/WebKit/WebKit/pull/6466
Tim Nguyen (:ntim)
Comment 16
2023-06-12 22:40:18 PDT
https://bugs.chromium.org/p/chromium/issues/detail?id=165462
Brandon
Comment 17
2023-07-23 10:45:26 PDT
***
Bug 259428
has been marked as a duplicate of this bug. ***
Matthieu Dubet
Comment 18
2024-01-23 13:31:06 PST
Pull request:
https://github.com/WebKit/WebKit/pull/23121
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