/** * @module "ui/styling/style-properties" */ /** */ import { TransformFunctionsInfo } from "../animation/animation"; import { Color } from "../../color"; import { Style, CssProperty, CssAnimationProperty, ShorthandProperty, InheritedCssProperty } from "../core/properties"; import { Font, FontStyle, FontWeight } from "./font"; import { Background } from "./background"; import { dip, px, percent } from "../core/view"; export type LengthDipUnit = { readonly unit: "dip", readonly value: dip }; export type LengthPxUnit = { readonly unit: "px", readonly value: px }; export type LengthPercentUnit = { readonly unit: "%", readonly value: percent }; export type Length = "auto" | dip | LengthDipUnit | LengthPxUnit; export type PercentLength = "auto" | dip | LengthDipUnit | LengthPxUnit | LengthPercentUnit; 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". By default is Math.NaN. */ export function toDevicePixels(length: Length, auto?: number): number; export function convertToString(length: Length): string; } 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". By default is Math.NaN. * @param parentAvailableWidth Value to use as base when converting percent unit. By default is Math.NaN. */ export function toDevicePixels(length: PercentLength, auto?: number, parentAvailableWidth?: px): 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 function transformConverter(text: string): TransformFunctionsInfo; export const clipPathProperty: CssProperty; export const colorProperty: InheritedCssProperty; export const backgroundProperty: ShorthandProperty; 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: CssAnimationProperty; export const heightProperty: CssAnimationProperty; export const lineHeightProperty: 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 type Visibility = "visible" | "hidden" | "collapse"; export type HorizontalAlignment = "left" | "center" | "right" | "stretch"; export type VerticalAlignment = "top" | "middle" | "bottom" | "stretch";