Tweak user card UI

This commit is contained in:
Toby Zerner 2015-05-06 11:24:42 +09:30
parent abf49fd07a
commit 447cf1bcb1
2 changed files with 8 additions and 4 deletions

View File

@ -50,12 +50,13 @@ export default class PostHeaderUser extends Component {
component.showCard(true);
m.redraw();
setTimeout(() => component.$('.user-card').addClass('in'));
}, 250);
}, 500);
}).bind('mouseout', '> a, .user-card', function() {
clearTimeout(timeout);
timeout = setTimeout(function() {
component.$('.user-card').removeClass('in').one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function() {
component.showCard(false);
m.redraw();
});
}, 250);
});

View File

@ -203,12 +203,15 @@
& .user-card {
position: absolute;
top: 100%;
top: -10px;
left: -100px;
z-index: @zindex-popover;
.transition(~"opacity 0.2s, margin-top 0.2s");
.transition(~"opacity 0.2s, transform 0.2s");
transform: scale(0.95);
transform-origin: left top;
&.in {
margin-top: 5px;
transform: scale(1);
}
}
}