@devcake/styling

0.0.3 • Public • Published

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"

Readme

Keywords

none

Package Sidebar

Install

npm i @devcake/styling

Weekly Downloads

1

Version

0.0.3

License

none

Unpacked Size

21.8 kB

Total Files

13

Last publish

Collaborators

  • m.slinkman
  • cerebralfart