flackr / scroll-timeline

A polyfill of ScrollTimeline.
Apache License 2.0
890 stars 84 forks source link

Use CSSnumericValue.parse() when parsing range start and end #180

Closed johannesodland closed 6 months ago

johannesodland commented 7 months ago

Depends on https://github.com/flackr/scroll-timeline/pull/176, https://github.com/flackr/scroll-timeline/pull/177 and https://github.com/flackr/scroll-timeline/pull/178.

This PR uses CSSNumericValue.parse() to parse string values for range start and range end. This adds support for math functions such as calc(100% - 20px).

The PR includes – Naive implementation of CSSNumericValue.parse() in proxy-cssom.js.

This PR does not include: – Support for relative units such as *vh in the calculations. This must be added in a separate PR.