Re: [csswg-drafts] [scroll-animations-1] view timeline insets (#7243)

The CSS Working Group just discussed `ViewTimeline insets`, and agreed to the following:

* `RESOLVED: view-timeline-inset takes a comma-separated list of 1 or 2 values, being autos or length-percentage`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: ViewTimeline insets<br>
&lt;TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/7243<br>
&lt;TabAtkins> bramus: the syntax for view timleine insets is you can have auto or 1-4 insets<br>
&lt;TabAtkins> bramus: but for view timlines you only need 2, basically<br>
&lt;TabAtkins> bramus: what ??? suggested in the issue is to only have two values<br>
&lt;TabAtkins> bramus: so auto, 1 value, or 2 values<br>
&lt;flackr> s/???/kevers<br>
&lt;TabAtkins> bramus: if you only have 2 values, really easy to change the axis<br>
&lt;TabAtkins> bramus: don't need to update the insets<br>
&lt;flackr> q+<br>
&lt;TabAtkins> bramus: it'll always be from beginning to end of targeted axis<br>
&lt;astearns> ack flackr<br>
&lt;TabAtkins> flackr: so for simpliciation i think this is more convenient<br>
&lt;TabAtkins> flackr: but if you had more than one viewtimeline, i wonder if it's convenient to specify the insets in terms of block and inline, and not worry about whether each timeline was block or inline direction<br>
&lt;TabAtkins> flackr: bc just having two values, we'd reinterpret based on direction of the timeline<br>
&lt;TabAtkins> bramus: suggesting diff properties based on axis?<br>
&lt;TabAtkins> flackr: It's already targeting axises, not timeline axis<br>
&lt;TabAtkins> flackr: so no change would do it<br>
&lt;TabAtkins> fantasai: two ways<br>
&lt;TabAtkins> fantasai: 1) treat like scroll timeline, doesn't matter what direction, one set of padding that applies to everything<br>
&lt;TabAtkins> fantasai: should probably rename to view-timeline-padding in that case<br>
&lt;TabAtkins> fantasai: 2) separate set of insets per timeline, comma-separated of start/end insets<br>
&lt;TabAtkins> fantasai: could have four insets per thing, and only two would apply to a timeline<br>
&lt;TabAtkins> fantasai: seems excessive<br>
&lt;TabAtkins> fantasai: not sure what's more ergonomic for authors<br>
&lt;TabAtkins> fantasai: insets per timleine, or padding that applies to everything at once<br>
&lt;TabAtkins> fantasai: one of the values is auto, where we just copy the value from scroll-padding<br>
&lt;TabAtkins> fantasai: being able to flip that on and off easily is probably useful<br>
&lt;TabAtkins> fantasai: but as for which direction is better overall, dunno<br>
&lt;flackr> qq+<br>
&lt;TabAtkins> fantasai: might require some amount of experience using this feature to know what's better<br>
&lt;astearns> ack flackr<br>
&lt;Zakim> flackr, you wanted to react to flackr<br>
&lt;TabAtkins> flackr: given you can copy scroll padding, which is 4-axis, i'd propose doing a 2-axis specific to the timeline is most ergonomic<br>
&lt;TabAtkins> flackr: If you wanna specify something that applies to all you can use scroll-padding, and this allows you to do a specific override<br>
&lt;TabAtkins> fantasai: scroll-padding has many effects tho<br>
&lt;TabAtkins> flackr: right, but if these are things that conceptually apply to all elements (including scrolling timelines), it should apply<br>
&lt;TabAtkins> fantasai: hm unsure of initial value - do we think people want them to start in the scroll padding, or when visible on page? initial should maybe be zero<br>
&lt;TabAtkins> flackr: I'd think scroll-padding is for if somethin's obscuring the top of the screen<br>
&lt;astearns> initial value 0? https://drafts.csswg.org/scroll-animations-1/#view-timeline-inset<br>
&lt;TabAtkins> fantasai: one use, but not all - might want a #target to have some breathing room, or PgDn to have some overlap<br>
&lt;TabAtkins> fantasai: so defualt in browsers is to include some overlap; scroll-padding lets your control it<br>
&lt;TabAtkins> fantasai: so many uess other than sidebar<br>
&lt;TabAtkins> fantasai: can also use it for the sidebar, because you want similar reasons<br>
&lt;TabAtkins> flackr: I think the overlap use-case is an important separate use-case, but i guess that's a different discussion<br>
&lt;TabAtkins> flackr: but i'm okay with the default not including scroll-padding<br>
&lt;TabAtkins> fantasai: yeah so that's the current initial value<br>
&lt;flackr> For example intersection observer might want to care about sidebar obscured content<br>
&lt;TabAtkins> fantasai: so what's more ergonomic for the author - something analogous to scroll-padding that sets all four edges, or separate insets per timeline, so ti's a comma-separated list<br>
&lt;TabAtkins> fantasai: can see either direction<br>
&lt;TabAtkins> flackr: I think per-timeline is more flexible<br>
&lt;TabAtkins> flackr: might be cases where different animations want different insets<br>
&lt;fantasai> TabAtkins: summary seems to be that view-timeline-inset should be a comma-separate inset of pairs<br>
&lt;fantasai> s/inset of/list of/<br>
&lt;fantasai> flackr: can be single value<br>
&lt;fantasai> TabAtkins: yeah, singles get duplicated<br>
&lt;fantasai> https://github.com/w3c/csswg-drafts/issues/7243#issuecomment-1157679915<br>
&lt;fantasai> view-timeline-inset: 10% 10%, auto, 25% 25%;<br>
&lt;TabAtkins> astearns: would that still allow the escape hatch that bramus mentioned, of making a shorthand that gives start/end in four values<br>
&lt;TabAtkins> fantasai: We could do longhands but I seriously doubt people want them to cascade independent<br>
&lt;TabAtkins> astearns: so auto/1/2 values now, can do 4 values later<br>
&lt;TabAtkins> bramus: or add longhands<br>
&lt;TabAtkins> astearns: that's the distinction, we can do longhands *or* more values<br>
&lt;TabAtkins> flackr: wait we coudln't do 4 values, that would be inconsistent<br>
&lt;TabAtkins> TabAtkins: right, 2 vs 4 wouldn't expand in the normal way<br>
&lt;TabAtkins> astearns: so we're okay with auto/1/2 for now?<br>
&lt;TabAtkins> astearns: so proposed resolution is view-timeline-inset to accept [auto | &lt;length-percentage> ]{1,2}<br>
&lt;TabAtkins> fantasai: and scroll-padding is copied over if you say auto, no change from current<br>
&lt;TabAtkins> RESOLVED: view-timeline-inset takes a comma-separated list of 1 or 2 values, being autos or length-percentage<br>
&lt;TabAtkins> flackr: relatedly we might want to do view-timeline-margin at some point<br>
&lt;TabAtkins> bramus: and whether %s are against the scroller or the element<br>
&lt;TabAtkins> bramus: that's a separate issue<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7243#issuecomment-1204110117 using your GitHub account


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

Received on Wednesday, 3 August 2022 15:29:23 UTC