refactor(core): merge card content fade animation into mixin

This commit is contained in:
alistair3149 2022-05-11 22:06:33 -04:00
parent a2577db3c8
commit 478a8396af
No known key found for this signature in database
GPG key ID: 94D081060FD3DD9C
4 changed files with 9 additions and 12 deletions

View file

@ -13,12 +13,18 @@
}
// Collaspe animation setup
.citizen-card-hide( @position, @axis: '' ) {
.citizen-card-hide( @position, @axis: '', @fadeChildren: true ) {
opacity: 0;
pointer-events: none;
transform: ~'scale@{axis}( 0 )';
transform-origin: @position;
visibility: hidden;
& when ( @fadeChildren ) {
> * {
opacity: 0;
}
}
}
// Expand animiation setup

View file

@ -12,7 +12,7 @@
margin-top: -0.75rem;
//border-radius: 0 0 var( --border-radius--medium ) var( --border-radius--medium );
.citizen-card;
.citizen-card-hide( 50% 0, Y );
.citizen-card-hide( 50% 0, Y, false );
// Well this won't be loaded before .citizen-animation-ready anyways
.citizen-card-transition();
@ -107,9 +107,5 @@
&--expanded {
.citizen-card-show( false );
.citizen-typeahead-suggestion {
.citizen-card-content-show;
}
}
}

View file

@ -13,11 +13,6 @@
will-change: transform;
.citizen-card();
.citizen-card-hide( 0 0 );
// For transition purpose
> * {
opacity: 0;
}
}
&__header {

View file

@ -17,7 +17,7 @@
margin: var( --margin-header ) var( --padding-header );
gap: 0.25rem;
.citizen-card();
.citizen-card-hide( 100% 0, X );
.citizen-card-hide( 100% 0, X, false );
/**
* Loading indicator for searchbox