⊗mkLsBsACB 31 of 41 menu

Using Code Block for Animation in LESS

Let's make a function that sets animation keyframes:

.keyframes(@name, @code) { @keyframes @name {@code();} }

Let's use our function:

.keyframes(anim, { from { width: 100px; } to { width: 200px; } });

Compilation result:

@keyframes anim { from { width: 100px; } to { width: 200px; } }
enru