Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CSS.registerProperty({
- name: '--animation-duration',
- syntax: '<time>',
- inherits: false,
- initialValue: '1s'
- });
- .my-el {
- --animation-duration: 1.5s;
- }
- const duration = CSSNumericValue.parse(getComputedStyle(el).getPropertyValue('--ripple-anim-duration')).to('ms').value; // 1500
- const duration = properties.get('--ripple-anim-duration').to('ms').value; // 1500
- const duration = el.attributeStyleMap.get('--ripple-anim-duration').to('ms').value; // ¯_(ツ)_/¯
Add Comment
Please, Sign In to add comment