declare module "ui/styling/style-properties" { import { Color } from "color"; import { Style, CssProperty, CssAnimationProperty, ShorthandProperty, InheritedCssProperty } from "ui/core/properties"; import { Font, FontStyle, FontWeight } from "ui/styling/font"; import { Background } from "ui/styling/background"; export type Length = "auto" | number | { readonly unit: "dip" | "px"; readonly value: number; } export namespace Length { export function parse(text: string): Length; export function equals(a: Length, b: Length): boolean; /** * Converts Length unit to device pixels. * @param length The Length to convert. * @param auto Value to use for conversion of "auto". */ export function toDevicePixels(length: Length, auto: number): number; export function convertToString(length: Length): string; } export type PercentLength = "auto" | number | { readonly unit: "%" | "dip" | "px"; /** * Length value. When unit is "%" the value is normalized (ex. for 5% the value is 0.05) */ readonly value: number; } export namespace PercentLength { export function parse(text: string): PercentLength; export function equals(a: PercentLength, b: PercentLength): boolean; /** * Converts PercentLength unit to device pixels. * @param length The PercentLength to convert. * @param auto Value to use for conversion of "auto". * @param parentAvailableWidth Value to use as base when converting percent unit. */ export function toDevicePixels(length: PercentLength, auto: number, parentAvailableWidth: number): number; export function convertToString(length: PercentLength): string; } export const zeroLength: Length; export const rotateProperty: CssAnimationProperty; export const scaleXProperty: CssAnimationProperty; export const scaleYProperty: CssAnimationProperty; export const translateXProperty: CssAnimationProperty; export const translateYProperty: CssAnimationProperty; export const clipPathProperty: CssProperty; export const colorProperty: InheritedCssProperty; export const backgroundColorProperty: CssAnimationProperty; export const backgroundImageProperty: CssProperty; export const backgroundRepeatProperty: CssProperty; export const backgroundSizeProperty: CssProperty; export const backgroundPositionProperty: CssProperty; export const borderColorProperty: ShorthandProperty; export const borderTopColorProperty: CssProperty; export const borderRightColorProperty: CssProperty; export const borderBottomColorProperty: CssProperty; export const borderLeftColorProperty: CssProperty; export const borderWidthProperty: ShorthandProperty; export const borderTopWidthProperty: CssProperty; export const borderRightWidthProperty: CssProperty; export const borderBottomWidthProperty: CssProperty; export const borderLeftWidthProperty: CssProperty; export const borderRadiusProperty: ShorthandProperty; export const borderTopLeftRadiusProperty: CssProperty; export const borderTopRightRadiusProperty: CssProperty; export const borderBottomRightRadiusProperty: CssProperty; export const borderBottomLeftRadiusProperty: CssProperty; export const zIndexProperty: CssProperty; export const visibilityProperty: CssProperty; export const opacityProperty: CssAnimationProperty; export const minWidthProperty: CssProperty; export const minHeightProperty: CssProperty; export const widthProperty: CssProperty; export const heightProperty: CssProperty; export const marginProperty: ShorthandProperty; export const marginLeftProperty: CssProperty; export const marginRightProperty: CssProperty; export const marginTopProperty: CssProperty; export const marginBottomProperty: CssProperty; export const paddingProperty: ShorthandProperty; export const paddingLeftProperty: CssProperty; export const paddingRightProperty: CssProperty; export const paddingTopProperty: CssProperty; export const paddingBottomProperty: CssProperty; export const horizontalAlignmentProperty: CssProperty; export const verticalAlignmentProperty: CssProperty; export const fontSizeProperty: InheritedCssProperty; export const fontFamilyProperty: InheritedCssProperty; export const fontStyleProperty: InheritedCssProperty; export const fontWeightProperty: InheritedCssProperty; export const backgroundInternalProperty: CssProperty; export const fontInternalProperty: InheritedCssProperty; export type BackgroundRepeat = "repeat" | "repeat-x" | "repeat-y" | "no-repeat"; export namespace BackgroundRepeat { export const REPEAT: "repeat"; export const REPEAT_X: "repeat-x"; export const REPEAT_Y: "repeat-y"; export const NO_REPEAT: "no-repeat"; export function isValid(value: any): boolean; export function parse(value: string): BackgroundRepeat; } export type Visibility = "visible" | "hidden" | "collapse"; export namespace Visibility { export const VISIBLE: "visible"; export const HIDDEN: "hidden"; export const COLLAPSE: "collapse"; export function isValid(value: any): boolean; export function parse(value: string): Visibility; } export type HorizontalAlignment = "left" | "center" | "right" | "stretch"; export namespace HorizontalAlignment { export const LEFT: "left"; export const CENTER: "center"; export const RIGHT: "right"; export const STRETCH: "stretch"; export function isValid(value: any): boolean; export function parse(value: string): HorizontalAlignment; } export type VerticalAlignment = "top" | "middle" | "bottom" | "stretch"; export namespace VerticalAlignment { export const TOP: "top"; export const MIDDLE: "middle"; export const BOTTOM: "bottom"; export const STRETCH: "stretch"; export function isValid(value: any): boolean; export function parse(value: string): VerticalAlignment; } }