Urara-Blog/node_modules/.pnpm-store/v3/files/2f/33d2651c3fc91c42f92950b4386a9d393b2c27c43a67423c2eb190dfaef3529753e5e336fff6db8b01f81a0e5bb3247eb82a6722f1c69e8808e932c73fee0a-exec
2022-08-14 01:14:53 +08:00

27 lines
706 B
Text
Executable file

'use strict';
const BasePlugin = require('../plugin');
const { IE_5_5, IE_6, IE_7 } = require('../dictionary/browsers');
const { MEDIA_QUERY } = require('../dictionary/identifiers');
const { ATRULE } = require('../dictionary/postcss');
module.exports = class MediaSlash9 extends BasePlugin {
/** @param {import('postcss').Result} result */
constructor(result) {
super([IE_5_5, IE_6, IE_7], [ATRULE], result);
}
/**
* @param {import('postcss').AtRule} rule
* @return {void}
*/
detect(rule) {
const params = rule.params.trim();
if (params.toLowerCase() === 'screen\\9') {
this.push(rule, {
identifier: MEDIA_QUERY,
hack: params,
});
}
}
};