Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not merge properties with unset #633

Merged
merged 1 commit into from Oct 12, 2018

Conversation

jordrake
Copy link
Contributor

I encountered this issue whilst using cssnano (great tool by the way, thank you very much!) and believe it falls into the same category as initial and inherit (where it impacts the entire property).

I wasn't sure if I need to create an issue first but if I do please let me know.

I realise that this is growing in complexity and could be done with a more generic solution (similar to the reserved keyword arrays I see in other packages within this repo) so I am happy to convert this file to that approach if you like. Similarly, I could also add 'none' to not be merged too.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

For me looks good, thanks!

@coveralls
Copy link

coveralls commented Oct 12, 2018

Coverage Status

Coverage decreased (-0.04%) to 99.126% when pulling 25fe0de on jordrake:merge-unset into 15076f1 on cssnano:master.

@alexander-akait
Copy link
Member

@jordrake Looks we need one-two additional tests to increase coverage

@jordrake jordrake force-pushed the merge-unset branch 2 times, most recently from 14111bb to d6839f6 Compare October 12, 2018 12:09
@jordrake
Copy link
Contributor Author

Just looking into the coverage right now, seems that some of those return falses are never getting hit which is curious!

@alexander-akait
Copy link
Member

@jordrake let's solve this in next refactor 👍

@alexander-akait alexander-akait merged commit 857075c into cssnano:master Oct 12, 2018
@alexander-akait
Copy link
Member

Thanks for work!

@jordrake
Copy link
Contributor Author

jordrake commented Oct 12, 2018

I figured out what it is. The test case only reach canMerge if they contain all of the properties (TRBL) of the box.

jordrake@51f26ac corrects it

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.

None yet

4 participants