Skip to content

Commit

Permalink
refactor: rename .sheet to .sh
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Mar 17, 2018
1 parent 4b4a32d commit fd74dbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addon/keyframes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports.addon = function (renderer) {
str = prelude + '{' + str + '}';

if (renderer.client) {
renderer.sheet.appendChild(document.createTextNode(str));
renderer.sh.appendChild(document.createTextNode(str));
} else {
renderer.raw += str;
}
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ exports.create = function (config) {
}, config);

if (renderer.client) {
document.head.appendChild(renderer.sheet = document.createElement('style'));
document.head.appendChild(renderer.sh = document.createElement('style'));

renderer.putRaw = function (rawCssRule) {
if (process.env.NODE_ENV === 'production') {
renderer.sheet.insertRule(rawCssRule, 0);
renderer.sh.sheet.insertRule(rawCssRule, 0);
} else {
try {
renderer.sheet.sheet.insertRule(rawCssRule, 0);
renderer.sh.sheet.insertRule(rawCssRule, 0);
} catch (error) {
// eslint-disable-next-line
console.info('Could not insert CSS rule.');
console.error(error);

renderer.sheet.appendChild(document.createTextNode(rawCssRule));
renderer.sh.appendChild(document.createTextNode(rawCssRule));
}
}
};
Expand Down

0 comments on commit fd74dbf

Please sign in to comment.