mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Clean up "file-view" related styles (#34558)
Move "file-view" and "code-view" related styles to their own file, remove unnecessary `!important`
This commit is contained in:
58
web_src/css/repo/file-view.css
Normal file
58
web_src/css/repo/file-view.css
Normal file
@@ -0,0 +1,58 @@
|
||||
.file-view tr.active {
|
||||
background: var(--color-highlight-bg);
|
||||
}
|
||||
|
||||
.file-view tr.active:last-of-type .lines-code {
|
||||
border-bottom-right-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
.file-view tr.active .lines-num {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.file-view tr.active .lines-num::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
background: var(--color-highlight-fg);
|
||||
}
|
||||
|
||||
.file-view .file-not-rendered-prompt {
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
font-size: 1rem !important; /* use consistent styles for various containers (code, markup, etc) */
|
||||
line-height: var(--line-height-default) !important; /* same as above */
|
||||
}
|
||||
|
||||
/* ".code-view" is always used with ".file-view", to show the code of a file */
|
||||
.file-view.code-view {
|
||||
background: var(--color-code-bg);
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
.file-view.code-view table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.file-view.code-view .lines-num span::after {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.file-view.code-view .lines-num:hover {
|
||||
color: var(--color-text-dark);
|
||||
}
|
||||
|
||||
.file-view.code-view .ui.button.code-line-button {
|
||||
border: 1px solid var(--color-secondary);
|
||||
padding: 1px 4px;
|
||||
margin: 0;
|
||||
min-height: 0;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
}
|
||||
|
||||
.file-view.code-view .ui.button.code-line-button:hover {
|
||||
background: var(--color-secondary);
|
||||
}
|
@@ -1,16 +0,0 @@
|
||||
.code-view .lines-num:hover {
|
||||
color: var(--color-text-dark) !important;
|
||||
}
|
||||
|
||||
.ui.button.code-line-button {
|
||||
border: 1px solid var(--color-secondary);
|
||||
padding: 1px 4px;
|
||||
margin: 0;
|
||||
min-height: 0;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
}
|
||||
|
||||
.ui.button.code-line-button:hover {
|
||||
background: var(--color-secondary);
|
||||
}
|
Reference in New Issue
Block a user