diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/@csstools/selector-specificity/dist/index.d.ts | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/@csstools/selector-specificity/dist/index.d.ts')
| -rw-r--r-- | node_modules/@csstools/selector-specificity/dist/index.d.ts | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/node_modules/@csstools/selector-specificity/dist/index.d.ts b/node_modules/@csstools/selector-specificity/dist/index.d.ts deleted file mode 100644 index f3f959d3..00000000 --- a/node_modules/@csstools/selector-specificity/dist/index.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { Node } from 'postcss-selector-parser'; - -/** - * Options for the calculation of the specificity of a selector - */ -export declare type CalculationOptions = { - /** - * The callback to calculate a custom specificity for a node - */ - customSpecificity?: CustomSpecificityCallback; -}; - -/** - * Compare two specificities - * @param s1 The first specificity - * @param s2 The second specificity - * @returns A value smaller than `0` if `s1` is less specific than `s2`, `0` if `s1` is equally specific as `s2`, a value larger than `0` if `s1` is more specific than `s2` - */ -export declare function compare(s1: Specificity, s2: Specificity): number; - -/** - * Calculate a custom specificity for a node - */ -export declare type CustomSpecificityCallback = (node: Node) => Specificity | void | false | null | undefined; - -/** - * Calculate the specificity for a selector - */ -export declare function selectorSpecificity(node: Node, options?: CalculationOptions): Specificity; - -/** - * The specificity of a selector - */ -export declare type Specificity = { - /** - * The number of ID selectors in the selector - */ - a: number; - /** - * The number of class selectors, attribute selectors, and pseudo-classes in the selector - */ - b: number; - /** - * The number of type selectors and pseudo-elements in the selector - */ - c: number; -}; - -/** - * Calculate the most specific selector in a list - */ -export declare function specificityOfMostSpecificListItem(nodes: Array<Node>, options?: CalculationOptions): { - a: number; - b: number; - c: number; -}; - -export { } |
