summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike L <cl.jeremy@qq.com>2021-06-28 10:21:43 +0200
committerGitHub <noreply@github.com>2021-06-28 09:21:43 +0100
commit5c80ecc2f75cd2948679abb31798b5da6baee698 (patch)
tree5b2ddd38289afba8a4aa21009613e4962c843fff
parent6ca667d3f2c6b106207aada51fce56081620bee2 (diff)
downloadgitea-5c80ecc2f75cd2948679abb31798b5da6baee698.tar.gz
gitea-5c80ecc2f75cd2948679abb31798b5da6baee698.zip
Counterwork seemingly unclickable repo button labels (#15064)
As title, the change counter-works the effect from #14926 that links seem unclickable (especially in the default gitea theme), while maintaining some sort of visual harmony. Co-authored-by: Andrew Thornton <art27@cantab.net>
-rw-r--r--web_src/less/_base.less1
-rw-r--r--web_src/less/_repository.less19
-rw-r--r--web_src/less/themes/theme-arc-green.less1
3 files changed, 21 insertions, 0 deletions
diff --git a/web_src/less/_base.less b/web_src/less/_base.less
index 8a2279c727..f9ac397e4e 100644
--- a/web_src/less/_base.less
+++ b/web_src/less/_base.less
@@ -97,6 +97,7 @@
--color-input-border-hover: #cecece;
--color-navbar: #f8f8f8;
--color-light: #00000006;
+ --color-light-mimic-enabled: rgba(0, 0, 0, calc(6 / 255 * 222 / 255 / var(--opacity-disabled)));
--color-light-border: #0000001d;
--color-hover: #0000000f;
--color-active: #00000014;
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index e578dc2a6d..e87560fb8b 100644
--- a/web_src/less/_repository.less
+++ b/web_src/less/_repository.less
@@ -2932,8 +2932,23 @@ tbody.commit-list {
align-items: center;
}
+.repo-buttons .ui.labeled.button > .label:hover {
+ color: var(--color-primary-light-2);
+ background: var(--color-light);
+}
+
+.label-mimic-enabled() {
+ color: var(--color-text-dark);
+ background: var(--color-light-mimic-enabled) !important;
+
+ &:hover {
+ color: var(--color-primary-dark-1);
+ }
+}
+
.repo-buttons button[disabled] ~ .label {
opacity: var(--opacity-disabled);
+ .label-mimic-enabled();
}
.repo-buttons .ui.labeled.button {
@@ -2947,6 +2962,10 @@ tbody.commit-list {
&.disabled {
pointer-events: inherit !important;
+ > .label {
+ .label-mimic-enabled();
+ }
+
> .button {
pointer-events: none !important;
}
diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less
index 74db8faaaa..b8ee6d4e84 100644
--- a/web_src/less/themes/theme-arc-green.less
+++ b/web_src/less/themes/theme-arc-green.less
@@ -92,6 +92,7 @@
--color-input-border-hover: #505667;
--color-navbar: #2a2e3a;
--color-light: #00000028;
+ --color-light-mimic-enabled: rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)));
--color-light-border: #ffffff28;
--color-hover: #ffffff10;
--color-active: #ffffff16;