css-purge icon indicating copy to clipboard operation
css-purge copied to clipboard

bug: the line that's after one with "important" is missed

Open iiiiiiiiiix opened this issue 5 years ago • 0 comments

Hello. I want to remove duplicate declarations in my css. Some of them contain rules with and without "important".

I've tried simple example but found the following behaviour (everything is set to false in the config)

Input:

body {
    padding: 5px !important;
    margin: 5px;
    font-size: 15px;
}

body {
    padding: 10px;
}

Output:

body {
  padding: 5px !important;
  font-size: 15px;
  padding: 10px;
}

The margin is missed.


Input:

body {
    padding: 5px;
    margin: 5px;
    font-size: 15px;
}

body {
    padding: 10px;
}

Output:

body {
  margin: 5px;
  font-size: 15px;
  padding: 10px;
}

Everything is ok.

What's the problem? Am I doing something wrong?

iiiiiiiiiix avatar Nov 28 '19 11:11 iiiiiiiiiix