Skip to content

Commit e0bdeea

Browse files
committed
Add caret styling CSS
Fixes: go-gitea#15644
1 parent 2c57352 commit e0bdeea

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

web_src/less/_base.less

+6-4
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
--color-placeholder-text: #aaa;
113113
--color-editor-line-highlight: var(--color-primary-light-6);
114114
--color-project-board-bg: var(--color-secondary-light-4);
115+
--color-caret: var(--color-text-dark);
115116
/* backgrounds */
116117
--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>');
117118
--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 {
161162
border-collapse: collapse;
162163
}
163164

164-
/* firefox scroll bars */
165-
166165
* {
167166
scrollbar-width: thin;
168167
scrollbar-color: var(--color-primary) transparent;
168+
caret-color: var(--color-caret);
169169
}
170170

171-
/* webkit scrollbars */
172-
173171
::-webkit-scrollbar {
174172
width: 10px;
175173
}
@@ -188,6 +186,10 @@ table {
188186
background: transparent;
189187
}
190188

189+
.CodeMirror-cursor {
190+
border-color: var(--color-caret) !important;
191+
}
192+
191193
::selection,
192194
.CodeMirror-selected {
193195
background: var(--color-primary-light-1) !important;

web_src/less/_editor.less

-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
border-color: var(--color-secondary);
55
font: 14px var(--fonts-monospace);
66

7-
.CodeMirror-cursor {
8-
border-left: 1px solid var(--color-input-text);
9-
}
10-
117
&.cm-s-default {
128
border-radius: 3px;
139
padding: 0 !important;

web_src/less/themes/theme-arc-green.less

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
--color-placeholder-text: #6a737d;
109109
--color-editor-line-highlight: var(--color-primary-light-5);
110110
--color-project-board-bg: var(--color-secondary-light-2);
111+
--color-caret: var(--color-text-dark);
111112
}
112113

113114
.ui.horizontal.segments > .segment {

0 commit comments

Comments
 (0)