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.

21 lines
772 B

4 years ago
  1. module.exports = function(node) {
  2. node.block.children.each(function(rule) {
  3. rule.prelude.children.each(function(simpleselector) {
  4. simpleselector.children.each(function(data, item) {
  5. if (data.type === 'Percentage' && data.value === '100') {
  6. item.data = {
  7. type: 'TypeSelector',
  8. loc: data.loc,
  9. name: 'to'
  10. };
  11. } else if (data.type === 'TypeSelector' && data.name === 'from') {
  12. item.data = {
  13. type: 'Percentage',
  14. loc: data.loc,
  15. value: '0'
  16. };
  17. }
  18. });
  19. });
  20. });
  21. };