Skip to content

Commit

Permalink
Refix notification bell placement (go-gitea#20251)
Browse files Browse the repository at this point in the history
The use of `m-4 text black` for the notification bell results in this
icon being shifted upwards. Instead we should use the `item` class but
adjust `not-mobile` and `mobile-only` to make their `display: none`
settings `!important`.

(As an aside: This is probably one of the only times we should use
`!important` in our less files and the rest should be avoided or
removed.)

Ref go-gitea#20069
Revert go-gitea#20236

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath authored and Sysoev, Vladimir committed Aug 10, 2022

Verified

This commit was signed with the committer’s verified signature.
hediet Henning Dieterichs
1 parent 5b60856 commit e7c0265
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@
</div>
</div>

<a href="{{AppSubUrl}}/notifications" class="m-4 text black tooltip not-mobile" data-content='{{.locale.Tr "notifications"}}'>
<a href="{{AppSubUrl}}/notifications" class="item tooltip not-mobile" data-content='{{.locale.Tr "notifications"}}'>
<span class="text">
<span class="fitted">{{svg "octicon-bell"}}</span>
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
4 changes: 2 additions & 2 deletions web_src/less/_base.less
Original file line number Diff line number Diff line change
@@ -1329,7 +1329,7 @@ footer {
@media @mediaMdAndUp {
.mobile-only,
.ui.button.mobile-only {
display: none;
display: none !important;
}

// has the same behaviour of sr-only, hiding the content for
@@ -1341,7 +1341,7 @@ footer {

@media @mediaSm {
.not-mobile {
display: none;
display: none !important;
}
}

0 comments on commit e7c0265

Please sign in to comment.