-
Notifications
You must be signed in to change notification settings - Fork 716
[scroll-animations-1] Explicit auto
for animation-duration
in the animation
shorthand.
#8656
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
@fantasai do we have a precedent of values that can't be explicitly defined? And only be declared as their default value if they're omitted? |
Yes, there are a number of them. Whole properties might not be specificiable ("reset-only sub-properties"), and within properties that are specificable, there are several where longhands can express a combination that can't be written in the serialization. (My brain refuses to cough up an example, but it's the whole reason we have the "serialize as empty string" behavior for shorthands in CSSOM.) For the issue at hand, I'm not too concerned with the potential "auto" conflict for animation names (seems like a very unlikely name), but I am more concerned about this being the only property that currently takes an auto keyword, and it claiming that keyword in the shorthand for the future, when it doesn't even need it (due to that being the initial value). I'm usually against values that can only be expressed via absence, but in this case I think it's fine. |
I suggested to accept As far as I know, I do not really have a problem with serializing
Even if the author declared For authors, this would be the only sub-property of |
+1 to @cdoublev's proposal.
It appears that
That claim can be easily satisfied by explicitly specifying |
Also in favor of allowing |
It does seem simpler than having extra serialization complexity / oddness for the shorthand due to: the first value in each that can be parsed as a is assigned to the 'animation-duration'.
Restating to make sure I understand, the problem is if we want to allow auto for some of the other longhands we wouldn't be able to make them accept That said, these time-accepting properties are the only current form of measurement/length in the animation property. I think there's precedent in other shorthands, e.g. |
I think we currently have 2 scenarios that require
For case 1 omitting seems fine, since delays are ignored anyway and ranges are used instead. For case 2, this is still being considered, but AFAICT there won't be an option to set only |
|
The CSS Working Group just discussed
The full IRC log of that discussion<TabAtkins> flackr: scroll-driven animations, we want them to implicitly/automatically use auto duration, which matches their animation range<TabAtkins> flackr: So this raises whether "auto" can be used in the animation shorthand. <TabAtkins> flackr: Tab suggested this is implied by omission, but this makes it impossible to represent a non-zero delay (since duration has to exist before a delay). <TabAtkins> flackr: So I suggest we do allow "auto" explicitly. <TabAtkins> flackr: This is similar to other properties like background <TabAtkins> dbaron: Are there any other things in the animation shorthand that take "auto"? <miriam> ack dbaron <TabAtkins> flackr: No, besides animation-name of course <TabAtkins> fantasai: I think we discussed having delay potentially be auto <TabAtkins> flackr: Right, no conflict because delay is already positionally unambiguous with duration <TabAtkins> flackr: Only concern is if a non-time property takes auto <TabAtkins> +1 <TabAtkins> proposed resolution: accept "auto" as an animation-duration in the animation shorthand <TabAtkins> miriam: Objections? <TabAtkins> RESOLVED: accept "auto" as an animation-duration in the animation shorthand |
As a follow up to #6530, @cdoublev filed #8570 to allow
auto
to be parsed in as a value foranimation-duration
when listed in theanimation
shorthand. This issue is to discuss whether we want to do that, given the complications of parsinganimation
.Pros:
animation-duration
to be inlined into theanimation
property.Cons:
auto
. This is unlikely to be a cause problems with keyframes names (which are unlikely to be named “auto”), but it could prevent us from easily inlining some other longhand ofanimation
in the future.Notes:
auto
value foranimation-duration
in theanimation
shorthand by simply omitting the duration, since it's the initial value.Opening this issue to invite discussion about which way to go here.
The text was updated successfully, but these errors were encountered: