From d306ab2b8f871fbf505519468bfbaed91deaf7e0 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 14 Feb 2023 19:53:54 +0800 Subject: [PATCH] Remove Fomantic-UI's `.hidden` CSS class for menu elements (#22895) * Like #22851 * All other dropdown menu elements do not have such `hidden` class. * Actually the dropdown menu elements do not need it in HTML, so this PR removes it. * There is already `.ui.dropdown .menu { display: none; }`, so when loading the page, the menu is correctly hidden initially, no need to add any more CSS classes. * The Fomantic UI's `.hidden` class should still exist until there is no its checkbox/dropdown module anymore. The Fomantic UI JS code still addes `hidden` for `ui checkbox` and addes `transition hidden` for `ui menu` at the moment. * This PR also cleans the legacy inline `style`, which is quite hacky and no need anymore. All these dropdown menus work well. I have tested these 5 places: * The code search from User Profile * The issue sidebar to lock issue * The repo search form * The repo setting page: branch list * The repo setting page: merge option list Screenshot: ![image](https://user-images.githubusercontent.com/2114189/218534515-e7dfe291-6765-4e0b-833c-b74f17e30117.png) --- templates/code/searchform.tmpl | 2 +- templates/repo/issue/view_content/sidebar.tmpl | 2 +- templates/repo/search.tmpl | 2 +- templates/repo/settings/branches.tmpl | 2 +- templates/repo/settings/options.tmpl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/code/searchform.tmpl b/templates/code/searchform.tmpl index 17d1944e1..c4d05cd59 100644 --- a/templates/code/searchform.tmpl +++ b/templates/code/searchform.tmpl @@ -4,7 +4,7 @@