diff options
author | silverwind <me@silverwind.io> | 2021-05-05 20:14:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 14:14:04 -0400 |
commit | da41714c50b4354a2674946b84403eae03f47ed5 (patch) | |
tree | 9663cbc54aa3d835912159df60765739ed5fc13f /web_src | |
parent | a961335dc77675f4574145cd8c23d63aeed46f65 (diff) | |
download | gitea-da41714c50b4354a2674946b84403eae03f47ed5.tar.gz gitea-da41714c50b4354a2674946b84403eae03f47ed5.zip |
Add caret styling CSS (#15651)
* Add caret styling CSS
Fixes: https://github.com/go-gitea/gitea/issues/15644
* add rule in arc-green as well
* grammar
* Update web_src/less/themes/theme-arc-green.less
Co-authored-by: Wim <wim@42.be>
* remove extra rule
* add comment
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Wim <wim@42.be>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/less/_base.less | 10 | ||||
-rw-r--r-- | web_src/less/_editor.less | 4 | ||||
-rw-r--r-- | web_src/less/themes/theme-arc-green.less | 1 |
3 files changed, 7 insertions, 8 deletions
diff --git a/web_src/less/_base.less b/web_src/less/_base.less index bba378dde2..7e563d2f23 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -112,6 +112,7 @@ --color-placeholder-text: #aaa; --color-editor-line-highlight: var(--color-primary-light-6); --color-project-board-bg: var(--color-secondary-light-4); + --color-caret: var(--color-text-dark); /* 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>'); @@ -161,15 +162,12 @@ table { border-collapse: collapse; } -/* firefox scroll bars */ - * { scrollbar-width: thin; scrollbar-color: var(--color-primary) transparent; + caret-color: var(--color-caret); } -/* webkit scrollbars */ - ::-webkit-scrollbar { width: 10px; } @@ -188,6 +186,10 @@ table { background: transparent; } +.CodeMirror-cursor { + border-color: var(--color-caret) !important; +} + ::selection, .CodeMirror-selected { background: var(--color-primary-light-1) !important; diff --git a/web_src/less/_editor.less b/web_src/less/_editor.less index 156430af0e..b785189dbb 100644 --- a/web_src/less/_editor.less +++ b/web_src/less/_editor.less @@ -4,10 +4,6 @@ border-color: var(--color-secondary); font: 14px var(--fonts-monospace); - .CodeMirror-cursor { - border-left: 1px solid var(--color-input-text); - } - &.cm-s-default { border-radius: 3px; padding: 0 !important; diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index 7b4d676f8f..346a6e85ea 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -108,6 +108,7 @@ --color-placeholder-text: #6a737d; --color-editor-line-highlight: var(--color-primary-light-5); --color-project-board-bg: var(--color-secondary-light-2); + --color-caret: var(--color-text); /* should ideally be --color-text-dark, see #15651 */ } ::-webkit-calendar-picker-indicator { |