Browse Source

Fixed tab indentation in file viewer

In code viewer, for some reason code container's left padding was implemented not with padding, but with ```:before{content:' '}```.
Adding a space character at the beginning of each line is harmful, because it's an actual space character and it messes up indentation.
This doesn't matter in space-indented files, but it matters in tab-indented ones (the first tab appears shorter than the other tabs, because there's already a space in front of it), and especially in files with mixed tabs and spaces (space-indented lines get indented one space further than tab-indented ones).

This fixes it.
pull/4126/head
Jaka Jaksic 8 years ago committed by GitHub
parent
commit
0e6e4ae4dc
  1. 10
      public/css/gogs.css

10
public/css/gogs.css

@ -1431,7 +1431,7 @@ footer .ui.language .menu {
.repository.file.list #file-content .code-view .lines-code .hljs { .repository.file.list #file-content .code-view .lines-code .hljs {
background-color: white; background-color: white;
margin: 0; margin: 0;
padding: 0 !important; padding: 0 0 0 2px !important;
} }
.repository.file.list #file-content .code-view .lines-num pre li, .repository.file.list #file-content .code-view .lines-num pre li,
.repository.file.list #file-content .code-view .lines-code pre li, .repository.file.list #file-content .code-view .lines-code pre li,
@ -1450,14 +1450,6 @@ footer .ui.language .menu {
.repository.file.list #file-content .code-view .lines-code .hljs li.active { .repository.file.list #file-content .code-view .lines-code .hljs li.active {
background: #ffffdd; background: #ffffdd;
} }
.repository.file.list #file-content .code-view .lines-num pre li:before,
.repository.file.list #file-content .code-view .lines-code pre li:before,
.repository.file.list #file-content .code-view .lines-num ol li:before,
.repository.file.list #file-content .code-view .lines-code ol li:before,
.repository.file.list #file-content .code-view .lines-num .hljs li:before,
.repository.file.list #file-content .code-view .lines-code .hljs li:before {
content: ' ';
}
.repository.file.list .sidebar { .repository.file.list .sidebar {
padding-left: 0; padding-left: 0;
} }

Loading…
Cancel
Save