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 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = void 0;
|
---|
7 |
|
---|
8 | var _plugin = _interopRequireDefault(require("../plugin"));
|
---|
9 |
|
---|
10 | var _browsers = require("../dictionary/browsers");
|
---|
11 |
|
---|
12 | var _identifiers = require("../dictionary/identifiers");
|
---|
13 |
|
---|
14 | var _postcss = require("../dictionary/postcss");
|
---|
15 |
|
---|
16 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
---|
17 |
|
---|
18 | function vendorPrefix(prop) {
|
---|
19 | let match = prop.match(/^(-\w+-)/);
|
---|
20 |
|
---|
21 | if (match) {
|
---|
22 | return match[0];
|
---|
23 | }
|
---|
24 |
|
---|
25 | return '';
|
---|
26 | }
|
---|
27 |
|
---|
28 | var _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 |
|
---|
48 | exports.default = _default;
|
---|
49 | module.exports = exports.default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.