mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 14:34:09 +00:00
feat(core): toggle visbility in CSS when menu is show/hidden
* Better performance as browser would not render element when it is hidden * Better accessbility support for screen readers
This commit is contained in:
parent
60d57dea85
commit
e2a6a0355c
|
@ -15,6 +15,7 @@
|
|||
// Collaspe animation setup
|
||||
.citizen-card-hide( @position, @axis: '' ) {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
transform: ~'scale@{axis}( 0 )';
|
||||
transform-origin: @position;
|
||||
|
@ -23,13 +24,16 @@
|
|||
// Expand animiation setup
|
||||
.citizen-card-show() {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
pointer-events: auto;
|
||||
transform: none;
|
||||
// HACK: So that visiblity won't wait 250ms to become visible
|
||||
transition-delay: 0ms;
|
||||
}
|
||||
|
||||
// Transition animation
|
||||
.citizen-card-transition() {
|
||||
transition: @transition-transform, @transition-opacity--transform;
|
||||
transition: @transition-transform, @transition-opacity--transform, @transition-visibility--transform;
|
||||
}
|
||||
|
||||
// To hide objects, but keep them accessible for screen-readers
|
||||
|
|
|
@ -227,6 +227,9 @@
|
|||
@transition-transform: transform @transition-timing-slow cubic-bezier(0.215,0.61,0.355,1);
|
||||
// Only used with transform
|
||||
@transition-opacity--transform: opacity @transition-timing-slow ease;
|
||||
// Execute after every transition is done
|
||||
// Need to use with transition-delay: 0ms
|
||||
@transition-visibility--transform: visibility 0ms linear @transition-timing-slow;
|
||||
@transition-height: height @transition-timing-slow cubic-bezier(0.215,0.61,0.355,1);
|
||||
|
||||
/* Box shadow */
|
||||
|
|
Loading…
Reference in a new issue