mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Don't kebabCase property values in defineClass
This commit is contained in:
parent
444da7577f
commit
fc6ae8d07a
490
dist/tailwind.css
vendored
490
dist/tailwind.css
vendored
File diff suppressed because it is too large
Load Diff
2
dist/tailwind.css.map
vendored
2
dist/tailwind.css.map
vendored
File diff suppressed because one or more lines are too long
@ -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,
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -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)
|
||||
})
|
||||
|
||||
@ -8,7 +8,7 @@ var config = {
|
||||
display: 'flex',
|
||||
},
|
||||
inlineFlex: {
|
||||
display: 'inlineFlex',
|
||||
display: 'inline-flex',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user