-
Notifications
You must be signed in to change notification settings - Fork 709
[scroll-animations-1] Syntax of animation-range is ambiguous #8557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
My assumption has always been that percentages resolve against the range length making |
Interesting, that's option 4, using a special case for the resolution of .source {
position: absolute;
top: 10px;
animation-timeline: view();
animation-range: contain 0% exit -10px;
} But becomes tricky when used with .source {
position: absolute;
top: 10%;
animation-timeline: view();
animation-range: contain 0% exit -10%;
} In this case |
Mine, too. Otherwise
This... seems like what I'd expect? Who knows what |
In any case, I'm pretty sure there's no ambiguity here. Should this be closed as invalid? |
I'm assuming it resolves to it's CB's
Right, but I do see use cases where it's desired to be able to have the offsets of the animation correspond to layout.
I still think we're losing the ability to use percentages as offsets like the rest of |
Since we resolved in #7575 to allow
<length-percentage>
to be used as offsets inanimation-range
, it's now possible to have a range of:Which can now mean 2 things:
.source
is at 20% of itscontain
range..source
is atcontain 0%
+ 20% of its parent's size (according to timeline's axis).In order to be able to distinguish between the 2 cases we have the following options:
contain 20%
becomescontain(20%)
<percentage>
so that it only means 1. from the options above. But that seems suboptimal.offset()
andrange()
notations so that we getoffset(contain 20%)
Anyhow, since we already have other ambiguity issues raised in #8054, I guess we could solve both by adopting either option 1 or option 3.
cc @flackr @fantasai @bramus
The text was updated successfully, but these errors were encountered: