File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,11 @@ yat:
124
124
# Custom color as below:
125
125
# brand_color: "#1a8e42"
126
126
127
+ # You can custom selection style
128
+ # selection:
129
+ # color: "#ff00ff"
130
+ # background_color: "yellow"
131
+
127
132
# Night/Dark mode
128
133
# Default mode is "auto", "auto" is for auto nightshift
129
134
# (19:00 - 07:00), "manual" is for manual toggle, and
Original file line number Diff line number Diff line change @@ -291,3 +291,26 @@ table {
291
291
overflow : hidden ;
292
292
}
293
293
294
+ /* *
295
+ * Text Selection
296
+ */
297
+ ::selection {
298
+ color : $selection-color ;
299
+ background-color : $selection-background-color ;
300
+ }
301
+ ::-moz-selection { /* Code for Firefox */
302
+ color : $selection-color ;
303
+ background-color : $selection-background-color ;
304
+ }
305
+ ::-ms-selection {
306
+ color : $selection-color ;
307
+ background-color : $selection-background-color ;
308
+ }
309
+ ::-o-selection {
310
+ color : $selection-color ;
311
+ background-color : $selection-background-color ;
312
+ }
313
+ ::-webkit-selection {
314
+ color : $selection-color ;
315
+ background-color : $selection-background-color ;
316
+ }
Original file line number Diff line number Diff line change @@ -41,4 +41,15 @@ $click-to-top-light-color: {{ site.click_to_top.light.color | default: "#454545"
41
41
$click-to-top-dark-background-color : {{ site.click_to_top.dark .background_color | default : " #34323d" }};
42
42
$click-to-top-dark-color : {{ site.click_to_top.dark .color | default : " #bbb" }};
43
43
44
+ // Selection styles
45
+ $selection-color : unquote (" {{ site.selection.color }}" );
46
+ $selection-background-color : unquote (" {{ site.selection.background_color }}" );
47
+
48
+ @if $selection-color == " " {
49
+ $selection-color : inherit ;
50
+ }
51
+ @if $selection-background-color == " " {
52
+ $selection-background-color : rgba (invert ($brand-color ), 0.3 );
53
+ }
54
+
44
55
@import " yat" ;
You can’t perform that action at this time.
0 commit comments