Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
};
}
//
// Animations using keyframes
//
var animationIndex = 1;
var animationStyleSheet: any = document.createElement('style');
document.head.appendChild(animationStyleSheet);
// Test if prefix needed for keyframes (copied from PrefixFree)
var keyframesPrefixed = 'keyframes';
animationStyleSheet.textContent = '@keyframes {}';
if (!animationStyleSheet.sheet.cssRules.length) {
keyframesPrefixed = cssVendor.prefix.css + 'keyframes';
}
// Simple animation helper that injects CSS into a style object containing the
// keyframes, and returns a string with the generated animation name.
function animation(keyframes: Object): string {
var name = 'Animation' + animationIndex;
animationIndex += 1;
var rule = '@' + keyframesPrefixed + ' ' + name + ' {\n' +
Object.keys(keyframes).map((percentage) => {
var props = keyframes[percentage];
var serializedProps = CSSPropertyOperations.createMarkupForStyles(
_prefix(props)
);
return ' ' + percentage + ' {\n ' + serializedProps + '\n }';
}).join('\n') +
const jsprefix = (x) => (
`${cssVendor.prefix.js}${x}`
)
const jsprefix = x => `${cssVendor.prefix.js}${x}`
const cssprefix = (x) => (
`${cssVendor.prefix.css}${x}`
)
const cssprefix = x => `${cssVendor.prefix.css}${x}`