aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/css/base.css
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/css/base.css')
-rw-r--r--web_src/css/base.css146
1 files changed, 60 insertions, 86 deletions
diff --git a/web_src/css/base.css b/web_src/css/base.css
index de656c0d95..3b819e91bc 100644
--- a/web_src/css/base.css
+++ b/web_src/css/base.css
@@ -2,7 +2,10 @@
/* fonts */
--fonts-proportional: -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial;
--fonts-monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, var(--fonts-emoji);
- --fonts-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla";
+ /* GitHub explicitly sets font names like: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla";
+ Actually "Twemoji Mozilla" emoji font is widely used by browsers like Firefox, Pale Moon, and it is more likely up-to-dated than the system emoji font.
+ So not setting emoji font seems to be the best choice, here we just use a non-existing dummy font name and let browsers choose. */
+ --fonts-emoji: -emoji-fallback;
/* font weights - use between 400 and 600 for general purposes. Avoid 700 as it is perceived too bold */
--font-weight-light: 300;
--font-weight-normal: 400;
@@ -26,6 +29,16 @@
--checkbox-size: 15px; /* height and width of checkbox and radio inputs */
--page-spacing: 16px; /* space between page elements */
--page-margin-x: 32px; /* minimum space on left and right side of page */
+ --page-space-bottom: 64px; /* space between last page element and footer */
+
+ /* z-index */
+ --z-index-modal: 1001; /* modal dialog, hard-coded from Fomantic modal.css */
+ --z-index-toast: 1002; /* should be larger than modal */
+
+ --font-size-label: 12px; /* font size of individual labels */
+
+ --gap-inline: 0.25rem; /* gap for inline texts and elements, for example: the spaces for sentence with labels, button text, etc */
+ --gap-block: 0.5rem; /* gap for element blocks, for example: spaces between buttons, menu image & title, header icon & title etc */
}
@media (min-width: 768px) and (max-width: 1200px) {
@@ -172,10 +185,6 @@ details summary {
cursor: pointer;
}
-details summary > * {
- display: inline;
-}
-
progress {
background: var(--color-secondary-dark-1);
border-radius: var(--border-radius);
@@ -224,6 +233,7 @@ progress::-moz-progress-bar {
}
.unselectable,
+.btn,
.button,
.lines-num,
.lines-commit,
@@ -313,6 +323,16 @@ a.label,
background: var(--color-hover);
}
+.empty-placeholder {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding-top: 40px;
+ padding-bottom: 40px;
+ text-align: center;
+ text-wrap: balance;
+}
+
.inline-code-block {
padding: 2px 4px;
border-radius: .24em;
@@ -450,15 +470,6 @@ a.label,
color: var(--color-text-light-2);
}
-.ui.comments .comment .actions a {
- color: var(--color-text-light);
-}
-
-.ui.comments .comment .actions a.active,
-.ui.comments .comment .actions a:hover {
- color: var(--color-primary);
-}
-
img.ui.avatar,
.ui.avatar img,
.ui.avatar svg {
@@ -475,7 +486,7 @@ img.ui.avatar,
.full.height {
flex-grow: 1;
- padding-bottom: 80px;
+ padding-bottom: var(--page-space-bottom);
}
.status-page-error {
@@ -747,6 +758,14 @@ overflow-menu .overflow-menu-button {
padding: 0;
}
+/* match the styles of ".ui.secondary.pointing.menu .active.item" */
+overflow-menu.ui.secondary.pointing.menu .overflow-menu-button.active {
+ padding: 2px 0 0;
+ border-bottom: 2px solid currentcolor;
+ background-color: transparent;
+ font-weight: var(--font-weight-medium);
+}
+
overflow-menu .overflow-menu-button:hover {
color: var(--color-text-dark);
}
@@ -802,10 +821,6 @@ overflow-menu .ui.label {
display: block;
}
-.code-view .lines-num span::after {
- cursor: pointer;
-}
-
.lines-type-marker {
vertical-align: top;
white-space: nowrap;
@@ -842,39 +857,13 @@ overflow-menu .ui.label {
.lines-escape {
width: 0;
white-space: nowrap;
+ padding: 0;
}
.lines-code {
padding-left: 5px;
}
-.file-view tr.active {
- color: inherit !important;
- background: inherit !important;
-}
-
-.file-view tr.active .lines-num,
-.file-view tr.active .lines-code {
- background: var(--color-highlight-bg) !important;
-}
-
-.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);
-}
-
.code-inner {
font: 12px var(--fonts-monospace);
white-space: pre-wrap;
@@ -925,12 +914,12 @@ overflow-menu .ui.label {
margin-right: 4px;
}
-.top-line-blame {
+tr.top-line-blame {
border-top: 1px solid var(--color-secondary);
}
-.code-view tr.top-line-blame:first-of-type {
- border-top: none;
+tr.top-line-blame:first-of-type {
+ border-top: none; /* merge code lines belonging to the same commit into one block */
}
.lines-code .bottom-line,
@@ -938,15 +927,6 @@ overflow-menu .ui.label {
border-bottom: 1px solid var(--color-secondary);
}
-.code-view {
- background: var(--color-code-bg);
- border-radius: var(--border-radius);
-}
-
-.code-view table {
- width: 100%;
-}
-
.migrate .svg.gitea-git {
color: var(--color-git);
}
@@ -1029,25 +1009,13 @@ table th[data-sortt-desc] .svg {
text-align: left;
}
-.ellipsis-button {
- padding: 0 5px 8px !important;
- display: inline-block !important;
- font-weight: var(--font-weight-semibold) !important;
- line-height: 6px !important;
- vertical-align: middle !important;
-}
-
-.precolors {
- display: flex;
- flex-direction: column;
- justify-content: center;
- margin-left: 1em;
-}
-
-.precolors .color {
+.ui.button.ellipsis-button {
+ padding: 0 5px 8px;
display: inline-block;
- width: 15px;
- height: 15px;
+ font-weight: var(--font-weight-semibold);
+ line-height: 8px;
+ vertical-align: middle;
+ min-height: 0;
}
.ui.dropdown:not(.button) {
@@ -1101,10 +1069,12 @@ table th[data-sortt-desc] .svg {
.btn,
.ui.ui.button,
.ui.ui.dropdown,
-.flex-text-inline {
+.flex-text-inline,
+.flex-text-inline > a,
+.flex-text-inline > span {
display: inline-flex;
align-items: center;
- gap: .25rem;
+ gap: var(--gap-inline);
vertical-align: middle;
min-width: 0; /* make ellipsis work */
}
@@ -1127,14 +1097,16 @@ table th[data-sortt-desc] .svg {
}
.ui.list.flex-items-block > .item,
+.ui.form .field > label.flex-text-block, /* override fomantic "block" style */
.flex-items-block > .item,
.flex-text-block {
display: flex;
align-items: center;
- gap: .5rem;
+ gap: var(--gap-block);
min-width: 0;
}
+.ui.dropdown > .ui.button,
.flex-text-block > .ui.button,
.flex-text-inline > .ui.button {
margin: 0; /* fomantic buttons have default margin, when we use them in a flex container with gap, we do not need these margins */
@@ -1145,7 +1117,7 @@ the "!important" is necessary to override Fomantic UI menu item styles, meanwhil
.ui.dropdown .menu.flex-items-menu > .item:not(.hidden, .filtered, .tw-hidden) {
display: flex !important;
align-items: center;
- gap: .5rem;
+ gap: var(--gap-block);
min-width: 0;
}
.ui.dropdown .menu.flex-items-menu > .item img,
@@ -1172,12 +1144,14 @@ the "!important" is necessary to override Fomantic UI menu item styles, meanwhil
text-overflow: ellipsis !important;
}
-.ui.dropdown.text-flex-grow {
- display: flex;
+.svg.octicon-file-directory-fill,
+.svg.octicon-file-directory-open-fill,
+.svg.octicon-file-submodule {
+ color: var(--color-primary);
}
-.ui.dropdown.text-flex-grow > .text {
- display: flex;
- flex-grow: 1;
- justify-content: space-between;
+.svg.octicon-file,
+.svg.octicon-file-symlink-file,
+.svg.octicon-file-directory-symlink {
+ color: var(--color-secondary-dark-7);
}