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

Why only adjacent selectors / MQ ? #25

Open
raphaelgoetter opened this issue Nov 17, 2014 · 1 comment
Open

Why only adjacent selectors / MQ ? #25

raphaelgoetter opened this issue Nov 17, 2014 · 1 comment

Comments

@raphaelgoetter
Copy link

Hello,

I wonder why only the adjacent selectors / Media Queries / keyframes are packed.

Would it be possible to add an option (a checkbox labelled "great power / great responsibility") which allows packing of non-adjacent stuff ?

@macgyver
Copy link

macgyver commented Jul 2, 2015

I was wondering the same thing - I noticed that this input:

.a .b {
    padding-right: 10px;
}

.a .b .c {
    position: absolute;
}

.a .b {
    padding-bottom: 10px;
}

has the following output:

.a .b {
  padding-right: 10px;
}

.a .b .c {
  position: absolute;
}

.a .b {
  padding-bottom: 10px;
}

when it's possible to see that the top and bottom selectors could be combined.

Is it done this way because there's no way to guarantee the precedence is maintained otherwise?

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