cloudhead/less.js — pull request #915 by dmcass (2012-08-22 19:40:35+00:00)
Title: Do not allow division when outside of parens (Fixes #146; indirectly fixes #122)

Quite a few changes here so please review carefully. If you'd prefer me to squash this into one commit so that it's more straight-forward, please let me know and I'll close this and open a new PR. Pinging @cloudhead, @agatronic, @matthewdl, @Synchro

A few notes on how division will work with this change:

* If there is a slash outside of parens and inside a value, it will compile to a literal slash
* If there is a slash inside a function call or a mixin call, it will not require extra parentheses to initiate an operation
* The exception to the above rules is media queries, where I intentionally did not count parens outside of the value because of rules like `aspect-ratio`.

Let me know if the way any of this works is not as intuitive as you have imagined. Mixin calls, for example, is one thing that I debated about allowing operations in without extra parens.

--

**Example**
*Input*

```css
@var: 2px;
.mixin(@a) {
border: @a solid #000;
}

@media only screen and (aspect-ratio: 16/9) {
body {
margin: (@var * 10 / 5);
padding: round(@var * 10 / 3);
border-radius: @var / 5px;
.mixin(@var / 2);
}
}
```

*Output*
```css
@media only screen and (aspect-ratio: 16/9) {
body {
margin: 4px;
padding: 7px;
border-radius: 2px/5px;
border: 1px solid #000;
}
}
```