Bug 262998

Summary: @property initial-value of length syntax using v* units works but is static
Product: WebKit Reporter: Jane Ori <janeori>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: heycam, ntim
Priority: P2    
Version: Safari 16   
Hardware: Unspecified   
OS: Unspecified   

Description Jane Ori 2023-10-10 21:02:05 PDT
URLs (if applicable) : https://codepen.io/propjockey/pen/RwEdwvd/bb689a16bf96d84d9bfaa570da358e24?editors=1100
Other browsers tested:
     Chrome: same https://bugs.chromium.org/p/chromium/issues/detail?id=1491644
    Firefox: N/A
       Edge:

What steps will reproduce the problem?
(1) register a length property that defaults to 100vh or 100vw etc
(2) use the property
(3) resize the window

What is the expected result?

it should probably update the value or be a syntax error to use v* units in initial-value... maybe?


What happens instead?

the value does not update instead it stays locked to the px size of the screen when it loaded, which is interesting but probably not intended

initial-value is currently spec'd to be computationally independent so I suspect v* units should not be allowed at all there?

Here is a reduced test case, resize to see it happen:
https://codepen.io/propjockey/pen/RwEdwvd/bb689a16bf96d84d9bfaa570da358e24?editors=1100

Thank you!
// Jane
Comment 1 Tim Nguyen (:ntim) 2023-10-11 04:19:33 PDT
The codepen seems to work properly on Safari Technology Preview. Can you give it a try there?

I think bug 255689 might have fixed this.
Comment 2 Jane Ori 2023-10-14 09:06:28 PDT
Just updated tech preview to 17.4, indeed fixed, thank you!