mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-08-30 17:30:23 +02:00
feat: coin-icon earned (with animation)
This commit is contained in:
@@ -33,6 +33,7 @@ stories.add('icon', () => {
|
||||
'snes-logo': 'snes-logo',
|
||||
'snes-jp-logo': 'snes-jp-logo',
|
||||
'nes-coin': 'nes-coin',
|
||||
'nes-coin earned': 'nes-coin earned',
|
||||
}, 'nes-icon twitter');
|
||||
const selectedSize = radios('size', {
|
||||
default: '',
|
||||
|
@@ -33,4 +33,9 @@
|
||||
|
||||
@include pixelize($size, $coin, $coin-colors);
|
||||
}
|
||||
|
||||
&.earned {
|
||||
animation: rotateIn 1.4s ease-out forwards,
|
||||
fadeOut 2s ease-out forwards;
|
||||
}
|
||||
}
|
||||
|
@@ -7,3 +7,23 @@
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotateIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: rotateY(0) translateY(100%);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: rotateY(1800deg) translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeOut {
|
||||
70% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user