Bug 241475 - Allow keywords in CSS custom property fallback
Summary: Allow keywords in CSS custom property fallback
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 15
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-09 10:43 PDT by Shaw Jia
Modified: 2022-06-13 22:50 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shaw Jia 2022-06-09 10:43:49 PDT
Allow the use of keywords in custom property fallback.

One useful use case is to allow the use of "revert" to use user-agent stylesheet value as fallback.

Ex: * {display:var(--display,revert); --display:initial}

The example may seem redundant, but becomes useful with more complex logic such as responsive variants, modular scale for font sizes etc.

Firefox already supports this, Chrome is in the process of fixing it in https://bugs.chromium.org/p/chromium/issues/detail?id=1105782
Comment 1 Radar WebKit Bug Importer 2022-06-10 10:08:02 PDT
<rdar://problem/94822036>