From 2c9a5f45ec3251862984a453a145e39791142512 Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Sun, 1 May 2022 22:11:31 -0400 Subject: [PATCH] refactor(core): merge menu content show transition into mixin --- resources/mixins.less | 7 +++++++ resources/skins.citizen.search/skins.citizen.search.less | 5 +---- resources/skins.citizen.styles/Drawer.less | 5 +---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/resources/mixins.less b/resources/mixins.less index e618b194..181b5a3e 100644 --- a/resources/mixins.less +++ b/resources/mixins.less @@ -31,6 +31,13 @@ transition-delay: 0ms; } +// Fade content when users open the menu +// But GTFO instantly when they close the menu +.citizen-card-content-show() { + opacity: 1; + transition: @transition-opacity--transform; +} + // Transition animation .citizen-card-transition() { transition: @transition-transform, @transition-opacity--transform, @transition-visibility--transform; diff --git a/resources/skins.citizen.search/skins.citizen.search.less b/resources/skins.citizen.search/skins.citizen.search.less index c7da52e9..71e924a2 100644 --- a/resources/skins.citizen.search/skins.citizen.search.less +++ b/resources/skins.citizen.search/skins.citizen.search.less @@ -110,10 +110,7 @@ .citizen-card-show(); .citizen-typeahead-suggestion { - opacity: 1; - // Fade content when users open the menu - // And GTFO instantly when they close the menu - transition: @transition-opacity--transform; + .citizen-card-content-show; } } diff --git a/resources/skins.citizen.styles/Drawer.less b/resources/skins.citizen.styles/Drawer.less index 34c556e7..c69d5359 100644 --- a/resources/skins.citizen.styles/Drawer.less +++ b/resources/skins.citizen.styles/Drawer.less @@ -47,10 +47,7 @@ #mw-drawer { &-header, &-menu { - opacity: 1; - // Fade content when users open the menu - // And GTFO instantly when they close the menu - transition: @transition-opacity--transform; + .citizen-card-content-show; } } }