el-beeswarm
Version:
<div style="display: flex; padding: 1rem; flex-direction: column; align-items: center; justify-content: center; height: 100vh; text-align: center; display: flex;
25 lines (17 loc) • 521 B
JavaScript
// @ts-nocheck
;
const rangeOperators = ['>=', '<=', '>', '<', '='];
const styleSearch = require('style-search');
module.exports = function (atRule, cb) {
if (atRule.name.toLowerCase() !== 'media') {
return;
}
const params = atRule.raws.params ? atRule.raws.params.raw : atRule.params;
styleSearch({ source: params, target: rangeOperators }, (match) => {
const before = params[match.startIndex - 1];
if (before === '>' || before === '<') {
return;
}
cb(match, params, atRule);
});
};