leafo/lessphp — Issue #194: @keyframes mixin support - feature request
Author: avaly
Created: 2012-02-18 15:08:27+00:00
State: open

The only thing that LESS or lessphp can't do so far is help us write faster @keyframes blocks.

I would imaging the following LESS code:

```less
.keyframes(@name, @content) {
@-webkit-keyframes @name {
@content;
}
@-moz-keyframes @name {
@content;
}
@keyframes @name {
@content;
}
}

.keyframes(animation-name, (
0% { background-color: #fff; }
50% { background-color: #ffc; }
100% { background-color: #fcf; }
));
```

Would produce the CSS output:

```css
@-webkit-keyframes animation-name {
0% { background-color: #fff; }
50% { background-color: #ffc; }
100% { background-color: #fcf; }
}
@-moz-keyframes animation-name {
0% { background-color: #fff; }
50% { background-color: #ffc; }
100% { background-color: #fcf; }
}
@keyframes animation-name {
0% { background-color: #fff; }
50% { background-color: #ffc; }
100% { background-color: #fcf; }
}
```

Of course, it would be perfect if we could use other mixins inside the @content.

Is there some way to achieve this with the current version?