-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.d.ts
More file actions
72 lines (61 loc) · 1.91 KB
/
index.d.ts
File metadata and controls
72 lines (61 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { Plugin } from 'postcss';
declare namespace PostcssUnitProcessor {
interface Options {
/**
* A function to process the value and unit.
* @param value The numeric value to process.
* @param unit The unit of the value (e.g., 'px', 'rem').
* @param node The PostCSS node being processed.
* @param root The root PostCSS node.
* @returns The processed value as a number, string, or an object with value and unit.
*/
processor?: (value: number, unit: string, node: any, root: any) => number | string | { value: number | string; unit?: string };
/**
* The precision for rounding unit values.
* @default 5
*/
unitPrecision?: number;
/**
* List of selectors to exclude from processing.
* @default []
*/
selectorBlackList?: Array<string | RegExp>;
/**
* List of properties to process. Supports wildcards and negation.
* @default ['*']
*/
propList?: string[];
/**
* Whether to replace the original declaration or add a new one.
* @default true
*/
replace?: boolean;
/**
* Whether to process units in media queries.
* @default false
*/
mediaQuery?: boolean;
/**
* Pattern or function to exclude files from processing.
* @default /node_modules/i
*/
exclude?: RegExp | string | ((filePath: string) => boolean);
/**
* Custom units to support in addition to default units.
* @default []
*/
customUnitList?: string[];
/**
* List of units to process. Supports wildcards and negation.
* @default ['*']
*/
unitList?: string[];
}
}
/**
* A PostCSS plugin to process units in CSS declarations and media queries.
* @param options Configuration options for the plugin.
* @returns A PostCSS plugin instance.
*/
declare function PostcssUnitProcessor(options?: PostcssUnitProcessor.Options): Plugin;
export = PostcssUnitProcessor;