Skip to content

Commit 4c6759e

Browse files
committed
[themes] Make sure fat cursor backgrounds are specialized for .cm-fat-cursor
Issue #6714
1 parent bac5a2d commit 4c6759e

File tree

9 files changed

+28
-39
lines changed

9 files changed

+28
-39
lines changed

demo/vim.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
<link rel="stylesheet" href="../lib/codemirror.css">
88
<link rel="stylesheet" href="../addon/dialog/dialog.css">
9-
<link rel="stylesheet" href="../theme/midnight.css">
10-
<link rel="stylesheet" href="../theme/solarized.css">
119
<script src="../lib/codemirror.js"></script>
1210
<script src="../addon/dialog/dialog.js"></script>
1311
<script src="../addon/search/searchcursor.js"></script>

theme/ayu-dark.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
.cm-s-ayu-dark .CodeMirror-guttermarker-subtle { color: #3d424d; }
1010
.cm-s-ayu-dark .CodeMirror-linenumber { color: #3d424d; }
1111
.cm-s-ayu-dark .CodeMirror-cursor { border-left: 1px solid #e6b450; }
12+
.cm-s-ayu-dark.cm-fat-cursor .CodeMirror-cursor { background-color: #a2a8a175 !important; }
13+
.cm-s-ayu-dark .cm-animate-fat-cursor { background-color: #a2a8a175 !important; }
1214

1315
.cm-s-ayu-dark span.cm-comment { color: #626a73; }
1416
.cm-s-ayu-dark span.cm-atom { color: #ae81ff; }
@@ -40,7 +42,3 @@
4042
text-decoration: underline;
4143
color: white !important;
4244
}
43-
44-
/* changing cursor color in vim mode */
45-
.cm-s-ayu-dark .CodeMirror-cursor { background-color: #a2a8a175 !important; }
46-
.cm-s-ayu-dark .cm-animate-fat-cursor { background-color: #a2a8a175 !important; }

theme/ayu-mirage.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
.cm-s-ayu-mirage .CodeMirror-guttermarker-subtle { color: rgba(112, 122, 140, 66); }
1010
.cm-s-ayu-mirage .CodeMirror-linenumber { color: rgba(61, 66, 77, 99); }
1111
.cm-s-ayu-mirage .CodeMirror-cursor { border-left: 1px solid #ffcc66; }
12+
.cm-s-ayu-mirage.cm-fat-cursor .CodeMirror-cursor {background-color: #a2a8a175 !important;}
13+
.cm-s-ayu-mirage .cm-animate-fat-cursor { background-color: #a2a8a175 !important; }
1214

1315
.cm-s-ayu-mirage span.cm-comment { color: #5c6773; font-style:italic; }
1416
.cm-s-ayu-mirage span.cm-atom { color: #ae81ff; }
@@ -41,7 +43,3 @@
4143
text-decoration: underline;
4244
color: white !important;
4345
}
44-
45-
/* changing cursor color in vim mode */
46-
.cm-s-ayu-mirage .CodeMirror-cursor {background-color: #a2a8a175 !important;}
47-
.cm-animate-fat-cursor { background-color: #a2a8a175 !important; }

theme/base16-dark.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
.cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
1818
.cm-s-base16-dark .CodeMirror-linenumber { color: #505050; }
1919
.cm-s-base16-dark .CodeMirror-cursor { border-left: 1px solid #b0b0b0; }
20+
.cm-s-base16-dark.cm-fat-cursor .CodeMirror-cursor { background-color: #8e8d8875 !important; }
21+
.cm-s-base16-dark .cm-animate-fat-cursor { background-color: #8e8d8875 !important; }
2022

2123
.cm-s-base16-dark span.cm-comment { color: #8f5536; }
2224
.cm-s-base16-dark span.cm-atom { color: #aa759f; }
@@ -36,8 +38,3 @@
3638

3739
.cm-s-base16-dark .CodeMirror-activeline-background { background: #202020; }
3840
.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
39-
40-
/* changing cursor color in vim */
41-
.cm-s-base16-dark .CodeMirror-cursor { background-color: #8e8d8875 !important; }
42-
.cm-s-base16-dark .cm-animate-fat-cursor { background-color: #8e8d8875 !important; }
43-

theme/gruvbox-dark.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
.cm-s-gruvbox-dark .CodeMirror-gutters {background: #282828; border-right: 0px;}
1212
.cm-s-gruvbox-dark .CodeMirror-linenumber {color: #7c6f64;}
1313
.cm-s-gruvbox-dark .CodeMirror-cursor { border-left: 1px solid #ebdbb2; }
14+
.cm-s-gruvbox-dark.cm-fat-cursor .CodeMirror-cursor { background-color: #8e8d8875 !important; }
15+
.cm-s-gruvbox-dark .cm-animate-fat-cursor { background-color: #8e8d8875 !important; }
1416
.cm-s-gruvbox-dark div.CodeMirror-selected { background: #928374; }
1517
.cm-s-gruvbox-dark span.cm-meta { color: #83a598; }
1618

@@ -35,8 +37,3 @@
3537

3638
.cm-s-gruvbox-dark span.cm-builtin { color: #fe8019; }
3739
.cm-s-gruvbox-dark span.cm-tag { color: #fe8019; }
38-
39-
/* changing cursor color in vim mode */
40-
.cm-s-gruvbox-dark .CodeMirror-cursor { background-color: #8e8d8875 !important; }
41-
.cm-s-gruvbox-dark .cm-animate-fat-cursor { background-color: #8e8d8875 !important; }
42-

theme/material-ocean.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
.cm-s-material-ocean .CodeMirror-cursor {
2525
border-left: 1px solid #FFCC00;
2626
}
27+
.cm-s-material-ocean.cm-fat-cursor .CodeMirror-cursor {
28+
background-color: #a2a8a175 !important;
29+
}
30+
.cm-s-material-ocean .cm-animate-fat-cursor {
31+
background-color: #a2a8a175 !important;
32+
}
2733

2834
.cm-s-material-ocean div.CodeMirror-selected {
2935
background: rgba(113, 124, 180, 0.2);
@@ -133,8 +139,3 @@
133139
text-decoration: underline;
134140
color: white !important;
135141
}
136-
137-
/* changing cursor color in vim mode */
138-
.cm-s-material-ocean .CodeMirror-cursor { background-color: #a2a8a175 !important; }
139-
.cm-s-material-ocean .cm-animate-fat-cursor { background-color: #a2a8a175 !important; }
140-

theme/material-palenight.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
.cm-s-material-palenight .CodeMirror-cursor {
2525
border-left: 1px solid #FFCC00;
2626
}
27+
.cm-s-material-palenight.cm-fat-cursor .CodeMirror-cursor {
28+
background-color: #607c8b80 !important;
29+
}
30+
.cm-s-material-palenight .cm-animate-fat-cursor {
31+
background-color: #607c8b80 !important;
32+
}
2733

2834
.cm-s-material-palenight div.CodeMirror-selected {
2935
background: rgba(113, 124, 180, 0.2);
@@ -133,7 +139,3 @@
133139
text-decoration: underline;
134140
color: white !important;
135141
}
136-
137-
/* changing cursor colors in vim mode */
138-
.cm-s-material-palenight .CodeMirror-cursor { background-color: #607c8b80 !important; }
139-
.cm-s-material-palenight .cm-animate-fat-cursor { background-color: #607c8b80 !important; }

theme/material.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
.cm-s-material .CodeMirror-cursor {
2525
border-left: 1px solid #FFCC00;
2626
}
27+
.cm-s-material.cm-fat-cursor .CodeMirror-cursor {
28+
background-color: #5d6d5c80 !important;
29+
}
30+
.cm-s-material .cm-animate-fat-cursor {
31+
background-color: #5d6d5c80 !important;
32+
}
2733

2834
.cm-s-material div.CodeMirror-selected {
2935
background: rgba(128, 203, 196, 0.2);
@@ -133,8 +139,3 @@
133139
text-decoration: underline;
134140
color: white !important;
135141
}
136-
137-
/* changing cursor color in vim mode */
138-
.cm-s-material .CodeMirror-cursor { background-color: #5d6d5c80 !important; }
139-
.cm-s-material .cm-animate-fat-cursor { background-color: #5d6d5c80 !important; }
140-

theme/oceanic-next.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
.cm-s-oceanic-next .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
1717
.cm-s-oceanic-next .CodeMirror-linenumber { color: #d0d0d0; }
1818
.cm-s-oceanic-next .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
19+
.cm-s-oceanic-next.cm-fat-cursor .CodeMirror-cursor { background-color: #a2a8a175 !important; }
20+
.cm-s-oceanic-next .cm-animate-fat-cursor { background-color: #a2a8a175 !important; }
1921

2022
.cm-s-oceanic-next span.cm-comment { color: #65737E; }
2123
.cm-s-oceanic-next span.cm-atom { color: #C594C5; }
@@ -42,8 +44,3 @@
4244
text-decoration: underline;
4345
color: white !important;
4446
}
45-
46-
/* changing cursor color in vim */
47-
.cm-s-oceanic-next .CodeMirror-cursor { background-color: #a2a8a175 !important; }
48-
.cm-s-oceanic-next .cm-animate-fat-cursor { background-color: #a2a8a175 !important; }
49-

0 commit comments

Comments
 (0)