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

Possible to merge properties of same selector in different places? #451

Closed
folosophy opened this issue Aug 4, 2017 · 2 comments
Closed

Comments

@folosophy
Copy link

Let's say I have the following:

html {
  color: red;
}

html {
  left: 4px;
}

This will output two of the same selectors in the final CSS file, which seems wasteful.

Is there any way to combine properties, so the CSS just prints one selector?

html {
  color: red;
  left: 4px;
}
@folosophy folosophy changed the title Possible to combine properties of same selector in different places? Possible to merge properties of same selector in different places? Aug 4, 2017
@seven-phases-max
Copy link
Member

In short: no (Less is not CSS optimizer/analyzer) - you can use aggressive clean-css opts though. See also less/less.js#930.

@seven-phases-max
Copy link
Member

Closing as a dupicate of less/less.js#930 (and wrong repo).

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