From 6d2648258382d745f2b755f83df5b73538cba934 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Thu, 9 Nov 2023 15:19:31 +0000 Subject: [PATCH] fix: skip keyframes with webkit prefix (#1826) If an SVG features `keyframes` with the `-webkit` prefix, it would throw an error before. This will treat them the same as regular `keyframes`. --- lib/style.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/style.js b/lib/style.js index a8f3b9986..a0469b50e 100644 --- a/lib/style.js +++ b/lib/style.js @@ -88,7 +88,10 @@ const parseStylesheet = (css, dynamic) => { return csstreeWalkSkip; } if (cssNode.type === 'Atrule') { - if (cssNode.name === 'keyframes') { + if ( + cssNode.name === 'keyframes' || + cssNode.name === '-webkit-keyframes' + ) { return csstreeWalkSkip; } csstree.walk(cssNode, (ruleNode) => {