Is there any way to pass one mixin or style\'s declaration to another mixin as an input parameter?
Let\'s take a look at an example with animation keyframes. Followi
You can also use my solution to generate CSS keyframes: https://github.com/thybzi/keyframes
Features:
keyframes
rule (and the number can be easily augmented, if needed)animation
rules, so:
animation
rules can use the same keyframe with different values for timing, repeating, etc,animation
ruleBasic usage:
// Preparing styles for animation points
.keyframes-item(fadeIn, 0%) {
opacity: 0;
}
.keyframes-item(fadeIn, 100%) {
opacity: 1;
}
// Generating keyframes
.keyframes(fadeIn);
// Applying animation to fade-in block in 1.5 seconds
.myBlock {
.animation(fadeIn 1.5s);
}