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

Member Summary

Public Members
public get

infos: *

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

log(showVars: boolean)

public

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

Public Constructors

public constructor() source

Public Members

public get infos: * 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 log(showVars: boolean) source

Params:

NameTypeAttributeDescription
showVars boolean
  • optional
  • default: false

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

Params:

NameTypeAttributeDescription
property string

like 'font-size'

value string

like '2em'

important bool