Opal-Estate-Pro/node_modules/csso/lib/compressor/compress/atrule/keyframes.js
2019-09-13 11:27:52 +07:00

22 lines
777 B
JavaScript
Executable File

module.exports = function(node) {
node.block.rules.each(function(ruleset) {
ruleset.selector.selectors.each(function(simpleselector) {
simpleselector.sequence.each(function(data, item) {
if (data.type === 'Percentage' && data.value === '100') {
item.data = {
type: 'Identifier',
info: data.info,
name: 'to'
};
} else if (data.type === 'Identifier' && data.name === 'from') {
item.data = {
type: 'Percentage',
info: data.info,
value: '0'
};
}
});
});
});
};