@devcake/styling
v0.0.3
Published
## Usage The styling module helps pass around styling objects, which can be updated and accessed in various ways. Querying a style is simple:
Downloads
23
Readme
DEVcake Styling
Usage
The styling module helps pass around styling objects, which can be updated and accessed in various ways. Querying a style is simple:
style = styling.get("button.blue");
You can also set application-specific styles:
styling.set("button.red", "bg-red-200")
Note that this package does not enforce how these style-strings are used. They may, for example, be CSS classes, HTML colors or SVG paths.
If you're developing a package, we recommend setting defaults for the properties you need.
styling.setDefault("button.green","bg-green-200")
Roadmap
In future realeases, we want to support fluent interaction with properties. The proposed syntax as follows:
style = styling.button.blue
styling.button.red = "bg-red-200"