[csswg-drafts] [scroll-animations] Inset parameter of ViewTimelineOptions should be optional (#11643)

nmoucht has just created a new issue for https://github.com/w3c/csswg-drafts:

== [scroll-animations] Inset parameter of ViewTimelineOptions should be optional ==
Based on the test `view-timelines/view-timeline-snapport.html`, it is expected that `ViewTimelines` without a user specified timeline inset should avoid using the scroll-padding property as the inset. However, inset is defined as below in [ViewTimelineOptions](https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface):

> ([DOMString](https://webidl.spec.whatwg.org/#idl-DOMString) or [sequence](https://webidl.spec.whatwg.org/#idl-sequence)<([CSSNumericValue](https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue) or [CSSKeywordValue](https://drafts.css-houdini.org/css-typed-om-1/#csskeywordvalue))>) inset = "auto";

This definition doesn't make it possible to differentiate the user explicitly setting inset as auto vs the default value. My suggestion is to define it as an optional like below, so we can differentiate between these two cases:

> ([DOMString](https://webidl.spec.whatwg.org/#idl-DOMString)? or [sequence](https://webidl.spec.whatwg.org/#idl-sequence)<([CSSNumericValue](https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue) or [CSSKeywordValue](https://drafts.css-houdini.org/css-typed-om-1/#csskeywordvalue))>) inset;

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11643 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 4 February 2025 02:49:46 UTC