Paratron/SimpLESS — Issue #19: Hex to RGB[A] Conversion
Author: alixaxel
Created: 2011-12-29 20:16:37+00:00
State: open

I was implementing the following mixin* for alpha backgrounds with hex fallback:

```
.rgba(@hex, @alpha: .8)
{
background: @hex;
background: @hex + rgba(0, 0, 0, @alpha);
}

body {
.rgba(#ff0, 0.8);
}
```

SimpLESS compiles this into:

```
/* This beautiful CSS-File has been crafted with LESS (lesscss.org) and compiled by simpLESS (wearekiss.com/simpless) */
body {
background: #ffff00;
background: #ffff00;
}
```

I haven't actually tried this with LESS.js yet but lessPHP (http://leafo.net/lessphp/editor.html) compiles to:

```
body {
background:#ffff00;
background:rgba(255,255,0,0.8);
}
```

Is this a SimpLESS issue or a new "feature" of the LESS parser?

*http://stackoverflow.com/questions/4445238/less-css-preprocessor-is-there-a-way-to-map-a-single-color-to-an-rgb-and-rgba-d