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

Stylesheet

Stylesheet is initialized with KSS data JSON emitted by postcss-potassium. It holds the parsed data used to apply styles to a Three.js scene.

Constructor Summary

Public Constructor
public

constructor(kssData: Object)

Member Summary

Public Members
public get

data: *

public get

The Stylist sets this to the index in the load order the stylesheet Used to break ties in cascade precedence

public set

Method Summary

Public Methods
public

updateLocalStyles(node: *, traverseChildren: boolean)

Public Constructors

public constructor(kssData: Object) source

Params:

NameTypeAttributeDescription
kssData Object

the style JSON emitted by postcss-potassium

Public Members

public get data: * source

public get loadIndex: * source

The Stylist sets this to the index in the load order the stylesheet Used to break ties in cascade precedence

public set loadIndex source

Public Methods

public updateLocalStyles(node: *, traverseChildren: boolean) source

Params:

NameTypeAttributeDescription
node *
traverseChildren boolean
  • optional
  • default: true