twbs/bootstrap — pull request #14410 by seven-phases-max (2014-08-17 16:55:05+00:00)
Title: Refactoring grid implementation.

This is a "preview" PR for discussion and feedback. Since there're several possible methods each with its own pros and cons I had to write a small [(pseudo)-blog-post about this](https://github.com/seven-phases-max/less.curious/blob/master/articles/rbgi.md). Please read.

---
This PR implements **Method #2** (as a proof-of-concept), but if **Method #1** is acceptable (i.e. "dummy selectors" are fine to appear in the final CSS) I would actually prefer it (I'll commit the corresponding code then). The generated CSS should be equal to what it is now except that the generated grid classes are (intentionally) reordered (note also that all mixins are rewritten and reordered so the `diff` view does not make any sense).

---
A few questions. I'm not sure if "coding guidelines" questions (specifically "What Less features may we use?") are appropriate here but since this directly affects the code in this PR I guess I'll ask. In particular:
- [Pattern Matching](http://lesscss.org/features/#mixins-parametric-feature-pattern-matching). I see `when` guards are *always* used even where the "Pattern-Matching" would result in more clean and less verbose code: is there any special reason behind this?
- Temporary variables. I also was not able to find (though I could just miss) not even a single temporary variable (specifically a temporary variable inside a mixin) in the sources: is there any special reason for this?

Thanks.