Home Reference Source
import AssignedStyles from 'potassium-es/src/style/AssignedStyles.js'
public class | source

AssignedStyles

AssignedStyles tracks programmatically (not via KSS) assigned styles for a node Assigned styles are never overwritten by local (KSS defined) or inherited styles

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

Iterate over the {StyleInfo}s

public

delete(property: string): bool

public

get(property: string): StyleInfo

public

has(property: string): bool

public

set(property: string, value: string, important: bool)

Public Constructors

public constructor() source

Public Methods

public * [Symbol.iterator]() source

Iterate over the {StyleInfo}s

public delete(property: string): bool source

Params:

NameTypeAttributeDescription
property string

like 'font-size'

Return:

bool

true if property existed

public get(property: string): StyleInfo source

Params:

NameTypeAttributeDescription
property string

like 'font-size'

Return:

StyleInfo

public has(property: string): bool source

Params:

NameTypeAttributeDescription
property string

like 'font-size'

Return:

bool

true if the property is set

public set(property: string, value: string, important: bool) source

Params:

NameTypeAttributeDescription
property string

like 'font-size'

value string

like '2em'

important bool