0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-10-30 02:39:24 +01:00
gitea/web_src/css
silverwind 99d7ef5091
Prevent layout shift in <overflow-menu> items (#29831)
There is a small layout shift in when active tab changes. Notice how the
actions SVG is unstable:


![](https://github.com/go-gitea/gitea/assets/115237/a6928e89-5d47-4a91-8f36-1fa22fddbce7)

This is because the active item with bold text is wider then the
inactive one. I have applied [this
trick](https://stackoverflow.com/a/32570813/808699) to prevent this
layout shift. It's only active inside `<overflow-menu>` because I wanted
to avoid changing HTML and doing it in regular JS would cause a flicker.
I don't expect us to introduce other similar menus without
`<overflow-menu>`, so that place is likely fine.


![after](https://github.com/go-gitea/gitea/assets/115237/d6089924-8de6-4ee0-8db4-15f16069a131)

I also changed the weight from 500 to 600, slightly reduced horizontal
padding, merged some tab-bar related CSS rules and a added a small
margin below repo-header so it does not look so crammed against the
buttons on top.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-03-20 17:00:35 +00:00
..
chroma Chroma color tweaks (#26978) 2023-09-08 11:03:01 -05:00
codemirror Remove EasyMDE focus outline on text (#25328) 2023-06-18 04:10:07 +00:00
editor Clean up diff header css and reduce global textarea min-height (#29232) 2024-02-18 14:51:21 +00:00
features Refactor "shortsha" (#26877) 2023-09-03 02:58:52 +00:00
markup Make blockquote border size less aggressive (#29124) 2024-02-10 14:55:46 +02:00
modules Load citation JS only when needed (#29855) 2024-03-17 11:04:59 +01:00
repo Prevent layout shift in <overflow-menu> items (#29831) 2024-03-20 17:00:35 +00:00
shared Add <overflow-menu>, rename webcomponents (#29400) 2024-03-15 02:05:31 +00:00
standalone Add toasts to UI (#25449) 2023-06-27 02:45:24 +00:00
themes Light theme color enhancements (#29830) 2024-03-16 02:33:01 +01:00
actions.css fix issues on action runners page (#27226) 2023-09-24 14:12:21 -04:00
admin.css User details page (#26713) 2023-08-31 11:21:18 +02:00
base.css Prevent layout shift in <overflow-menu> items (#29831) 2024-03-20 17:00:35 +00:00
dashboard.css Remove the negative margin from .page-content (#29922) 2024-03-20 11:21:18 +00:00
explore.css Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
font_i18n.css Fix @font-face overrides (#24855) 2023-05-24 01:48:51 +00:00
form.css Unify search boxes (#29530) 2024-03-14 23:24:59 +00:00
helpers.css Migrate border and margin classes to Tailwind (#29828) 2024-03-18 14:47:05 +00:00
home.css avoid hard-coding height in language dropdown menu (#25986) 2023-07-19 23:30:57 +02:00
index.css Remove fomantic message module (#29856) 2024-03-17 11:21:14 +08:00
install.css Make "install page" respect environment config (#25648) 2023-07-09 22:43:37 +00:00
org.css Unify organizations header (#29248) 2024-02-23 01:24:57 +01:00
repo.css Refactor clone-panel styles (#29861) 2024-03-17 12:40:42 +00:00
review.css Don't reload timeline page when (un)resolving or replying conversation (#28654) 2024-01-24 03:26:28 +00:00
user.css Remove the negative margin from .page-content (#29922) 2024-03-20 11:21:18 +00:00