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

Removing of overridden properties #214

Closed
eGavr opened this issue Jan 28, 2014 · 3 comments
Closed

Removing of overridden properties #214

eGavr opened this issue Jan 28, 2014 · 3 comments

Comments

@eGavr
Copy link

eGavr commented Jan 28, 2014

There is a bug with overridden colors:

.a {
    color: #fff;
    color: rgb(100,100,100);
    color: rgba(100,100,100,100);
    color: hsl(100,100,100);
    color: hsla(100,100,100,100);
    color: test;
}

After minimization I've recieved this:

.a{color:#fff;color:#646464;color:rgba(100,100,100,100);color:#fff;color:hsla(100,100,100,100);color:test}

Why

color:#fff 

was not removed? It is overridden by

color:test
@GoalSmashers
Copy link
Contributor

Please see discussion in #210 - it is the same case here.
We assume people keep redefining same property on purpose of fallbacks, like in your case how would you know if color:test does not override color:rgb(...) and others too?

It should be much smarter in 2.1 though.

@eGavr
Copy link
Author

eGavr commented Jan 29, 2014

What about this example?

.a {
    color: red;
    color: red;
}

is minimized to

.a{color:red;color:red}

BUT

.a {
    color: red;
    property:value;
    color: red;
}

is minimized to


.a{property:value;color:red}

Why in the second variant was the declaration color:red overridden and why in the first variant wasn't?
Please, tell me are you going to minimize such cases or leave them as they are?

@GoalSmashers
Copy link
Contributor

Same story here. It will be fixed in 2.1 - namely by #168.

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

No branches or pull requests

2 participants