remove empty media queries
This commit is contained in:
parent
9f16bf54ea
commit
e5a9c8926f
2 changed files with 13 additions and 1 deletions
|
|
@ -17,3 +17,11 @@ it('generates the right CSS', () => {
|
|||
expect(result.css).toBe(expected)
|
||||
})
|
||||
})
|
||||
|
||||
it('Does not add something if not used at all', () => {
|
||||
return postcss([tailwind()])
|
||||
.process('')
|
||||
.then(result => {
|
||||
expect(result.css).toBe('')
|
||||
})
|
||||
})
|
||||
|
|
@ -29,7 +29,11 @@ export default function(config) {
|
|||
return cloned
|
||||
})
|
||||
)
|
||||
css.append(mediaQuery)
|
||||
|
||||
if(mediaQuery.nodes.length) {
|
||||
// do not add media query without any rules or comments
|
||||
css.append(mediaQuery)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue