mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00

Split type.class from CssTypeSelector to CssCompositeSelector, probably support type#id.class selectors Apply review comments, refactor css-selectors internally Applied refactoring, all tests pass, button does not notify changes Add tests for the css selectors parser. Added tests for css-selectors Added basic implementation of mayMatch and changeMap for css match state Implemented TKUnit.assertDeepEqual to check key and key/values in Map and Set Watch for property and pseudoClass changes Add one child group test Add typings for animations Added mechanism to enable/disable listeners for pseudo classes Count listeners instead of checking handlers, reverse subscription and unsubscription
36 lines
764 B
TypeScript
36 lines
764 B
TypeScript
declare module "css" {
|
|
export interface Position {
|
|
start: { line: number; column: number };
|
|
end: { line: number; column: number };
|
|
}
|
|
|
|
export interface Node {
|
|
type: "rule" | "keyframes" | "declaration";
|
|
position: Position;
|
|
}
|
|
|
|
export interface Declaration extends Node {
|
|
property: string;
|
|
value: string;
|
|
}
|
|
|
|
export interface Rule extends Node {
|
|
selectors: string[];
|
|
declarations: Node[];
|
|
}
|
|
|
|
export interface Keyframes extends Rule {
|
|
name: string;
|
|
}
|
|
|
|
export interface StyleSheet {
|
|
rules: Node[];
|
|
}
|
|
|
|
export interface SyntaxTree {
|
|
stylesheet: StyleSheet;
|
|
}
|
|
|
|
export function parse(css: string, options: any): SyntaxTree;
|
|
}
|