Skip to main content
Version: 2.x

StyleTarget interface

@microsoft/fast-element > StyleTarget

StyleTarget interface

A node that can be targeted by styles.

Signature:

export interface StyleTarget extends Pick<Node, "getRootNode"> 

Extends: Pick<Node, "getRootNode">

Properties

Property

Modifiers

Type

Description

adoptedStyleSheets?

CSSStyleSheet[]

(Optional) Stylesheets to be adopted by the node.

Methods

Method

Description

append(styles)

Adds styles to the target by appending the styles.

querySelectorAll(selectors)

Returns all element descendants of node that match selectors.

removeChild(styles)

Removes styles from the target.