Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/postcss-merge-longhand/dist/lib/canMerge.js

    r59329aa re29cc2e  
    1313
    1414const unimportant = node => !node.important;
     15/* Cannot be combined with other values in shorthand
     16  https://www.w3.org/TR/css-cascade-5/#shorthand */
    1517
    16 const hasInherit = node => node.value.toLowerCase() === 'inherit';
    1718
    18 const hasInitial = node => node.value.toLowerCase() === 'initial';
    19 
    20 const hasUnset = node => node.value.toLowerCase() === 'unset';
     19const cssWideKeywords = ['inherit', 'initial', 'unset', 'revert'];
    2120
    2221var _default = (props, includeCustomProps = true) => {
    23   if (props.some(hasInherit) && !props.every(hasInherit)) {
    24     return false;
    25   }
     22  const uniqueProps = new Set(props.map(node => node.value.toLowerCase()));
    2623
    27   if (props.some(hasInitial) && !props.every(hasInitial)) {
    28     return false;
    29   }
    30 
    31   if (props.some(hasUnset) && !props.every(hasUnset)) {
    32     return false;
     24  if (uniqueProps.size > 1) {
     25    for (const unmergeable of cssWideKeywords) {
     26      if (uniqueProps.has(unmergeable)) {
     27        return false;
     28      }
     29    }
    3330  }
    3431
Note: See TracChangeset for help on using the changeset viewer.