source: trip-planner-front/node_modules/csso/lib/clean/TypeSelector.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 599 bytes
Line 
1// remove useless universal selector
2module.exports = function cleanTypeSelector(node, item, list) {
3 var name = item.data.name;
4
5 // check it's a non-namespaced universal selector
6 if (name !== '*') {
7 return;
8 }
9
10 // remove when universal selector before other selectors
11 var nextType = item.next && item.next.data.type;
12 if (nextType === 'IdSelector' ||
13 nextType === 'ClassSelector' ||
14 nextType === 'AttributeSelector' ||
15 nextType === 'PseudoClassSelector' ||
16 nextType === 'PseudoElementSelector') {
17 list.remove(item);
18 }
19};
Note: See TracBrowser for help on using the repository browser.