stylelint-order
Version:
A collection of order related linting rules for Stylelint.
20 lines (15 loc) • 310 B
JavaScript
import { shorthandData } from './shorthandData.js';
export function isShorthand(a, b) {
if (!shorthandData[a]) {
return false;
}
if (shorthandData[a].includes(b)) {
return true;
}
for (const longhand of shorthandData[a]) {
if (isShorthand(longhand, b)) {
return true;
}
}
return false;
}