Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/team-griffin/css-longhand
Generate longhand properties using a shorthand syntax
https://github.com/team-griffin/css-longhand
css longhand styles utils
Last synced: about 1 month ago
JSON representation
Generate longhand properties using a shorthand syntax
- Host: GitHub
- URL: https://github.com/team-griffin/css-longhand
- Owner: team-griffin
- License: mit
- Created: 2017-03-06T16:14:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T20:42:41.000Z (about 2 years ago)
- Last Synced: 2024-11-05T16:53:04.728Z (about 2 months ago)
- Topics: css, longhand, styles, utils
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@team-griffin/css-longhand
- Size: 338 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# css-longhand
`npm install @team-griffin/css-longhand --save`
`yarn add @team-griffin/css-longhand`
An inline css utility which makes creating lots of longhand properties easy.
When using inline css solutions such as radium and react css it is recommended that a developer writes out each of the css properties in longhand. This is to ensure that style merges do not override unexpected properties.
This is where css-longhand comes in.
## Usage
```javascript
import cssLonghand from '@team-griffin/css-longhand';cssLonghand('margin', {
left: 10,
right: 10,
top: 20,
bottom: 20,
});// Out
{
marginLeft: 10,
marginRight: 10,
marginTop: 20,
marginBottom: 20,
}```