postcss-merge-longhand
Version:
Merge longhand properties into shorthand with PostCSS.
27 lines • 1.21 kB
TypeScript
declare const substitutionFunctions: string[];
declare const trustedSupportFunctions: Set<string>;
/**
* Whether a token represents an unresolved value this plugin cannot compute.
*
* Only the leading function determines this: var(--x, rgba(0,0,0,.5)) will
* substitute a user-agent-computed value, so we cannot infer its type from the
* fallback. Accepting all bracketed tokens instead would allow any function to
* represent any type—padding-top: url(x) becomes a length, border-top-width:
* rgb(0 0 0) a width—and user agents ignore both invalid declarations, so
* merging them produces invalid shorthands.
*
* @param {string} token
* @return {boolean}
*/
declare function isUnresolved(token: string): boolean;
/**
* Whether a token is a substitution function specifically — the one class of
* trusted function whose type stays unknowable after substitution, so it can
* fill any border component rather than only the ones its own type matches.
*
* @param {string} token
* @return {boolean}
*/
declare function isSubstitution(token: string): boolean;
export { isSubstitution, isUnresolved, substitutionFunctions, trustedSupportFunctions, };
//# sourceMappingURL=unresolved.d.ts.map