minify icon indicating copy to clipboard operation
minify copied to clipboard

Removing styles with value "none"

Open helisoncruz opened this issue 4 years ago • 1 comments

I have the following style for tag a, after minify the result is like in the second code. text-decoration is gone, as is pseudo :active too.

a:hover, a:active {
    color: #26a151;
    text-decoration: none;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

Output:

a, a:focus {
    color: #2dbe60;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

helisoncruz avatar Dec 02 '21 18:12 helisoncruz

@helisoncruz I tried to reproduce the issue and it doesn't happen with just the snippet you provided, in my test the output is:

a:hover,a:active{color:#26a151;text-decoration:none;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}

Could you please provide a test case? The current unit tests are in tests/css/CSSTest.php, to use as example.

simondud avatar Apr 12 '22 14:04 simondud

Input and output are very different: pseudo classes & color have also changed. Those are all transformations that the minifier doesn't do, so I would expect something else, unrelated, is amiss. I'm closing this ticket - feel free to reopen with more detail.

matthiasmullie avatar Nov 16 '22 12:11 matthiasmullie