- From: andruud via GitHub <sysbot+gh@w3.org>
- Date: Thu, 19 Sep 2019 05:42:50 +0000
- To: public-css-archive@w3.org
andruud has just created a new issue for https://github.com/w3c/csswg-drafts: == Use CSSStyleValue for scroll offsets == Just a thought: Perhaps it's appropriate to use `CSSStyleValue` from css-typed-om to get and set scroll offsets. It would allow specifying offsets in a "structured" manner, such as `CSS.px(42)` rather than `"42px"`. Specifically, this is how that could look: ``` // Set: const timeline = new ScrollTimeline({ // ... startScrollOffset: CSS.px(10), endScrollOffset: new CSSKeywordValue('auto') // ... }); // Get: console.log(timeline.startScrollOffset); // -> CSSUnitValue {value: 10, unit: "px"} console.log(timeline.endScrollOffset); // -> CSSKeywordValue {value: "auto"} ``` Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4352 using your GitHub account
Received on Thursday, 19 September 2019 05:42:51 UTC