Closed chriseppstein closed 7 years ago
I'm using this locally:
function getShorthandComputedProperties(prop: string, recurse: boolean = false): string[] {
let props = propParser.getShorthandComputedProperties(prop);
if (!recurse) return props;
while (props.find(p => propParser.isShorthandProperty(p))) {
props = props.reduce((prev, p) => {
prev.splice(prev.length, 0, ...propParser.getShorthandComputedProperties(p));
return prev;
}, []);
}
return props;
}
For consistency with
expandShorthandProperty
, thegetShorthandComputedProperties
function should accept an option to recursively compute the set of properties that will be returned.