postcss-merge-longhand
Advanced tools
Comparing version 5.1.3 to 5.1.4
{ | ||
"name": "postcss-merge-longhand", | ||
"version": "5.1.3", | ||
"version": "5.1.4", | ||
"description": "Merge longhand properties into shorthand with PostCSS.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -12,13 +12,19 @@ 'use strict'; | ||
function isConflictingProp(propA, propB) { | ||
if (!propB.prop || propB.important !== propA.important) { | ||
if (!propB.prop || propB.important !== propA.important || | ||
propA.prop === propB.prop) { | ||
return false; | ||
} | ||
const parts = propA.prop.split('-'); | ||
const partsA = propA.prop.split('-'); | ||
const partsB = propB.prop.split('-'); | ||
return parts.some(() => { | ||
parts.pop(); | ||
/* Be safe: check that the first part matches. So we don't try to | ||
* combine e.g. border-color and color. | ||
*/ | ||
if (partsA[0] !== partsB[0]) { | ||
return false; | ||
} | ||
return parts.join('-') === propB.prop; | ||
}); | ||
const partsASet = new Set(partsA); | ||
return partsB.every((partB) => partsASet.has(partB)); | ||
} | ||
@@ -25,0 +31,0 @@ |
@@ -42,2 +42,4 @@ declare const _exports: { | ||
includes(searchElement: typeof borders, fromIndex?: number | undefined): boolean; | ||
flatMap<U_3, This = undefined>(callback: (this: This, value: typeof borders, index: number, array: (typeof borders)[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[]; | ||
flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[]; | ||
[Symbol.iterator](): IterableIterator<typeof borders>; | ||
@@ -53,3 +55,4 @@ [Symbol.unscopables](): { | ||
}; | ||
at(index: number): typeof borders | undefined; | ||
}; | ||
export = _exports; |
@@ -42,2 +42,4 @@ declare const _exports: { | ||
includes(searchElement: string, fromIndex?: number | undefined): boolean; | ||
flatMap<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[]; | ||
flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[]; | ||
[Symbol.iterator](): IterableIterator<string>; | ||
@@ -53,3 +55,4 @@ [Symbol.unscopables](): { | ||
}; | ||
at(index: number): string | undefined; | ||
}; | ||
export = _exports; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58773
1714