You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
764 B
22 lines
764 B
2 years ago
|
export default function(node) {
|
||
|
node.block.children.forEach((rule) => {
|
||
|
rule.prelude.children.forEach((simpleselector) => {
|
||
|
simpleselector.children.forEach((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'
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
};
|