-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Labels
Description
Description
- Open Firefox 118.0.2.
- Navigate to the "Commits" list on a repository you have edit rights to.
- Click on the SHA1 hash of a commit.
URL: https://try.gitea.io/rhdunn/test-options-button/commit/ad9c1583bd7bf8f18bf20112494b5ba7b5d25c7f
Investigation
- Open the developer tools.
- Highlight the Operations button.
- Scroll down to the
.ui.dropdownrule in the Rules tab. - Deselect the
line-height: var(--line-height-default)CSS rule.
After step 4 above, the height of the Options button shrinks to the same height as the Browse Source button.
The :root element defines the --line-height-default value as normal.
The .ui.button style has line-height: 1em;. Setting this on the Options div element makes the height consistent.
Conclusion
Firefox is prioritizing the .ui.dropdown rule for the line height when the classes ui dropdown button are used together. I'm not sure about other browsers.
There are several possible ways to fix this:
- Add a
.ui.dropdown.buttonrule that setsline-height: 1em;consitent with the.ui.buttonrule. - Modify the
.ui.dropdownline height to be1emto be consistent with.ui.button. - Replace
.ui.button { ... }with.ui.button, .ui.button.dropdown { ... }to make the button rule have a higher CSS priority than.ui.dropdown.
Gitea Version
1.21.0+rc1-23-g21f1e223d
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
2.34.1
Operating System
Ubuntu
How are you running Gitea?
Building from source using the bindata option.
Database
SQLite
