Skip to content

Commit ec8ea58

Browse files
authored
Rename ".button-link" to ".button-ghost" (#24670)
Mainstream frameworks: * https://getbootstrap.com/docs/5.0/components/buttons/ * https://primer.style/css/components/buttons#link-button * https://nextui.org/docs/components/button#light * https://coreui.io/react/docs/components/button/ * https://design-system.hpe.design/components/button * https://chakra-ui.com/docs/components/button/usage#button-variants * https://mui.com/material-ui/react-button/ All (at least most?) of them make "link" button have "underline" when hovering. So, a "link" is a "link", when it's hovered, it should have the underline by default. To be strict, Gitea's "button-link" is not link-style, so it needs a better name. Actually, for the "plain" button, there are some different approaches: * Some frameworks just make "default" button as no style (not feasible in Gitea/Fomantic UI) * Primer uses "btn-invisible", which is not a proper word * NextUI uses "light", which is not a proper word, either ... * CoreUI / ChakraUI uses "ghost", I think this name is acceptable. Welcome to suggest better name for such button. Or, we just call it ".button-plain" or ".button-simple", in fact I prefer such simple and clear name.
1 parent bfa0fc2 commit ec8ea58

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

templates/user/notification/notification_div.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
{{$.CsrfTokenHtml}}
8383
<input type="hidden" name="notification_id" value="{{.ID}}">
8484
<input type="hidden" name="status" value="pinned">
85-
<button class="ui mini button button-link" title='{{$.locale.Tr "notification.pin"}}'
85+
<button class="ui mini button button-ghost" title='{{$.locale.Tr "notification.pin"}}'
8686
data-url="{{AppSubUrl}}/notifications/status"
8787
data-status="pinned"
8888
data-page="{{$.Page.Paginater.Current}}"
@@ -100,7 +100,7 @@
100100
<input type="hidden" name="notification_id" value="{{.ID}}">
101101
<input type="hidden" name="status" value="read">
102102
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
103-
<button class="ui mini button button-link" title='{{$.locale.Tr "notification.mark_as_read"}}'
103+
<button class="ui mini button button-ghost" title='{{$.locale.Tr "notification.mark_as_read"}}'
104104
data-url="{{AppSubUrl}}/notifications/status"
105105
data-status="read"
106106
data-page="{{$.Page.Paginater.Current}}"
@@ -115,7 +115,7 @@
115115
<input type="hidden" name="notification_id" value="{{.ID}}">
116116
<input type="hidden" name="status" value="unread">
117117
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
118-
<button class="ui mini button button-link" title='{{$.locale.Tr "notification.mark_as_unread"}}'
118+
<button class="ui mini button button-ghost" title='{{$.locale.Tr "notification.mark_as_unread"}}'
119119
data-url="{{AppSubUrl}}/notifications/status"
120120
data-status="unread"
121121
data-page="{{$.Page.Paginater.Current}}"

web_src/css/base.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,13 +2238,13 @@ a.ui.active.label:hover {
22382238
border-left: none;
22392239
}
22402240

2241-
.ui.button.button-link {
2241+
.ui.button.button-ghost {
22422242
background: transparent;
22432243
border: none;
22442244
color: inherit;
22452245
}
22462246

2247-
.ui.button.button-link:hover {
2247+
.ui.button.button-ghost:hover {
22482248
color: var(--color-primary);
22492249
}
22502250

0 commit comments

Comments
 (0)