Don't kebabCase property values in defineClass

This commit is contained in:
Adam Wathan 2017-08-26 10:15:24 -04:00
parent 444da7577f
commit fc6ae8d07a
5 changed files with 250 additions and 255 deletions

490
dist/tailwind.css vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@ module.exports = function defineClass(className, properties) {
const decls = _.map(properties, (value, property) => {
return postcss.decl({
prop: _.kebabCase(property),
value: _.kebabCase(value),
value: value,
})
})

View File

@ -16,7 +16,7 @@ var inlineFlexHelper = `.inline-flex {
}`
var backgroundColor = `.bg-1 {
background-color: black
background-color: #bada55
}`
/**
@ -33,11 +33,6 @@ it('generates a rule with a kebab-case selector', () => {
})
it('generates a rule with a kebab-case property name', () => {
let output = defineClass('bg-1', {backgroundColor: 'black'})
let output = defineClass('bg-1', {backgroundColor: '#bada55'})
expect(output.toString()).toEqual(backgroundColor)
})
it('generates a rule with a kebab-case value', () => {
let output = defineClass('inline-flex', {display: 'inlineFlex'})
expect(output.toString()).toEqual(inlineFlexHelper)
})

View File

@ -8,7 +8,7 @@ var config = {
display: 'flex',
},
inlineFlex: {
display: 'inlineFlex',
display: 'inline-flex',
},
}