diff options
author | delvh <dev.lh@web.de> | 2022-10-07 11:48:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 17:48:03 +0800 |
commit | 81d7270cde2960d52f5d987ec8b3fc3c679724a6 (patch) | |
tree | f0a860522937722e25e8b73aec8289b7815b2484 /web_src | |
parent | 30ca91666ebd3168923baa82b4a17b039039d0a9 (diff) | |
download | gitea-81d7270cde2960d52f5d987ec8b3fc3c679724a6.tar.gz gitea-81d7270cde2960d52f5d987ec8b3fc3c679724a6.zip |
Add new CSS variables --color-accent and --color-small-accent (#21305)
At the moment, this is only used to replace the color of the `viewed`
checkbox and of the `has changed` label.
Previously, the used variable accentuated always either darker or
lighter, which meant that one theme looked good while the other didn't.
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/less/_base.less | 3 | ||||
-rw-r--r-- | web_src/less/_review.less | 15 | ||||
-rw-r--r-- | web_src/less/themes/theme-arc-green.less | 2 |
3 files changed, 13 insertions, 7 deletions
diff --git a/web_src/less/_base.less b/web_src/less/_base.less index a2c27acfdf..41b145ac7d 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -159,6 +159,9 @@ --color-tooltip-text: #ffffff; --color-header-bar: #ffffff; --color-label-active-bg: #d0d0d0; + /* accent */ + --color-small-accent: var(--color-primary-light-6); + --color-accent: var(--color-primary-light-4); /* backgrounds */ --checkbox-mask-checked: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 18 18" width="16" height="16"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>'); --checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z"></path></svg>'); diff --git a/web_src/less/_review.less b/web_src/less/_review.less index fd18ecb3d3..33e4003b2c 100644 --- a/web_src/less/_review.less +++ b/web_src/less/_review.less @@ -264,11 +264,12 @@ a.blob-excerpt:hover { } .changed-since-last-review { - margin: 0 5px; - padding: 0 3px; - border: 2px var(--color-primary-light-3) solid; - background-color: var(--color-primary-alpha-30); - border-radius: 7px; + border: 1px var(--color-accent) solid; + background-color: var(--color-small-accent); + border-radius: 15px; + padding: 4px 8px; + margin: -8px 0; // just like other buttons in the diff box header + font-size: .857rem; // just like .ui.tiny.button } .viewed-file-form { @@ -286,8 +287,8 @@ a.blob-excerpt:hover { } .viewed-file-checked-form { - background-color: var(--color-primary-light-6); - border: 1px solid var(--color-primary-light-4); + background-color: var(--color-small-accent); + border: 1px solid var(--color-accent); } #viewed-files-summary { diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index 7ebcb87d9d..3f3d4feae2 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -134,6 +134,8 @@ --color-reaction-active-bg: var(--color-primary-alpha-40); --color-header-bar: #2e323e; --color-label-active-bg: #4c525e; + --color-small-accent: var(--color-primary-light-5); + --color-accent: var(--color-primary-light-3); } ::-webkit-calendar-picker-indicator { |