Skip to content

Commit 90a75a1

Browse files
committed
feat: create separate stylesheet for keyframes
1 parent fd74dbf commit 90a75a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

addon/keyframes.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ exports.addon = function (renderer) {
55
require('./__dev__/warnOnMissingDependencies')('keyframes', renderer, ['putRaw', 'put']);
66
}
77

8+
if (renderer.client) {
9+
// Craete @keyframe Stylesheet `ksh`.
10+
document.head.appendChild(renderer.ksh = document.createElement('style'))
11+
}
12+
813
var putAtrule = renderer.putAtrule;
914

1015
renderer.putAtrule = function (__, keyframes, prelude) {
@@ -25,7 +30,7 @@ exports.addon = function (renderer) {
2530
str = prelude + '{' + str + '}';
2631

2732
if (renderer.client) {
28-
renderer.sh.appendChild(document.createTextNode(str));
33+
renderer.ksh.appendChild(document.createTextNode(str));
2934
} else {
3035
renderer.raw += str;
3136
}

0 commit comments

Comments
 (0)