Skip to content

Commit

Permalink
fix: skip keyframes with webkit prefix (#1826)
Browse files Browse the repository at this point in the history
If an SVG features `keyframes` with the `-webkit` prefix, it would throw
an error before. This will treat them the same as regular `keyframes`.
  • Loading branch information
SethFalco committed Nov 9, 2023
1 parent 96fedb4 commit 6d26482
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 6d26482

Please sign in to comment.