-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: multi arg transition/animation duration (#2657)
- Loading branch information
Showing
4 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor'; | ||
import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor'; | ||
import {Context} from '../../core/context'; | ||
import {CSSValue, isDimensionToken} from '../syntax/parser'; | ||
import {time} from '../types/time'; | ||
|
||
export const duration: IPropertyTypeValueDescriptor = { | ||
export const duration: IPropertyListDescriptor<number[]> = { | ||
name: 'duration', | ||
initialValue: '0s', | ||
prefix: false, | ||
type: PropertyDescriptorParsingType.TYPE_VALUE, | ||
format: 'time' | ||
type: PropertyDescriptorParsingType.LIST, | ||
parse: (context: Context, tokens: CSSValue[]) => { | ||
return tokens.filter(isDimensionToken).map((token) => time.parse(context, token)); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters