diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-05-02 00:08:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-01 12:08:37 -0400 |
commit | 3e7101dd64e4cd5d9ecfd4dbe0c991aacf99bf87 (patch) | |
tree | 33b7877eeab398d315b790f3565fd95c0bff56b8 /web_src/css/base.css | |
parent | 5adf32b48eb97462d6164b85bd23be544732e338 (diff) | |
download | gitea-3e7101dd64e4cd5d9ecfd4dbe0c991aacf99bf87.tar.gz gitea-3e7101dd64e4cd5d9ecfd4dbe0c991aacf99bf87.zip |
Improve "new-menu" (#24465)
I am not sure what "new-menu" means, but I think we need to fix these
problems:
1. it shouldn't have "stackable", which makes the items stacked when
width is small. the `new-menu` already has `overflow: auto`
2. `justify-content: center` doesn't work with `overflow: auto` (for
small width), so use `margin: auto`
*
https://bhch.github.io/posts/2021/04/centring-flex-items-and-allowing-overflow-scroll/
3. `runner-new-menu` is dead code (copying & pasting ?)
Diffstat (limited to 'web_src/css/base.css')
-rw-r--r-- | web_src/css/base.css | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web_src/css/base.css b/web_src/css/base.css index e10d3d1213..d7870cd2b5 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1915,7 +1915,7 @@ img.ui.avatar, } .ui.menu.new-menu .item { - margin: 0 !important; + margin-bottom: 0 !important; /* reset fomantic's margin, because the active menu has special bottom border */ } @media (max-width: 767px) { @@ -1924,8 +1924,13 @@ img.ui.avatar, } } +.ui.menu.new-menu .item:first-child { + margin-left: auto; /* "justify-content: center" doesn't work with "overflow: auto", so use margin: auto */ +} + .ui.menu.new-menu .item:last-child { padding-right: 30px !important; + margin-right: auto; } .ui.menu.new-menu::-webkit-scrollbar { |