Last change
on this file was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago |
primeNG components
|
-
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 _isCustomProp = _interopRequireDefault(require("./isCustomProp"));
|
---|
9 |
|
---|
10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
---|
11 |
|
---|
12 | const important = node => node.important;
|
---|
13 |
|
---|
14 | const unimportant = node => !node.important;
|
---|
15 | /* Cannot be combined with other values in shorthand
|
---|
16 | https://www.w3.org/TR/css-cascade-5/#shorthand */
|
---|
17 |
|
---|
18 |
|
---|
19 | const cssWideKeywords = ['inherit', 'initial', 'unset', 'revert'];
|
---|
20 |
|
---|
21 | var _default = (props, includeCustomProps = true) => {
|
---|
22 | const uniqueProps = new Set(props.map(node => node.value.toLowerCase()));
|
---|
23 |
|
---|
24 | if (uniqueProps.size > 1) {
|
---|
25 | for (const unmergeable of cssWideKeywords) {
|
---|
26 | if (uniqueProps.has(unmergeable)) {
|
---|
27 | return false;
|
---|
28 | }
|
---|
29 | }
|
---|
30 | }
|
---|
31 |
|
---|
32 | if (includeCustomProps && props.some(_isCustomProp.default) && !props.every(_isCustomProp.default)) {
|
---|
33 | return false;
|
---|
34 | }
|
---|
35 |
|
---|
36 | return props.every(unimportant) || props.every(important);
|
---|
37 | };
|
---|
38 |
|
---|
39 | exports.default = _default;
|
---|
40 | module.exports = exports.default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.