webkit-scrollbar-class
v1.0.0
Published
Create a random class name that implements scrollbar pseudoclass styling in CSS
Downloads
182
Maintainers
Readme
webkit-scrollbar-class ![Build Status](https://travis-ci.org/bendrucker/webkit-scrollbar-class.svg?branch=master)
Create a random class name that implements scrollbar pseudoclass styling in CSS
Install
$ npm install --save webkit-scrollbar-class
Usage
var scrollbar = require('webkit-scrollbar-class')
var className = scrollbar({
main: {
width: '1px'
},
track: {
background: 'blue'
},
thumb: {
background: 'red'
}
})
//=> cikpsfdg40000z9oj9dkwfzas
API
scrollbar(styles)
-> string
Returns a string ID.
styles
Required
Type: object
An object containing {main, track, thumb}
, implementing:
::-webkit-scrollbar
::-webkit-scrollbar-track
::-webkit-scrollbar-thumb
License
MIT © Ben Drucker