- From: Guillaume via GitHub <sysbot+gh@w3.org>
- Date: Fri, 10 Feb 2023 08:21:09 +0000
- To: public-css-archive@w3.org
cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-animations-1] Restrict `none` in `animation` and `animation-name` == [`animation`](https://drafts.csswg.org/css-animations-1/#propdef-animation) currently allows to declare `none` with other values, eg. `1s none` or `1s, none`, whereas: > `animation-name: none` is basically a special value for disabling an animation or set of animations; there's really no reason to use it with a list, only on its own, since when `animation-name` is `none` all the other properties are irrelevant. https://lists.w3.org/Archives/Public/www-style/2012Sep/0393.html Note: `1s none` or `1s, none` declare `animation-fill-mode` to `none` and implicitly declare `animation-name` to `none` or `none, none`, but they are equivalent to `1s none none` or `1s, none none` (possibly adding another `none` if supporting `animation-timeline`). I propose to restrict `none` in `animation` and `animation-name`. I think this could be hard-coded in the syntax instead of with a rule written in prose: ```diff Name: animation - Value: <single-animation># + Value: none | <single-animation># Name: animation-name - Value: [none | <keyframes-name>]# + Value: none | <keyframes-name># - <single-animation> = ... || <single-animation-timeline> || [none | <keyframes-name>] + <single-animation> = ... || <single-animation-timeline> || <keyframes-name> || ... ``` This could also apply to [`transition`](https://drafts.csswg.org/css-transitions-1/#propdef-transition) (related: #2031), [`scroll-timeline`](https://drafts.csswg.org/scroll-animations-1/#propdef-scroll-timeline), and [`view-timeline`](https://drafts.csswg.org/scroll-animations-1/#propdef-view-timeline). For `transition`: ```diff Name: transition - Value: <single-transition># + Value: none | <single-transition># Name: transition-property Value: none | <single-transition-property># - <single-transition> = [none | <single-transition-property>] || ... + <single-transition> = <single-transition-property> || ... ``` For `scroll-timeline` (and `view-timeline`): ```diff Name: scroll-timeline - Value: [<'scroll-timeline-name'> <'scroll-timeline-axis'>?]# + Value: none | [<custom-ident> <'scroll-timeline-axis'>?]# Name: scroll-timeline-name Value: none | <custom-ident># ``` Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8440 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 10 February 2023 08:21:10 UTC