1.0.0 • Published 8 years ago

placeholder-class v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

placeholder-class Build Status

Create a random class name that implements placeholder pseudoclass styling in CSS

Install

$ npm install --save placeholder-class

Usage

Calling placeholder returns a randomized class name and appends the supplied CSS rules to the document <head> for that class. That class can then be used to apply placeholder styling to any element.

var placeholder = require('placeholder-class')

var className = placeholder({color: 'red'})
//=> cikpsfdg40000z9oj9dkwfzas

API

placeholder(styles) -> string

styles

Required
Type: object

A DOM style object.

License

MIT © Ben Drucker