0.0.3 • Published 3 years ago

@devcake/styling v0.0.3

Weekly downloads
102
License
-
Repository
-
Last release
3 years ago

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"