Urara-Blog/node_modules/.pnpm-store/v3/files/e9/0f280bbc4874c7914ae736605109ec0ff363b2634c009b615420e79ddb07511857127f966f23364260dce44333f0088979b78327516b7c7dc7c572b7ddd1ca
2022-08-14 01:14:53 +08:00

27 lines
851 B
Text

import type { PluginCreator } from 'postcss';
declare const cssDeclarationSorter: PluginCreator<{
/**
Provide the name of one of the built-in sort orders or a comparison function that is passed to `Array.sort`.
@default 'alphabetical'
*/
order?: SortOrder | SortFunction | undefined;
/**
To prevent breaking legacy CSS where shorthand declarations override longhand declarations. For example `animation-name: some; animation: greeting;` will be kept in this order.
@default false
*/
keepOverrides?: boolean;
}>;
export = cssDeclarationSorter;
type SortOrder = 'alphabetical' | 'concentric-css' | 'smacss';
/**
* This function receives two declaration property names and is expected
* to return -1, 0 or 1 depending on the wanted order.
*/
type SortFunction = (propertyNameA: string, propertyNameB: string) => -1 | 0 | 1;