Urara-Blog/node_modules/.pnpm-store/v3/files/42/e4f515ec999d7b0a042c2fe36caabd1815673ceb13ca837aa3cf9d403c98a78c16c2b3c65a6f9d5300b6f51ad7ca0a896035c8b359585f58d585c6f61a812d-exec
2022-08-14 01:14:53 +08:00

26 lines
677 B
Text
Executable file

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