1.0.13 • Published 9 years ago

style-builder v1.0.13

Weekly downloads
5,719
License
ISC
Repository
github
Last release
9 years ago

Style Builder

A JavaScript utility to break apart shorthand CSS components in objects.

When using inline styles with React components, it can be dangerous to use shorthand CSS properties. As a work around, use StyleBuilder to break apart any shorthand properties that exist in your style objects.

Read our blog post here

Example

const StyleBuilder = require("style-builder");

const _styles = StyleBuilder.build({
  margin: "5px 10px"
});

console.log(_styles);
{
  marginTop: "5px",
  marginRight: "10px",
  marginBottom: "5px",
  marginLeft: "10px"
}

Build

npm run-script build

Test

npm test

TODO

  • background
  • font
  • transition
  • transform
  • list-style
1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago