StyleRule

Type class

Defines a class for a CSS rule.

Can be used to dynamically add CSS to the document.

Sources

This information about StyleRule is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

StyleRule extends DisposerClass.

StyleRule is not extended by any other symbol.

Settings

StyleRule does not have any settings.

Private settings

StyleRule does not have any private settings.

Properties

selector
#

Type string

A CSS selector text.

E.g.: .myClass p

Methods

constructor(

element: ShadowRoot | null,
selector: string,
styles: object,
nonce: string

)

#

Returns StyleRule

Constructor.

dispose()

#

Returns void

Inherited from DisposerClass

Disposes the object.

isDisposed()

#

Returns boolean

Inherited from DisposerClass

Checks if object is disposed.

setStyle(

name: string,
value: string

)

#

Returns void

Sets a value for specific style attribute.

There are 2 inherited items currently hidden from this list.

Events

StyleRule does not have any events.