Skip to content

Commit 6f5a2a7

Browse files
authored
Styles/GTK: add selection (#841)
1 parent 19a1b6e commit 6f5a2a7

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

lib/Styles/Gtk/Index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@import 'Scale.scss';
1212
@import 'ScrolledWindow.scss';
1313
@import 'Scrollbar.scss';
14+
@import 'Selection.scss';
1415
@import 'ShortcutsWindow.scss';
1516
@import 'Slider.scss';
1617
@import 'Spinner.scss';

lib/Styles/Gtk/Selection.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
selection {
2+
background-color: #{'@selected_bg_color'};
3+
color: #{'@selected_fg_color'};
4+
5+
&:backdrop {
6+
background-color: scale-color($fg-color, $alpha: -90%);
7+
color: inherit;
8+
}
9+
}

lib/Styles/_exported.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
// these exported GtkCSS variables should be considered public API.
44

55
@define-color fg_color #{"" + $fg-color};
6+
7+
@define-color selected_bg_color #{'alpha(@accent_color, 0.25)'};
8+
@define-color selected_fg_color #{'shade(@accent_color, 0.5)'};

0 commit comments

Comments
 (0)