Skip to content

Instantly share code, notes, and snippets.

@una
Created February 11, 2015 22:45
Show Gist options
  • Save una/8e42a2b58a9a37872323 to your computer and use it in GitHub Desktop.
Save una/8e42a2b58a9a37872323 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="foo">
Hello World
</div>
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
$animations: (
'fade-in': (
0%: (
opacity: 0
),
100%: (
opacity: 1
)
),
'slide-in' : (
0%: (
transform: translateY(-100%)
),
100%: (
transform: translateY(0)
)
)
);
@mixin animate($name) {
@if map-has-key($animations, $name) {
@each $position, $change in map-get($animations, $name) {
@keyframe #{$name} {
#{$position} {
@each $prop, $val in $change {
#{$prop}: #{$val}
}
}
}
}
}
}
@include animate('fade-in');
@include animate('slide-in');
Invalid CSS after "": expected selector, was "0%"
<div class="foo">
Hello World
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment