mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00

This is the default location when installing from npm, and Angular uses that when parsing CSS. Updated module paths, requires, csproj, tsconfig and grunt tasks.
57 lines
1.6 KiB
TypeScript
57 lines
1.6 KiB
TypeScript
declare module "ui/styling/css-selector" {
|
|
import view = require("ui/core/view");
|
|
import cssParser = require("css");
|
|
import styleProperty = require("ui/styling/style-property");
|
|
|
|
export class CssSelector {
|
|
constructor(expression: string, declarations: cssParser.Declaration[]);
|
|
|
|
expression: string;
|
|
|
|
declarations(): Array<{ property: string; value: any }>;
|
|
|
|
specificity: number;
|
|
|
|
matches(view: view.View): boolean;
|
|
|
|
apply(view: view.View);
|
|
|
|
eachSetter(callback: (property: styleProperty.Property, resolvedValue: any) => void);
|
|
}
|
|
|
|
class CssTypeSelector extends CssSelector {
|
|
specificity: number;
|
|
matches(view: view.View): boolean;
|
|
}
|
|
|
|
class CssIdSelector extends CssSelector {
|
|
specificity: number;
|
|
matches(view: view.View): boolean;
|
|
}
|
|
|
|
class CssClassSelector extends CssSelector {
|
|
specificity: number;
|
|
matches(view: view.View): boolean;
|
|
}
|
|
|
|
export class CssVisualStateSelector extends CssSelector {
|
|
specificity: number;
|
|
|
|
key: string;
|
|
|
|
state: string;
|
|
|
|
constructor(expression: string, declarations: cssParser.Declaration[]);
|
|
matches(view: view.View): boolean;
|
|
}
|
|
|
|
export function createSelector(expression: string, declarations: cssParser.Declaration[]): CssSelector;
|
|
|
|
class InlineStyleSelector extends CssSelector {
|
|
constructor(declarations: cssParser.Declaration[]);
|
|
apply(view: view.View);
|
|
}
|
|
|
|
export function applyInlineSyle(view: view.View, declarations: cssParser.Declaration[]);
|
|
}
|