Skip to content

Commit 5b93b93

Browse files
committed
Change <a> elements to underline on hover
Fomantic brings a opinionated style that removed underline on mouse hover which I think is important UX to have. This re-enables the underline in the Fomantic config and fixes a few cases where underline was deemed disruptive.
1 parent 5f22e2d commit 5b93b93

File tree

6 files changed

+27
-29
lines changed

6 files changed

+27
-29
lines changed

templates/shared/issuelist.tmpl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@
3131
</div>
3232
<div class="issue-item-main f1 fc df">
3333
<div class="issue-item-top-row">
34-
<a class="title" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
35-
{{RenderEmoji .Title}}
36-
{{if .IsPull }}
37-
{{if (index $.CommitStatus .PullRequest.ID)}}
38-
{{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}}
39-
{{end}}
34+
<a class="title tdn" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji .Title}}</a>
35+
{{if .IsPull}}
36+
{{if (index $.CommitStatus .PullRequest.ID)}}
37+
{{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}}
4038
{{end}}
41-
</a>
39+
{{end}}
4240
<span class="labels-list ml-2">
4341
{{range .Labels}}
4442
<a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}{{if ne $.listType "milestone"}}&milestone={{$.MilestoneID}}{{end}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a>
@@ -126,14 +124,14 @@
126124
</div>
127125
<div class="issue-item-icon-right text grey">
128126
{{range .Assignees}}
129-
<a class="ui assignee tooltip" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-position="left center">
127+
<a class="ui assignee tooltip tdn" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-position="left center">
130128
{{avatar .}}
131129
</a>
132130
{{end}}
133131
</div>
134132
<div class="issue-item-icon-right text grey">
135133
{{if .NumComments}}
136-
<a href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
134+
<a class="tdn" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
137135
{{svg "octicon-comment" 16 "mr-2"}}{{.NumComments}}
138136
</a>
139137
{{end}}

web_src/fomantic/_site/globals/site.variables

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
@useCustomScrollbars: false;
77
@disabledOpacity: var(--opacity-disabled);
88
@variationPopupTooltip: false;
9+
@linkHoverUnderline: underline;

web_src/fomantic/build/semantic.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web_src/less/_base.less

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ a,
233233
.ui.breadcrumb a {
234234
color: var(--color-primary);
235235
cursor: pointer;
236+
text-decoration-skip-ink: all;
236237
}
237238

238239
a.muted {
@@ -242,7 +243,19 @@ a.muted {
242243
a:hover,
243244
a.muted:hover,
244245
.ui.breadcrumb a:hover {
245-
color: var(--color-primary-dark-2);
246+
color: var(--color-primary);
247+
}
248+
249+
a.label,
250+
.repository-menu a,
251+
.ui.search .results a,
252+
.ui .menu a,
253+
.issue-keyword a {
254+
text-decoration: none !important;
255+
}
256+
257+
.ui.breadcrumb a:hover {
258+
text-decoration: underline !important;
246259
}
247260

248261
.ui.breadcrumb .divider {

web_src/less/_repository.less

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2832,20 +2832,6 @@ tbody.commit-list {
28322832
}
28332833
}
28342834

2835-
.commit-summary a {
2836-
&:hover {
2837-
text-decoration: underline solid;
2838-
}
2839-
2840-
&.default-link {
2841-
text-decoration: none;
2842-
2843-
&:hover {
2844-
text-decoration: underline solid;
2845-
}
2846-
}
2847-
}
2848-
28492835
.commit-list .commit-status-link {
28502836
display: inline-block;
28512837
vertical-align: middle;
@@ -3007,13 +2993,12 @@ td.blob-excerpt {
30072993
background-color: #fafafa;
30082994
}
30092995

3010-
.issue-keyword,
3011-
.commit-body .issue-keyword:hover {
3012-
border-bottom: 1px dotted var(--color-text-light-2);
2996+
.issue-keyword {
2997+
border-bottom: 1px dotted var(--color-text-light-3) !important;
30132998
}
30142999

30153000
.issue-keyword:hover {
3016-
border-bottom: none;
3001+
border-bottom: none !important;
30173002
}
30183003

30193004
.file-header {

web_src/less/helpers.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
.ac { align-items: center !important; }
77
.tc { text-align: center !important; }
88
.tl { text-align: left !important; }
9+
.tdn { text-decoration: none !important; }
910
.jc { justify-content: center !important; }
1011
.js { justify-content: flex-start !important; }
1112
.je { justify-content: flex-end !important; }

0 commit comments

Comments
 (0)