Module CSSUtil

Index

Functions

Functions

AddClass(elem: HTMLElement, className: string)

Parameters

  • elem: HTMLElement
  • className: string

HasClass(elem: HTMLElement, className: string): boolean

Parameters

  • elem: HTMLElement
  • className: string

Returns

boolean

RemoveClass(elem: HTMLElement, className: string)

Parameters

  • elem: HTMLElement
  • className: string

getCurrentEltStyleByNames(elem: HTMLElement, styleNames: Array<string>): string

Parameters

  • elem: HTMLElement
  • styleNames: Array<string>

Returns

string

getCurrentStyle(elem: HTMLElement, cssStyle: string): string

Parameters

  • elem: HTMLElement
  • cssStyle: string

Returns

string

getCurrentStyleCorrect(element: HTMLElement, camelStyleName: string, dashStyleName: string): string

Parameters

  • element: HTMLElement
  • camelStyleName: string
  • dashStyleName: string

Returns

string

getOpacity(element: HTMLElement): number

Parameters

  • element: HTMLElement

Returns

number

numToPx(n: number): string

Parameters

  • n: number

Returns

string

pxToFloat(pxString: string): number

Parameters

  • pxString: string

Returns

number

pxToNum(px: string): number

Parameters

  • px: string

Returns

number

setOpacity(element: HTMLElement, value: number)

Parameters

  • element: HTMLElement
  • value: number