keyframes.js 772 B

123456789101112131415161718192021
  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. };