1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/csso/lib/replace/atrule/keyframes.js

22 lines
772 B
JavaScript
Raw Permalink Normal View History

2023-12-18 13:12:25 +08:00
module.exports = function(node) {
node.block.children.each(function(rule) {
rule.prelude.children.each(function(simpleselector) {
simpleselector.children.each(function(data, item) {
if (data.type === 'Percentage' && data.value === '100') {
item.data = {
type: 'TypeSelector',
loc: data.loc,
name: 'to'
};
} else if (data.type === 'TypeSelector' && data.name === 'from') {
item.data = {
type: 'Percentage',
loc: data.loc,
value: '0'
};
}
});
});
});
};