1 | import { Nested, ParenLess, UnitType, UnitCategory } from './types';
|
2 | export declare enum CSSStyleValueType {
|
3 | kUnknownType = 0,
|
4 | kUnparsedType = 1,
|
5 | kKeywordType = 2,
|
6 | kUnitType = 3,
|
7 | kSumType = 4,
|
8 | kProductType = 5,
|
9 | kNegateType = 6,
|
10 | kInvertType = 7,
|
11 | kMinType = 8,
|
12 | kMaxType = 9,
|
13 | kClampType = 10,
|
14 | kTransformType = 11,
|
15 | kPositionType = 12,
|
16 | kURLImageType = 13,
|
17 | kColorType = 14,
|
18 | kUnsupportedColorType = 15
|
19 | }
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export declare abstract class CSSStyleValue {
|
28 | static parse(propertyName: string, value: string): CSSStyleValue;
|
29 | static parseAll(propertyName: string, value: string): CSSStyleValue[];
|
30 | static unitFromName(name: string): UnitType;
|
31 | static unitTypeToUnitCategory(type: UnitType): UnitCategory;
|
32 | static unitTypeToString(type: UnitType): "" | "em" | "px" | "deg" | "rad" | "grad" | "ms" | "s" | "rem" | "turn" | "%";
|
33 | static stringToUnitType(name: string): UnitType;
|
34 | static canonicalUnitTypeForCategory(category: UnitCategory): UnitType.kUnknown | UnitType.kNumber | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds | UnitType.kHertz | UnitType.kDotsPerPixel;
|
35 | |
36 |
|
37 |
|
38 | static conversionToCanonicalUnitsScaleFactor(unit_type: UnitType): number;
|
39 | static isAngle(unit: UnitType): boolean;
|
40 | static isViewportPercentageLength(type: UnitType): boolean;
|
41 | static isContainerPercentageLength(type: UnitType): boolean;
|
42 | static isLength(type: UnitType): boolean;
|
43 | static isRelativeUnit(type: UnitType): boolean;
|
44 | static isTime(unit: UnitType): boolean;
|
45 | static isFrequency(unit: UnitType): boolean;
|
46 | static isResolution(type: UnitType): boolean;
|
47 | static isFlex(unit: UnitType): boolean;
|
48 | protected abstract getType(): CSSStyleValueType;
|
49 | abstract buildCSSText(n: Nested, p: ParenLess, result: string): string;
|
50 | abstract clone(): CSSStyleValue;
|
51 | toString(): string;
|
52 | isNumericValue(): boolean;
|
53 | }
|