diff --git a/packages/animations/browser/src/dsl/style_normalization/web_animations_style_normalizer.ts b/packages/animations/browser/src/dsl/style_normalization/web_animations_style_normalizer.ts index 69d29c1871..2a79684e90 100644 --- a/packages/animations/browser/src/dsl/style_normalization/web_animations_style_normalizer.ts +++ b/packages/animations/browser/src/dsl/style_normalization/web_animations_style_normalizer.ts @@ -35,7 +35,7 @@ export class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer { } const DIMENSIONAL_PROP_MAP = makeBooleanMap( - 'width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent' + 'width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective' .split(',')); function makeBooleanMap(keys: string[]): {[key: string]: boolean} { diff --git a/packages/animations/browser/test/dsl/style_normalizer/web_animations_style_normalizer_spec.ts b/packages/animations/browser/test/dsl/style_normalizer/web_animations_style_normalizer_spec.ts index 98e4ff63c5..37d80efb83 100644 --- a/packages/animations/browser/test/dsl/style_normalizer/web_animations_style_normalizer_spec.ts +++ b/packages/animations/browser/test/dsl/style_normalizer/web_animations_style_normalizer_spec.ts @@ -59,6 +59,12 @@ export function main() { expect(normalize('borderWidth', 'inherit')).toEqual('inherit'); expect(normalize('paddingTop', 'calc(500px + 200px)')).toEqual('calc(500px + 200px)'); }); + + it('should allow `perspective` to be a numerical property', () => { + expect(normalize('perspective', 10)).toEqual('10px'); + expect(normalize('perspective', '100pt')).toEqual('100pt'); + expect(normalize('perspective', 'none')).toEqual('none'); + }); }); }); }