mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
17 lines
392 B
JavaScript
17 lines
392 B
JavaScript
import _ from 'lodash'
|
|
import postcss from 'postcss'
|
|
import escapeClassName from './escapeClassName'
|
|
|
|
export default function(className, properties) {
|
|
const decls = _.map(properties, (value, property) => {
|
|
return postcss.decl({
|
|
prop: `${property}`,
|
|
value: `${value}`,
|
|
})
|
|
})
|
|
|
|
return postcss.rule({
|
|
selector: `.${escapeClassName(className)}`,
|
|
}).append(decls)
|
|
}
|