1 | import { CSSUnitValue } from './cssom';
|
2 | import type { LayoutDefinitionCtor } from './layout';
|
3 | /**
|
4 | * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS/RegisterProperty#parameters
|
5 | */
|
6 | export interface PropertyDefinition {
|
7 | name: string;
|
8 | /**
|
9 | * representing the expected syntax of the defined property. Defaults to "*".
|
10 | */
|
11 | syntax?: string;
|
12 | /**
|
13 | * A boolean value defining whether the defined property should be inherited (true), or not (false). Defaults to false.
|
14 | */
|
15 | inherits: boolean;
|
16 | initialValue?: string;
|
17 | }
|
18 | /**
|
19 | * holds useful CSS-related methods.
|
20 | * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS
|
21 | *
|
22 | * * CSS Typed OM @see https://developer.mozilla.org/en-US/docs/Web/API/CSS/factory_functions
|
23 | * * register property @see https://developer.mozilla.org/en-US/docs/Web/API/CSS/RegisterProperty
|
24 | * * CSS Layout API
|
25 | */
|
26 | export declare const CSS: {
|
27 | /**
|
28 | * <number>
|
29 | * @see https://drafts.csswg.org/css-values-4/#number-value
|
30 | */
|
31 | number: (n: number) => CSSUnitValue;
|
32 | /**
|
33 | * <percentage>
|
34 | * @see https://drafts.csswg.org/css-values-4/#percentage-value
|
35 | */
|
36 | percent: (n: number) => CSSUnitValue;
|
37 | /**
|
38 | * <length>
|
39 | */
|
40 | px: (n: number) => CSSUnitValue;
|
41 | /**
|
42 | * <length>
|
43 | */
|
44 | em: (n: number) => CSSUnitValue;
|
45 | /**
|
46 | * <angle>
|
47 | */
|
48 | deg: (n: number) => CSSUnitValue;
|
49 | /**
|
50 | * <angle>
|
51 | */
|
52 | grad: (n: number) => CSSUnitValue;
|
53 | /**
|
54 | * <angle>
|
55 | */
|
56 | rad: (n: number) => CSSUnitValue;
|
57 | /**
|
58 | * <angle>
|
59 | */
|
60 | turn: (n: number) => CSSUnitValue;
|
61 | /**
|
62 | * <time>
|
63 | */
|
64 | s: (n: number) => CSSUnitValue;
|
65 | /**
|
66 | * <time>
|
67 | */
|
68 | ms: (n: number) => CSSUnitValue;
|
69 | /**
|
70 | * CSS Properties & Values API
|
71 | *
|
72 | * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Properties_and_Values_API
|
73 | * @see https://drafts.css-houdini.org/css-properties-values-api/#registering-custom-properties
|
74 | * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS/RegisterProperty
|
75 | */
|
76 | registerProperty: (definition: PropertyDefinition) => void;
|
77 | /**
|
78 | * CSS Layout API
|
79 | * register layout
|
80 | *
|
81 | * @see https://github.com/w3c/css-houdini-drafts/blob/main/css-layout-api/EXPLAINER.md
|
82 | * @see https://developer.mozilla.org/en-US/docs/Web/Guide/Houdini#css_layout_api
|
83 | */
|
84 | registerLayout: (name: string, clazz: LayoutDefinitionCtor) => void;
|
85 | };
|