From d965fd1dbca5bc3f94161e743e6193f7f76ce42e Mon Sep 17 00:00:00 2001 From: tobiasHeinke Date: Sun, 28 Apr 2024 14:21:32 +0200 Subject: [PATCH 1/3] version switch: turn into a custom element store state as attr instead of class to be then replaced by upcoming custom states https://html.spec.whatwg.org/multipage/custom-elements.html#custom-state-pseudo-class remove function name prefix no longer confusable with JQuery move animation to css transition requires visibility instead of display not toggle/ replace event listeners no class properties split toggle function css: use tagnames instead of class if not div rename class selected -> current mark previously selected with a class --- .../templates/sidebar/variant-selector.html | 48 ++-- build_files/theme/css/version_switch.css | 64 +++-- build_files/theme/js/version_switch.js | 268 +++++++++--------- 3 files changed, 199 insertions(+), 181 deletions(-) diff --git a/build_files/templates/sidebar/variant-selector.html b/build_files/templates/sidebar/variant-selector.html index 2b01f1ddc..0d5e31b71 100644 --- a/build_files/templates/sidebar/variant-selector.html +++ b/build_files/templates/sidebar/variant-selector.html @@ -1,32 +1,36 @@
-