CSSNumber

Module: TSUI.UI.None
Extends: None
Implements: None
Exported: Yes

Associated source files:

Description

Represents a CSS number value e.g. 10px, 10% or 'auto'.
Also provides static methods for converting from CSS string to CSSNumber.

Constructors

constructor(Value: number, Units?: string, Auto?: boolean)
Creates a new CSSNumber with specified value and units.
  • Value: number - The value of the number (irrelevant if auto is set - see auto param)
  • OPTIONAL Units: string - The units of the CSS number - px, % or em. Default: px. (Irrelevant if auto is set - see auto param)
  • OPTIONAL Auto: boolean - Whether the number has value of "auto" - other parameters are ignored if set. Default: false


Public Properties

Value: number;

Units: string;

Auto: boolean;



Public Methods

toString(): string
Returns value to ToString method.
  • Returns: string - value to ToString method.
ToString(): string
Returns the CSS string representation of the CSS number e.g. 10px, 10% or auto
  • Returns: string - the CSS string representation of the CSS number e.g. 10px, 10% or auto

PrivateStatic Methods

FromString(value: string): CSSNumber
Converts a CSS string representation of a CSS Number to a CSS Number.
  • value: string - The CSS string representation of the number.
  • Returns: TSUI.UI.CSSNumber - the new CSS Number.


Last edited Aug 14, 2013 at 11:39 PM by EdwardNutting, version 4

Comments

No comments yet.