Last updated

API / geotoolkit / report / dom / css / CssStyleDeclaration / CssStyleDeclaration

Class: CssStyleDeclaration

css.CssStyleDeclaration.CssStyleDeclaration

Defines CSS Style Declaration

Table of contents

Constructors
Accessors
Methods

Contents

Constructors

new CssStyleDeclaration()

new CssStyleDeclaration()

Accessors

cssText

get cssText(): string

Textual representation of the declaration block, if and only if it is exposed via HTMLElement.style. Setting this attribute changes the inline style. If you want a text representation of a computed declaration block, you can get it with JSON.stringify().

Name

module:geotoolkit/report/dom/css/CssStyleDeclaration~CssStyleDeclaration#cssText

Returns

string


length

get length(): number

Return length of the rules list

Name

module:geotoolkit/report/dom/css/CssStyleDeclaration~CssStyleDeclaration#length

Returns

number


parentRule

get parentRule(): CssRule

Returns the containing rule, otherwise null. E.g. if this rule is a style rule inside an

Media

block, the parent rule would be that CSSMediaRule.

Name

module:geotoolkit/report/dom/css/CssStyleDeclaration~CssStyleDeclaration#parentRule

Returns

CssRule

Methods

getClassName

getClassName(): string

Returns

string


getPropertyPriority

getPropertyPriority(property): string

Returns the optional priority, "important".

Parameters

Name Type Description
propertystringCSS style property

Returns

string

property priority


getPropertyValue

getPropertyValue(property): string

Returns the property value given a property name.

Parameters

Name Type Description
propertystringCSS style property name

Returns

string

property value


removeProperty

removeProperty(property): string

Removes a property from the CSS declaration block.

Parameters

Name Type Description
propertystringCSS style property

Returns

string

oldValue is a string equal to the value of the CSS property before it was removed.


setProperty

setProperty(property, value, priority?): CssStyleDeclaration

Modifies an existing CSS property or creates a new CSS property in the declaration block.

Parameters

Name Type Description
propertystringCSS style property name
valuestringCSS style property value
Optional prioritystringCSS style property priority

Returns

CssStyleDeclaration

this


getClassName

Static getClassName(): string

Returns

string