From 87a8bf256e7cf29a69461b9d225b366de9f368b3 Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Mon, 27 May 2024 23:18:13 -0400 Subject: [PATCH] =?UTF-8?q?refactor(core):=20=E2=99=BB=EF=B8=8F=20various?= =?UTF-8?q?=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/skins.citizen.styles/components/Header.less | 6 ++---- resources/skins.citizen.styles/components/Pagetools.less | 5 +---- .../skins.citizen.styles/components/TableOfContents.less | 2 -- resources/skins.citizen.styles/components/UserMenu.less | 7 ------- resources/variables.less | 4 ++-- 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/resources/skins.citizen.styles/components/Header.less b/resources/skins.citizen.styles/components/Header.less index cefd6dad..e392b9fa 100644 --- a/resources/skins.citizen.styles/components/Header.less +++ b/resources/skins.citizen.styles/components/Header.less @@ -204,12 +204,9 @@ width: auto; height: auto; pointer-events: none; - visibility: hidden; content: ''; background-color: var( --background-color-overlay ); opacity: 0; - transition: var( --transition-menu ); - transition-property: opacity; } } @@ -219,8 +216,9 @@ &::before { pointer-events: auto; - visibility: visible; opacity: 1; + transition: var( --transition-menu ); + transition-property: opacity; } } } diff --git a/resources/skins.citizen.styles/components/Pagetools.less b/resources/skins.citizen.styles/components/Pagetools.less index 0a21f91f..81ea1107 100644 --- a/resources/skins.citizen.styles/components/Pagetools.less +++ b/resources/skins.citizen.styles/components/Pagetools.less @@ -228,19 +228,16 @@ box-shadow: var( --box-shadow-dialog ); .citizen-scroll--down & { - visibility: hidden; box-shadow: none; opacity: 0; transform: translateY( 250% ); } .citizen-scroll--up & { - // Only apply transition on showing because of flickering issue - visibility: visible; opacity: 1; transition: var( --transition-menu ); transition-delay: 250ms; - transition-property: opacity, visibility, transform; + transition-property: opacity, transform; } :not( .page-actions__card ) .mw-list-item { diff --git a/resources/skins.citizen.styles/components/TableOfContents.less b/resources/skins.citizen.styles/components/TableOfContents.less index dfb94a74..652b9cda 100644 --- a/resources/skins.citizen.styles/components/TableOfContents.less +++ b/resources/skins.citizen.styles/components/TableOfContents.less @@ -33,7 +33,6 @@ height: 0; padding-top: 0; padding-bottom: 0; - visibility: hidden; opacity: 0; transition-property: opacity, height, padding; } @@ -94,7 +93,6 @@ height: 2rem; // 1rem text + 1rem padding padding-top: var( --space-xs ); padding-bottom: var( --space-xs ); - visibility: visible; opacity: 1; } } diff --git a/resources/skins.citizen.styles/components/UserMenu.less b/resources/skins.citizen.styles/components/UserMenu.less index 77333fae..dc14a75e 100644 --- a/resources/skins.citizen.styles/components/UserMenu.less +++ b/resources/skins.citizen.styles/components/UserMenu.less @@ -52,10 +52,3 @@ } } } - -// Checkbox hack -#citizen-userMenu__checkbox:checked { - ~ .citizen-userMenu__card { - .citizen-card-show(); - } -} diff --git a/resources/variables.less b/resources/variables.less index d84efb3e..57a0147c 100644 --- a/resources/variables.less +++ b/resources/variables.less @@ -199,8 +199,8 @@ @border-radius--circle: 100%; /* Transitions */ -@transition-hover: 150ms cubic-bezier( 0.215,0.61,0.355,1 ); -@transition-menu: 250ms ease; +@transition-hover: 150ms cubic-bezier( 0.215, 0.61, 0.355, 1 ); +@transition-menu: 250ms cubic-bezier( 0.4, 0, 0.2, 1 ); /* Shadow */ /* Box shadow */