Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

CSS optmizer #187

Open
hallodom opened this issue Mar 21, 2012 · 2 comments
Open

CSS optmizer #187

hallodom opened this issue Mar 21, 2012 · 2 comments

Comments

@hallodom
Copy link

Hi, are there any plans to incorporate a css optimiser option? I find myself avoiding features in Less such as inheritance because I'm aware that they aren't optimised and repeats redundant declarations.

Less example:

 .strong { background:#31343b; color:white; font-weight:normal; padding:2px 10px; margin-right:10px; }
 .small { .strong; background:#ff0000; }

Compliles to:

.strong {
  background: #31343b;
  color: white;
  font-weight: normal;
  padding: 2px 10px;
  margin-right: 10px;
}
.small {
  background: #31343b;
  color: white;
  font-weight: normal;
  padding: 2px 10px;
  margin-right: 10px;
  background: #ff0000;
}

When optimised it should be:

.strong,.small{background:#31343b;color:white;font-weight:normal;padding:2px 10px;margin-right:10px}
.small{background:#ff0000}
@hallodom
Copy link
Author

At least optimise when you're using inheritance so you can control the ordering of you're classes?

@mindfullsilence
Copy link

Agreed. Would be great if whenever using a mixin, it output as shown above.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants