classnameify
Generate classname selectors for CSS components, works splendid together with e.g. React
Why?
Generating classnames according to the contents of CSS declarations solves the biggest problem with large scale CSS, i.e. the fact that it cascades. See unistyle
for how to use this in a scalable way.
Installation
Install classnameify
using npm:
npm install --save classnameify
Usage
Module usage
var classnameify = ; ;/* { '._e80a8a8': { color: '#FFF', fontSize: '10px' } }*/
Usage together with e.g. React
Have a look at unistyle
for how this fits together with React.
API
classnameify(val)
Name | Type | Description |
---|---|---|
val | Object|Array |
The CSS components to classnameify |
Returns: Object
.
License
MIT © Joakim Carlstein