source: trip-planner-front/node_modules/stylehacks/dist/plugins/leadingUnderscore.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7
8var _plugin = _interopRequireDefault(require("../plugin"));
9
10var _browsers = require("../dictionary/browsers");
11
12var _identifiers = require("../dictionary/identifiers");
13
14var _postcss = require("../dictionary/postcss");
15
16function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
18function vendorPrefix(prop) {
19 let match = prop.match(/^(-\w+-)/);
20
21 if (match) {
22 return match[0];
23 }
24
25 return '';
26}
27
28var _default = (0, _plugin.default)([_browsers.IE_6], [_postcss.DECL], function (decl) {
29 const {
30 before
31 } = decl.raws;
32
33 if (before && ~before.indexOf('_')) {
34 this.push(decl, {
35 identifier: _identifiers.PROPERTY,
36 hack: `${before.trim()}${decl.prop}`
37 });
38 }
39
40 if (decl.prop[0] === '-' && decl.prop[1] !== '-' && vendorPrefix(decl.prop) === '') {
41 this.push(decl, {
42 identifier: _identifiers.PROPERTY,
43 hack: decl.prop
44 });
45 }
46});
47
48exports.default = _default;
49module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.