w3c / w3c/csswg-drafts

[scroll-animations-1] Allow specifying small/large viewport for ViewTimelines that use the root viewport as scrollport

Open
#11,615 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scroll-animations-1
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

ViewTimelines depend on the size of the scrollport, and in cases where that is the root viewport, this is a dynamic value that may change, and when it changes this causes a visual jump in animations.

This causes a visual nuisance that is avoided when authors use JS-based polyfills by using either the small or large viewport units, but it's currently not possible in the native implementation.

So, proposing to allow authors to specify whether to use small/large viewport units, which will only take effect when used with the root scroller.
Adding a new property to ViewTimelineOptions, (name TBB) unit-size with values small, large, and auto.

cc @bramus @flackr @fantasai

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked Scroll Animations specification section on view-progress visibility ranges and the ViewTimelineOptions dictionary. Clarify the property name and semantics for small, large, and auto values, including when the root scroller is used; done means the proposal is resolved and the specification reflects the agreed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.