You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove duplicate properties on matching selectors #10
@matt3224, I think cssnano will merge these rules if they are sequential. Otherwise, if the selectors are an exact match, I think cssnano will remove the overwritten declarations from the earlier rule(s). Is this right, @ben-eb?
Ok so looks like csso does this, but not completely I have a test case here. The issue is with css shorthand, not sure if there is another tool that will do this?
Activity
jonathantneal commentedon May 17, 2017
@matt3224, I think cssnano will merge these rules if they are sequential. Otherwise, if the selectors are an exact match, I think cssnano will remove the overwritten declarations from the earlier rule(s). Is this right, @ben-eb?
mattpilott commentedon May 17, 2017
Hey @jonathantneal I have just installed cssnano with a little help from @ben-eb && @cmnstmntmn it does not appear to do this out-of-the-box 🙁
mattpilott commentedon May 17, 2017
Ok so looks like csso does this, but not completely I have a test case here. The issue is with css shorthand, not sure if there is another tool that will do this?
marcustisater commentedon May 19, 2017
Here is the original plugin that cssnano uses https://github.com/ben-eb/postcss-discard-duplicates. I think you should post a issue with your test case.
marcustisater commentedon May 19, 2017
Aha.. wait. You are correct... 😅 It will not discard the rule if it has a different property value.
mattpilott commentedon May 19, 2017
Take a look at refresh-sf that works very well, totally what i need. However i cannot get clean-css to work the same way. Any ideas?