skidding/obvious-buttons — pull request #5 by RadValentin (2014-05-11 10:33:42+00:00)
Title: Optimize LESS code for smaller CSS footprint

Optimize LESS code for smaller CSS footprint
===

If you take a look at the CSS that's being generated by the current LESS code, you'll see that there's a lot of repetition going on. For example the [base button](https://github.com/skidding/obvious-buttons/blob/master/src/obvious-buttons.css#L39-#L43) `background` and `color` get applied to [every](https://github.com/skidding/obvious-buttons/blob/master/src/obvious-buttons.css#L150-#L153) [other](https://github.com/skidding/obvious-buttons/blob/master/src/obvious-buttons.css#L246-#L250) [button](https://github.com/skidding/obvious-buttons/blob/master/src/obvious-buttons.css#L342-#L346) size.

By setting the button `color` and `background-color` inside the `.button` class an not in the `.buttonSize` mixin, I was a able to do away with much of that repetition.
Another thing was to merge button type selectors that couldn't be taken out of `.buttonSize` due to their reliance on `@depth`.
```css
&.button-primary, &.button-info, &.button-success, &.button-warning, &.button-danger, &.button-inverse {
.boxShadow(inset 0 -@depth 0 0 rgba(0, 0, 0, 0.2));
}
```
With these changes the outputted CSS will only be 214 lines vs 429 lines in the original version.