Bug 169402

Summary: transition-duration doesn't work when using CSS variables
Product: WebKit Reporter: rmmpaderes
Component: AnimationsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: dino, graouts, hyatt, jonlee, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: iPhone / iPad   
OS: iOS 10   
Attachments:
Description Flags
Test none

rmmpaderes
Reported 2017-03-08 19:38:29 PST
As the title say, using a CSS variable for transition-duration doesn't work. However, if you use -webkit-transition-duration, it'll work fine. Here's a sample CSS: :root { --accent-color: green; --duration: 500ms; } .button { transition-duration: var(--duration); transition-property: color; // Adding -webkit-transition-duration works // -webkit-transition-duration: var(--duration); } .button:active { color: var(--accent-color); }
Attachments
Test (293 bytes, text/html)
2023-05-10 10:56 PDT, Antoine Quint
no flags
Radar WebKit Bug Importer
Comment 1 2017-03-11 13:34:48 PST
Antoine Quint
Comment 2 2023-05-10 10:56:50 PDT
Created attachment 466307 [details] Test Adding a test showing this now works as expected.
Note You need to log in before you can comment on or make changes to this bug.