peterbe / mincss

Tool for finding out which CSS selectors you're NOT using.
https://peterbe.github.io/mincss/
BSD 3-Clause "New" or "Revised" License
854 stars 92 forks source link

Erroneous removal of flexbox #37

Closed Immortalin closed 9 years ago

Immortalin commented 9 years ago

The following css keep on getting removed even though they are necessary.

.login{
    display: flex;
    justify-content: center;
    align-items: center;
}
peterbe commented 9 years ago

mincss doesn't look at the keys. Only the selectors. If it was:

.login{
    foo:bar;
}

mincss wouldn't treat it any differently. Are you sure it really gets deleted, and that it's in the HTML?

Immortalin commented 9 years ago

Can you elaborate? If the CSS framework I am using has foo:bar; and my custom CSS file has foo:bar too it would delete only one of them right? I am using the Marx CSS framework.

peterbe commented 9 years ago

What I'm poorly trying to explain is that it doesn't matter what's between the { and the }. There is only one exception to that rule; if you have something like this:

.someselector {
    /* no mincss */
   xxxxxxxxxxxxxxx
   xxxxxxxxxxxxxxx
   xxxxxxxxxxxxxxx  
}

then it would leave that selector untouched even though there is no <element class="someselector"> anywhere in your HTML.