securityos/node_modules/stylelint/lib/utils/parseMediaQuery.js

17 lines
400 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
const { parse } = require('@csstools/media-query-list-parser');
const getAtRuleParams = require('./getAtRuleParams');
/**
* @param {import('postcss').AtRule} atRule
* @returns {ReturnType<typeof parse>}
*/
module.exports = function parseMediaQuery(atRule) {
const mediaQueries = parse(getAtRuleParams(atRule), {
preserveInvalidMediaQueries: true,
});
return mediaQueries;
};