From 078cc04d533ce0d310aeb34e9d9288f175fc2c49 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 20:41:50 +0200 Subject: [PATCH 01/16] Make tabs smaller Fomantic's tabs are excessively wide and with another tab added on the repo tabbar (https://github.com/go-gitea/gitea/pull/8346) it would break the layout on the english language. Globally reduce tab bar padding to around half of the previous values. --- web_src/less/_base.less | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index f99e07199e653..e93760dad0e3f 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1300,3 +1300,13 @@ i.icon.centerlock { .ui.sub.header { text-transform: none; } + +/* reduce padding around tab items to save some space */ +/* repo header */ +.ui.tabular.menu .item { + padding: 0 .75rem; +} +/* admin page */ +.ui.secondary.pointing.menu .item { + padding: .75rem; +} From b6e8358cf2362a6be888721e2fa7b96bf6747b4a Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 20:52:27 +0200 Subject: [PATCH 02/16] disable no-duplicate-selectors linter rule --- .stylelintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.stylelintrc b/.stylelintrc index 102b90f1fdaf1..5768a50c26557 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -11,6 +11,7 @@ rules: declaration-empty-line-before: null indentation: 4 no-descending-specificity: null + no-duplicate-selectors: null number-leading-zero: never rule-empty-line-before: null selector-pseudo-element-colon-notation: null From ae74e6f512dd44cf90b5e07959919f3479d5f412 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 21:10:27 +0200 Subject: [PATCH 03/16] more tab bar tweaks --- web_src/less/_base.less | 8 +++++--- web_src/less/themes/theme-arc-green.less | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index e93760dad0e3f..f950609990279 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -895,7 +895,6 @@ footer { .ui.menu.new-menu { overflow-x: auto !important; justify-content: left !important; - padding-bottom: 5px; } .ui.menu.new-menu::-webkit-scrollbar { @@ -1303,10 +1302,13 @@ i.icon.centerlock { /* reduce padding around tab items to save some space */ /* repo header */ +.ui.tabular.menu { + min-height: 36px; +} .ui.tabular.menu .item { - padding: 0 .75rem; + padding: 0 10px; } /* admin page */ .ui.secondary.pointing.menu .item { - padding: .75rem; + padding: 10px; } diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index 718c7b38f44e0..fb12a2d7a9c38 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -903,10 +903,11 @@ a.ui.basic.green.label:hover { .ui.menu.new-menu { background-color: #2a2e3a !important; + border: none !important; @media only screen and (max-width: 1200px) { &:after { - background-image: linear-gradient(to right, rgba(42, 46, 42, 0), rgba(42, 46, 42, 1) 100%); + background-image: linear-gradient(to right, transparent 0%, #2a2e3a 100%); } } } From baa3975ca65d6fa4d3c5a34f5cbd0f12ddb02cbf Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 21:44:12 +0200 Subject: [PATCH 04/16] more tweaks --- web_src/less/_base.less | 5 +++-- web_src/less/themes/theme-arc-green.less | 8 ++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index f950609990279..2825e0aa32557 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -895,6 +895,7 @@ footer { .ui.menu.new-menu { overflow-x: auto !important; justify-content: left !important; + padding-bottom: 2px; } .ui.menu.new-menu::-webkit-scrollbar { @@ -1306,9 +1307,9 @@ i.icon.centerlock { min-height: 36px; } .ui.tabular.menu .item { - padding: 0 10px; + padding: 0 11px; } /* admin page */ .ui.secondary.pointing.menu .item { - padding: 10px; + padding: 11px; } diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index fb12a2d7a9c38..7deeb94be401a 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -522,7 +522,7 @@ a.ui.basic.green.label:hover { border-top-color: transparent; border-left-color: transparent; border-right-color: transparent; - background: #404552; + background: #383c4a; color: #dbdbdb; } @@ -536,7 +536,6 @@ a.ui.basic.green.label:hover { &.navbar { .item.active { - background: #383c4a; border-left-color: transparent; border-right-color: transparent; border-top: none; @@ -859,8 +858,6 @@ a.ui.basic.green.label:hover { .ui.secondary.pointing.menu .active.item { color: #dbdbdb; - border: 0; - background: #383c4a; } .ui.user.list .item:not(:first-child) { @@ -870,7 +867,6 @@ a.ui.basic.green.label:hover { .ui.secondary.pointing.menu .active.item:hover { border-color: #af8b4c; color: #dbdbdb; - background: #4b5162; } .ui.secondary.pointing.menu .dropdown.item:hover, @@ -903,7 +899,7 @@ a.ui.basic.green.label:hover { .ui.menu.new-menu { background-color: #2a2e3a !important; - border: none !important; + border-color: rgba(187, 187, 187, .24) !important; @media only screen and (max-width: 1200px) { &:after { From dbe15b5b0a7643747337157e114145d5aa10e050 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 21:56:51 +0200 Subject: [PATCH 05/16] merge rules and nesting --- .stylelintrc | 1 - web_src/less/_base.less | 33 ++++++++++++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.stylelintrc b/.stylelintrc index 5768a50c26557..102b90f1fdaf1 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -11,7 +11,6 @@ rules: declaration-empty-line-before: null indentation: 4 no-descending-specificity: null - no-duplicate-selectors: null number-leading-zero: never rule-empty-line-before: null selector-pseudo-element-colon-notation: null diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 2825e0aa32557..aa8bc69c22a25 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1011,19 +1011,6 @@ footer { margin-top: 3em !important; } -/* Tab color tweaks */ -.ui.tabular.menu .item { - color: rgba(0, 0, 0, .5); -} - -.ui.tabular.menu .item:hover { - color: rgba(0, 0, 0, .8); -} - -.ui.tabular.menu .item.active { - color: rgba(0, 0, 0, .9); -} - /* multiple radio or checkboxes as inline element */ .inline-grouped-list { display: inline-block; @@ -1301,15 +1288,23 @@ i.icon.centerlock { text-transform: none; } -/* reduce padding around tab items to save some space */ -/* repo header */ .ui.tabular.menu { min-height: 36px; + + .item { + padding: 0 11px; + color: rgba(0, 0, 0, .5); + } + + .item:hover { + color: rgba(0, 0, 0, .8); + } + + .item.active { + color: rgba(0, 0, 0, .9); + } } -.ui.tabular.menu .item { - padding: 0 11px; -} -/* admin page */ + .ui.secondary.pointing.menu .item { padding: 11px; } From 4fcb374a6f27cddcbe0484de5dcb657dc1ccbbec Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 22:05:02 +0200 Subject: [PATCH 06/16] remove arc-green weird hover color --- web_src/less/themes/theme-arc-green.less | 1 - 1 file changed, 1 deletion(-) diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index 7deeb94be401a..c08f1c6809642 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -865,7 +865,6 @@ a.ui.basic.green.label:hover { } .ui.secondary.pointing.menu .active.item:hover { - border-color: #af8b4c; color: #dbdbdb; } From 9a380ccf87c5cfdd3204d77a1936fa0e16013edf Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 22:12:29 +0200 Subject: [PATCH 07/16] few more arc-green tweaks --- web_src/less/themes/theme-arc-green.less | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index c08f1c6809642..fd11e66b5218b 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -516,7 +516,7 @@ a.ui.basic.green.label:hover { } .ui.tabular.menu { - border-bottom-color: rgba(187, 187, 187, .24); + border-bottom-color: rgba(255, 255, 255, .1); .item.active { border-top-color: transparent; @@ -856,6 +856,10 @@ a.ui.basic.green.label:hover { background: #353945; } +.ui.secondary.pointing.menu { + border-bottom-color: rgba(255, 255, 255, .15); +} + .ui.secondary.pointing.menu .active.item { color: #dbdbdb; } @@ -897,12 +901,12 @@ a.ui.basic.green.label:hover { } .ui.menu.new-menu { - background-color: #2a2e3a !important; - border-color: rgba(187, 187, 187, .24) !important; + background-color: #383c4a !important; + border-color: rgba(255, 255, 255, .15) !important; @media only screen and (max-width: 1200px) { &:after { - background-image: linear-gradient(to right, transparent 0%, #2a2e3a 100%); + background-image: linear-gradient(to right, transparent 0%, #383c4a 100%); } } } @@ -1355,7 +1359,7 @@ a.ui.labels .label:hover { background: #404552; } - border-color: rgba(187, 187, 187, .24); + border-color: rgba(255, 255, 255, .15); } .footer { From 49d26202a9af717eef374407f0e07c805a8b4580 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 22:15:14 +0200 Subject: [PATCH 08/16] restore to 12px --- web_src/less/_base.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index aa8bc69c22a25..5842157f0a423 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1292,7 +1292,7 @@ i.icon.centerlock { min-height: 36px; .item { - padding: 0 11px; + padding: 0 .75rem; color: rgba(0, 0, 0, .5); } @@ -1306,5 +1306,5 @@ i.icon.centerlock { } .ui.secondary.pointing.menu .item { - padding: 11px; + padding: .75rem; } From 50d647a4e0d0becf775966dfeb90d47a1f805000 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 22:32:23 +0200 Subject: [PATCH 09/16] tweaks --- web_src/less/_base.less | 7 ++++--- web_src/less/themes/theme-arc-green.less | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 5842157f0a423..da878db230f49 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1289,10 +1289,10 @@ i.icon.centerlock { } .ui.tabular.menu { - min-height: 36px; + min-height: 40px; .item { - padding: 0 .75rem; + padding: 4px 12px; color: rgba(0, 0, 0, .5); } @@ -1302,9 +1302,10 @@ i.icon.centerlock { .item.active { color: rgba(0, 0, 0, .9); + margin-top: 1px; /* offset fomantic's margin-bottom: -1px */ } } .ui.secondary.pointing.menu .item { - padding: .75rem; + padding: 12px; } diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index fd11e66b5218b..aa218569c6075 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -538,7 +538,6 @@ a.ui.basic.green.label:hover { .item.active { border-left-color: transparent; border-right-color: transparent; - border-top: none; } } } From 096ca08ee866004359505898bbe5c9da00b75668 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 22:36:11 +0200 Subject: [PATCH 10/16] use half width height padding --- web_src/less/_base.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index da878db230f49..d07c2d4d918ff 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1292,7 +1292,7 @@ i.icon.centerlock { min-height: 40px; .item { - padding: 4px 12px; + padding: 6px 12px; color: rgba(0, 0, 0, .5); } From 24009afe3ffd39bb462b1db31d552a0132b4c5ab Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 22:40:23 +0200 Subject: [PATCH 11/16] final tweak --- web_src/less/_base.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index d07c2d4d918ff..0b5c92bd290cf 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1289,10 +1289,10 @@ i.icon.centerlock { } .ui.tabular.menu { - min-height: 40px; + min-height: 36px; .item { - padding: 6px 12px; + padding: 8px 12px; color: rgba(0, 0, 0, .5); } From f919442fe3a9163a1695c7bdf8fe74a34e74034d Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 22:50:03 +0200 Subject: [PATCH 12/16] 10px --- web_src/less/_base.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 0b5c92bd290cf..2c93b1595798a 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1289,10 +1289,10 @@ i.icon.centerlock { } .ui.tabular.menu { - min-height: 36px; + min-height: 40px; .item { - padding: 8px 12px; + padding: 10px 12px; color: rgba(0, 0, 0, .5); } From 8c0f137d4e2586e286850a9dd4bc57bc0be0bf9d Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 23:10:54 +0200 Subject: [PATCH 13/16] remove min-height --- web_src/less/_base.less | 2 -- 1 file changed, 2 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 2c93b1595798a..07dcf970ea2c2 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1289,8 +1289,6 @@ i.icon.centerlock { } .ui.tabular.menu { - min-height: 40px; - .item { padding: 10px 12px; color: rgba(0, 0, 0, .5); From ac503a2d66157051a4fb4d78308f50efd90d97f3 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 23:17:49 +0200 Subject: [PATCH 14/16] 11px --- web_src/less/_base.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 07dcf970ea2c2..652d7f37d3e1a 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1290,7 +1290,7 @@ i.icon.centerlock { .ui.tabular.menu { .item { - padding: 10px 12px; + padding: 11px 12px; color: rgba(0, 0, 0, .5); } From 533b0c2be890ed443166956cf36f17ee9bf7fbbd Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 23:33:15 +0200 Subject: [PATCH 15/16] remve new-menu background on light theme too --- web_src/less/_base.less | 1 - 1 file changed, 1 deletion(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 652d7f37d3e1a..1457829034a54 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -887,7 +887,6 @@ footer { padding-top: 15px !important; margin-top: -15px !important; margin-bottom: 15px !important; - background-color: #fafafa !important; border-width: 1px !important; } From 931740917f14ef65b9c5ee51d65ecd8666f227f9 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 21 Jun 2020 23:44:01 +0200 Subject: [PATCH 16/16] background fixes for new-menu --- web_src/less/_base.less | 1 + web_src/less/_repository.less | 10 ++++++++++ web_src/less/themes/theme-arc-green.less | 6 +++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 1457829034a54..08bc1785958b8 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -887,6 +887,7 @@ footer { padding-top: 15px !important; margin-top: -15px !important; margin-bottom: 15px !important; + background: #fafafa; border-width: 1px !important; } diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 795deeb49cae2..2f822fb3ff39e 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -3037,3 +3037,13 @@ td.blob-excerpt { .added-code { background-color: #99ff99; } + +.repository .ui.menu.new-menu { + background: none !important; + + @media only screen and (max-width: 1200px) { + &:after { + background: none !important; + } + } +} diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index aa218569c6075..3c83d1cc8be6d 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -900,12 +900,12 @@ a.ui.basic.green.label:hover { } .ui.menu.new-menu { - background-color: #383c4a !important; - border-color: rgba(255, 255, 255, .15) !important; + background: #2a2e3a; + border-color: transparent !important; @media only screen and (max-width: 1200px) { &:after { - background-image: linear-gradient(to right, transparent 0%, #383c4a 100%); + background: linear-gradient(to right, transparent 0%, #2a2e3a 100%); } } }