Skip to content

Conversation

@HellPat
Copy link

@HellPat HellPat commented Nov 3, 2017

Fixes issue from that comment: #16 (comment)

@adamwathan wants this to happen, so here it is ;-)

#16 (comment)

Empty media queries are added if i do not use @tailwind utilities and use only preflight.

Copy link
Member

@adamwathan adamwathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks @psren! A couple minor tweaks but happy to merge right after that.

css.append(mediaQuery)

if(mediaQuery.nodes.length) {
// do not add media query without any rules or comments
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor style changes but can you add a space after the if, and remove the comment? I think the code is expressive enough to me without it 👍

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

.then(result => {
expect(result.css).toBe('')
})
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another minor change but can you make sure this file ends with a newline character?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

})
})

it('Do not change css if tailwind is not used at all', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more comment actually! Try to name the tests so that they read properly starting with the word "it". In this case maybe this would be a good name:

"does not add any CSS if no Tailwind features are used"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done and thanks for the input :-)

@adamwathan adamwathan merged commit 5c585f8 into tailwindlabs:master Nov 3, 2017
@adamwathan
Copy link
Member

Awesome, thanks @psren!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants