source: frontend/node_modules/stylehacks/src/plugins/slash9.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago

Fix frontend appearance

  • Property mode set to 100644
File size: 687 bytes
Line 
1'use strict';
2const BasePlugin = require('../plugin.js');
3const { IE_6, IE_7, IE_8 } = require('../dictionary/browsers');
4const { VALUE } = require('../dictionary/identifiers');
5const { DECL } = require('../dictionary/postcss');
6
7module.exports = class Slash9 extends BasePlugin {
8 /** @param {import('postcss').Result=} result */
9 constructor(result) {
10 super([IE_6, IE_7, IE_8], [DECL], result);
11 }
12
13 /**
14 * @param {import('postcss').Declaration} decl
15 * @return {void}
16 */
17 detect(decl) {
18 let v = decl.value;
19 if (v && v.length > 2 && v.indexOf('\\9') === v.length - 2) {
20 this.push(decl, {
21 identifier: VALUE,
22 hack: v,
23 });
24 }
25 }
26};
Note: See TracBrowser for help on using the repository browser.