css-sibling
v1.0.1
Published
Add a css sibling class selector to any first level class selector.
Downloads
6
Readme
css-sibling
Add a css sibling class selector to any first level class selector.
usage
/* src */
.a{
color: red
}
.b, .c{
color: black
}
.c > .e .f{
color: green
}
.d.v{
font-size: 10px
}
/* run */
var cssSibling = require('css-sibling')
cssSibling(src, 'sibling', result => {
console.log(result)
})
/* result */
.a.sibling{
color: red
}
.b.sibling, .c.sibling{
color: black
}
.c.sibling > .e .f{
color: green
}
.d.v.sibling{
font-size: 10px
}
api
cssSibling(src, siblingClass, done)
src<string|buffer>
css sourcesiblingClass<string>
sibling class selector namedone(newcss)<function>
rewrote callback with the new source