1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/clean-css/lib/selectors/remove-duplicate-media-quer...

22 lines
478 B
JavaScript

var stringifyAll = require('../stringifier/one-time').all;
function removeDuplicateMediaQueries(tokens) {
var candidates = {};
for (var i = 0, l = tokens.length; i < l; i++) {
var token = tokens[i];
if (token[0] != 'block')
continue;
var key = token[1][0] + '%' + stringifyAll(token[2]);
var candidate = candidates[key];
if (candidate)
candidate[2] = [];
candidates[key] = token;
}
}
module.exports = removeDuplicateMediaQueries;