Skip to content

Commit

Permalink
Fix various CSS issues
Browse files Browse the repository at this point in the history
- Fix black text being white on base theme
- Fix file/blame button group
- Fix label margin in dropdown (regression from graph pr)
  • Loading branch information
silverwind committed Dec 2, 2020
1 parent 4f5ff1e commit 3c53de2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
10 changes: 5 additions & 5 deletions templates/repo/view_file.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
</div>
{{if not .ReadmeInList}}
<div class="file-header-right file-actions df ac">
<div class="ui buttons">
<a class="ui tiny button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
<div class="ui buttons mr-2">
<a class="ui mini basic button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
{{if not .IsViewCommit}}
<a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
<a class="ui mini basic button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
{{end}}
{{if .IsTextFile}}
<a class="ui tiny button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a>
<a class="ui mini basic button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a>
{{end}}
<a class="ui tiny button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
<a class="ui mini basic button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
</div>
{{if .Repository.CanEnableEditor}}
{{if .CanEditFile}}
Expand Down
19 changes: 14 additions & 5 deletions web_src/less/_base.less
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ a.muted:hover,
}

&.black {
color: var(--color-body);
color: var(--color-text);

&:hover {
color: #000000;
Expand Down Expand Up @@ -1433,6 +1433,19 @@ a.ui.label:hover {
color: var(--color-text);
}

.ui.button:hover {
background: var(--color-hover);
color: var(--color-text);
}

.ui.buttons .button:first-child {
border-left: 1px solid var(--color-secondary);
}

.ui.buttons .button + .button {
border-left: none;
}

.ui.blue.button,
.ui.blue.buttons .button,
.ui.primary.button,
Expand Down Expand Up @@ -1617,10 +1630,6 @@ table th[data-sortt-desc] {
}
}

.dropdown .ui.label {
margin-left: 0 !important;
}

.ui.dropdown .menu .item {
border-radius: 0;
}
Expand Down

0 comments on commit 3c53de2

Please sign in to comment.