annotate gtk-3.0/_drawing.scss @ 95:f3009ca89a46

Fix exported colours and export dark ones
author IBBoard <dev@ibboard.co.uk>
date Mon, 14 Oct 2019 21:00:06 +0100
parents cb3e1a45b770
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 // Drawing mixins
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 // generic drawing of more complex things
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 @function _widget_edge($c:$borders_edge) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 // outer highlight "used" on most widgets
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 @return 0 1px $c;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 @mixin _shadows($shadow1, $shadow2:none, $shadow3:none, $shadow4:none) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 // Helper function to stack up to 4 box-shadows;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 @if $shadow4!=none { box-shadow: $shadow1, $shadow2, $shadow3, $shadow4; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 @else if $shadow3!=none { box-shadow: $shadow1, $shadow2, $shadow3; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 @else if $shadow2!=none { box-shadow: $shadow1, $shadow2; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 @else { box-shadow: $shadow1; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 // entries
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
22 @function entry_focus_border($fc) {
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 @if $variant == 'light' { @return $fc; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 @else { @return if($fc==$selected_bg_color, $selected_borders_color, darken($fc,35%)); }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
27 @function entry_focus_glow($fc) {
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
28 $_focus_glow_color: if($variant=='light', transparentize($fc,0.85),
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
29 transparentize($fc,0.3));
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
30 @return inset 0 0 0 1px $_focus_glow_color;
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 @function entry_gradient($c) {
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
34 @return linear-gradient(to bottom, darken($c,3%), $c 90%);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 @mixin entry($t, $fc:$selected_bg_color, $edge: $borders_edge) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 // Entries drawing function
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 // $t: entry type
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 // $fc: focus color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 // $edge: set to none to not draw the bottom edge or specify a color to not
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 // use the default one
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 // possible $t values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47 // normal, focus, insensitive, backdrop, backdrop-insensitive, osd, osd-focus, osd-backdrop;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 background-color: transparent;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50 background-image: entry_gradient($base_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51 $_blank_edge: if($edge == none, none, 0 1px transparentize($edge,1));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52 $_entry_edge: if($edge == none, none, _widget_edge($edge));
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
53 $_inner_shadows: inset 0 3px transparentize(black, 0.98),
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
54 inset 0 2px transparentize(black, 0.97),
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
55 inset 0 1px transparentize(black, 0.92);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
57 // we need to match the same shadow types (inset/outset) in various states
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
58 // hence transparent shadows istead of resetting them when not needed
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
59 $_blank_inner_shadows: inset 0 3px transparentize(black, 1),
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
60 inset 0 2px transparentize(black, 1),
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
61 inset 0 1px transparentize(black, 1);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
62 @if $t==normal {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
63 color: $text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
64 border-color: $borders_color;
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
65 @include _shadows($_inner_shadows,
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
66 entry_focus_glow(transparentize($fc,1)),
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
67 $_entry_edge);
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
68 // the second transparent shadow is needed for the transition to work
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
69 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
70 @if $t==focus {
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
71 @include _shadows($_inner_shadows,
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
72 entry_focus_glow($fc),
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
73 $_entry_edge);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
74 border-color: entry_focus_border($fc);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
75 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
76 @if $t==insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
77 color: $insensitive_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
78 border-color: $borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
79 background-image: linear-gradient(to bottom, $insensitive_bg_color);
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
80 @include _shadows($_blank_inner_shadows, $_entry_edge);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
81
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
82 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
83 @if $t==backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84 color: $backdrop_text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
85 border-color: $backdrop_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
86 background-image: linear-gradient(to bottom, $backdrop_base_color);
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
87 @include _shadows($_blank_inner_shadows, $_blank_edge);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
88 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
89 @if $t==backdrop-insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
90 color: $backdrop_insensitive_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
91 border-color: $backdrop_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
92 background-image: linear-gradient(to bottom, $insensitive_bg_color);
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
93 @include _shadows($_blank_inner_shadows, $_blank_edge);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
94 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
95 @if $t==osd {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
96 color: $osd_text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
97 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
98 background-image: linear-gradient(to bottom, transparentize(opacify($osd_borders_color, 1), 0.5));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
99 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
100 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
101 text-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
102 icon-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
103 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
104 @if $t==osd-focus {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
105 color: $osd_text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
106 border-color: $selected_bg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
107 background-image: linear-gradient(to bottom, transparentize(opacify($osd_borders_color, 1), 0.5));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
108 background-clip: padding-box;
22
cb3e1a45b770 Restore gtk-3.0 to v3.16 (openSUSE 42.1) and add gtk-3.18 dir
IBBoard <dev@ibboard.co.uk>
parents: 17
diff changeset
109 box-shadow: entry_focus_glow($selected_bg_color);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
110 text-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
111 icon-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
112 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
113 @if $t==osd-insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
114 color: $osd_insensitive_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
115 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
116 background-image: linear-gradient(to bottom, $osd_insensitive_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
117 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
118 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
119 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
120 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
121 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
122 @if $t==osd-backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
123 color: $osd_text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
124 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
125 background-image: linear-gradient(to bottom, transparentize(opacify($osd_borders_color, 1), 0.5));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
126 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
127 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
128 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
129 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
130 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
131 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
132
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
133 // buttons
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
134
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
135 @function _border_color ($c) { @return darken($c,25%); } // colored buttons want
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
136 // the border form the
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
137 // base color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
138
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
139 @function _text_shadow_color ($tc:$fg_color, $bg:$bg_color) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
140 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
141 // calculate the color of text shadows
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
142 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
143 // $tc is the text color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
144 // $bg is the background color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
145 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
146 $_lbg: lightness($bg)/100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
147 @if lightness($tc)<50% { @return transparentize(white,1-$_lbg/($_lbg*1.3)); }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
148 @else { @return transparentize(black,$_lbg*0.8); }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
149 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
150
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
151 @function _button_hilight_color($c) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
152 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
153 // calculate the right top hilight color for buttons
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
154 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
155 // $c: base color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
156 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
157 @if lightness($c)>90% { @return white; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
158 @else if lightness($c)>80% { @return transparentize(white, 0.3); }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
159 @else if lightness($c)>50% { @return transparentize(white, 0.5); }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
160 @else if lightness($c)>40% { @return transparentize(white, 0.7); }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
161 @else { @return transparentize(white, 0.9); }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
162 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
163
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
164 @mixin _button_text_shadow ($tc:$fg_color, $bg:$bg_color) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
165 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
166 // helper function for the text emboss effect
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
167 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
168 // $tc is the optional text color, not the shadow color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
169 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
170 // TODO: this functions needs a way to deal with special cases
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
171 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
172
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
173 $_shadow: _text_shadow_color($tc, $bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
174
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
175 @if lightness($tc)<50% {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
176 text-shadow: 0 1px $_shadow;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
177 icon-shadow: 0 1px $_shadow;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
178 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
179 @else {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
180 text-shadow: 0 -1px $_shadow;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
181 icon-shadow: 0 -1px $_shadow;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
182 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
183 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
184
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
185 @mixin button($t, $c:$bg_color, $tc:$fg_color, $edge: $borders_edge) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
186 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
187 // Button drawing function
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
188 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
189 // $t: button type,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
190 // $c: base button color for colored* types
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
191 // $tc: optional text color for colored* types
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
192 // $edge: set to none to not draw the bottom edge or specify a color to not
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
193 // use the default one
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
194 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
195 // possible $t values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
196 // normal, hover, active, insensitive, insensitive-active,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
197 // backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
198 // osd, osd-hover, osd-active, osd-insensitive, osd-backdrop, undecorated
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
199 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
200
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
201 $_hilight_color: _button_hilight_color($c);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
202 $_button_edge: if($edge == none, none, _widget_edge($edge));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
203 $_blank_edge: if($edge == none, none, _widget_edge(transparentize($edge,1)));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
204
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
205 @if $t==normal {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
206 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
207 // normal button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
208 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
209 color: $tc;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
210 outline-color: transparentize($tc, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
211 border-color: if($c!=$bg_color, _border_color($c), $borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
212 background-image: linear-gradient(to bottom,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
213 lighten($c,5%),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
214 $c 40%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
215 darken($c,5%)
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
216 );
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
217 @include _button_text_shadow($tc,$c);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
218 @include _shadows(inset 0 1px $_hilight_color, $_button_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
219 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
220
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
221 @else if $t==hover {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
222 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
223 // hovered button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
224 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
225 color: $tc;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
226 outline-color: transparentize($tc, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
227 border-color: if($c!=$bg_color, _border_color($c), $borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
228 background-image: linear-gradient(to bottom,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
229 lighten($c,14%),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
230 lighten($c,4%) 40%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
231 $c);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
232
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
233 @include _button_text_shadow($tc,lighten($c,4%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
234 @include _shadows(inset 0 1px $_hilight_color, $_button_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
235 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
236
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
237 @else if $t==active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
238 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
239 // pushed button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
240 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
241 color: $tc;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
242 outline-color: transparentize($tc, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
243 border-color: if($c!=$bg_color, _border_color($c), $borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
244 background-image: linear-gradient(to bottom,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
245 darken($c,9%),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
246 darken($c,6.6%) 40%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
247 darken($c,5%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
248 @include _button_text_shadow($tc,darken($c,10%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
249 @include _shadows(inset 0 1px transparentize(black, 0.93),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
250 inset 0 2px 1px -2px transparentize(black,0.4),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
251 $_button_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
252 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
253 @else if $t==insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
254 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
255 // insensitive button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
256 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
257 $_bg: if($c!=$bg_color, mix($c,$base_color,85%), $insensitive_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
258
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
259 color: if($tc!=$fg_color, mix($tc,$_bg,50%), $insensitive_fg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
260 border-color: if($c!=$bg_color, _border_color($c),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
261 $insensitive_borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
262 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
263 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
264 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
265 // white with 0 alpha to avoid an ugly transition, since no color means
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
266 // black with 0 alpha
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
267 @include _shadows(inset 0 1px transparentize(white,1), $_button_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
268 > .label { color: inherit; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
269 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
270 @else if $t==insensitive-active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
271 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
272 // insensitive pushed button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
273 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
274 $_bg: if($c!=$bg_color, darken(mix($c,$base_color,85%),5%),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
275 $insensitive_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
276 $_bc: if($c!=$bg_color, _border_color($c), $insensitive_borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
277
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
278 color: if($c!=$bg_color, mix($tc,$_bg,60%), $insensitive_fg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
279 border-color: $_bc;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
280 background-image: linear-gradient(to bottom, mix($_bc, $_bg, 10%), $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
281 // white with 0 alpha to avoid an ugly transition, since no color means
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
282 // black with 0 alpha
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
283 @include _shadows(inset 0 1px transparentize(white,1), $_button_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
284 > .label { color: inherit; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
285 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
286
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
287 @else if $t==backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
288 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
289 // backdrop button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
290 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
291 $_bg: if($c!=$bg_color,$c,$backdrop_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
292 $_bc: if($variant=='light',$c,_border_color($c));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
293
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
294 color: if($tc!=$fg_color,mix($tc, $_bg, 80%), $backdrop_fg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
295 border-color: if($c!=$bg_color, $_bc, $backdrop_borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
296 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
297 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
298 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
299 @include _shadows(inset 0 1px transparentize(white,1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
300 $_blank_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
301 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
302
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
303 @else if $t==backdrop-active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
304 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
305 // backdrop pushed button FIXME no colors here!
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
306 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
307 $_bg: if($c!=$bg_color, darken($c,10%), $backdrop_dark_fill);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
308 $_bc: if($variant=='light',$_bg,_border_color($c));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
309
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
310 color: if($tc!=$fg_color, mix($tc,$_bg,80%), $backdrop_fg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
311 border-color: if($c!=$bg_color, $_bc, $backdrop_borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
312 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
313 @include _shadows(inset 0 1px transparentize(white,1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
314 $_blank_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
315 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
316
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
317 @else if $t==backdrop-insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
318 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
319 // backdrop insensitive button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
320 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
321
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
322 $_bg: if($c!=$bg_color, mix($c,$base_color,85%), $insensitive_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
323 $_bc: if($variant=='light',$_bg,_border_color($c));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
324
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
325 color: if($c!=$bg_color, mix($tc,$_bg,35%), $backdrop_insensitive_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
326 border-color: if($c!=$bg_color, $_bc, $backdrop_borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
327 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
328 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
329 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
330 // white with 0 alpha to avoid an ugly transition, since no color means
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
331 // black with 0 alpha
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
332 @include _shadows(inset 0 1px transparentize(white,1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
333 $_blank_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
334 > .label { color: inherit; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
335 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
336
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
337 @else if $t==backdrop-insensitive-active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
338 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
339 // backdrop insensitive pushed button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
340 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
341
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
342 $_bg: if($c!=$bg_color, darken(mix($c,$base_color,85%),5%),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
343 darken($insensitive_bg_color,5%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
344 $_bc: if($variant=='light',$_bg,_border_color($c));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
345
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
346 color: if($c!=$bg_color, mix($tc,$_bg,35%), $backdrop_insensitive_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
347 border-color: if($c!=$bg_color, $_bc, $backdrop_borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
348 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
349 @include _shadows(inset 0 1px transparentize(white,1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
350 $_blank_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
351 > .label { color: inherit; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
352 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
353
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
354 @else if $t==osd {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
355 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
356 // normal osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
357 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
358 $_bg: if($c!=$bg_color, transparentize($c, 0.5),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
359 $osd_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
360
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
361 color: $osd_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
362 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
363 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
364 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
365 box-shadow: inset 0 1px transparentize(white, 0.9);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
366 text-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
367 icon-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
368 outline-color: transparentize($osd_fg_color, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
369 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
370 @else if $t==osd-hover {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
371 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
372 // active osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
373 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
374 $_bg: if($c!=$bg_color, transparentize($c, 0.3),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
375 lighten($osd_bg_color, 12%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
376
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
377 color: white;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
378 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
379 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
380 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
381 box-shadow: inset 0 1px transparentize(white, 0.9);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
382 text-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
383 icon-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
384 outline-color: transparentize($osd_fg_color, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
385 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
386 @else if $t==osd-active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
387 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
388 // active osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
389 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
390 $_bg: if($c!=$bg_color, $c, $osd_borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
391
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
392 color: white;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
393 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
394 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
395 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
396 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
397 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
398 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
399 outline-color: transparentize($osd_fg_color, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
400 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
401 @else if $t==osd-insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
402 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
403 // insensitive osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
404 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
405 color: $osd_insensitive_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
406 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
407 background-image: linear-gradient(to bottom, $osd_insensitive_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
408 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
409 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
410 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
411 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
412 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
413 @else if $t==osd-backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
414 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
415 // backdrop osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
416 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
417 $_bg: if($c!=$bg_color, transparentize($c, 0.5),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
418 $osd_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
419
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
420 color: $osd_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
421 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
422 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
423 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
424 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
425 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
426 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
427 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
428 @else if $t==undecorated {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
429 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
430 // reset
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
431 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
432 border-color: transparent;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
433 background-color: transparent;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
434 background-image: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
435
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
436 @include _shadows(inset 0 1px transparentize(white, 1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
437 $_blank_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
438
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
439 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
440 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
441 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
442 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
443
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
444 @mixin trough($flat:false, $c:$bg_color, $tc:$fg_color, $noedge:false) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
445 color: mix($tc,$bg_color,80%);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
446 @if $flat { background-image: linear-gradient(to bottom,$c); }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
447 @else {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
448 background-image: linear-gradient(to bottom,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
449 mix(black,$c,15%) 5%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
450 mix(black,$c,10%) 20%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
451 mix(black,$c,10%) 90%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
452 $c);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
453 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
454
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
455 border-color: if($c!=$bg_color, _border_color($c), $border_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
456
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
457 @if not($noedge) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
458 @if lightness($c) > 60% {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
459 box-shadow: inset 0 -1px $borders_edge,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
460 0 1px $borders_edge;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
461 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
462 @else {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
463 box-shadow: inset 0 -1px transparentize($borders_edge,0.5),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
464 0 1px transparentize($borders_edge,0.5);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
465 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
466 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
467 @else { box-shadow: none; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
468 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
469
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
470 @mixin progressbar_fill($d:horizontal) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
471 $dir: if($d==vertical,right,bottom);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
472 background-image: linear-gradient(to $dir, $selected_bg_color 2px,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
473 lighten($selected_bg_color,6%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
474 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
475
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
476 @function headerbar_gradient($c, $tc:lighten($c,4%)) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
477 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
478 // headerbar gradient helper function
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
479 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
480 // $c: base color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
481 // $tc: top color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
482 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
483 @return linear-gradient(to bottom, $tc, $c);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
484 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
485
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
486 @mixin headerbar_fill($c:$bg_color, $tc:lighten($c,4%), $hc:$top_hilight) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
487 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
488 // headerbar fill
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
489 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
490 // $c: base color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
491 // $tc: top color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
492 // $hc: top highlight color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
493 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
494 $_bottom_shade_color: if($variant == 'light', mix(_border_color($c), $c, 30%),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
495 mix(_border_color($c), $c, 20%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
496
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
497 background-image: headerbar_gradient($c, $tc);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
498 box-shadow: inset 0 -1px $_bottom_shade_color, // bottom shade
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
499 inset 0 1px $hc; // top highlight
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
500
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
501 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
502
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
503 @mixin overshoot($p, $t:normal, $c:$fg_color) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
504 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
505 // overshoot
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
506 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
507 // $p: position
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
508 // $t: type
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
509 // $c: base color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
510 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
511 // possible $p values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
512 // top, bottom, right, left
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
513 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
514 // possible $t values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
515 // normal, backdrop
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
516 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
517
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
518 $_small_gradient_length: 5%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
519 $_big_gradient_length: 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
520
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
521 $_position: center top;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
522 $_small_gradient_size: 100% $_small_gradient_length;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
523 $_big_gradient_size: 100% $_big_gradient_length;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
524
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
525 @if $p==bottom {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
526 $_position: center bottom;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
527 $_linear_gradient_direction: to top;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
528 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
529
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
530 @else if $p==right {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
531 $_position: right center;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
532 $_small_gradient_size: $_small_gradient_length 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
533 $_big_gradient_size: $_big_gradient_length 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
534 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
535
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
536 @else if $p==left {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
537 $_position: left center;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
538 $_small_gradient_size: $_small_gradient_length 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
539 $_big_gradient_size: $_big_gradient_length 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
540 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
541
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
542 $_small_gradient_color: $c;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
543 $_big_gradient_color: $c;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
544
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
545 @if $c==$fg_color {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
546 $_small_gradient_color: darken($borders_color, 10%);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
547 $_big_gradient_color: $fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
548
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
549 @if $t==backdrop { $_small_gradient_color: $backdrop_borders_color; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
550 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
551
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
552 $_small_gradient: -gtk-gradient(radial,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
553 $_position, 0,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
554 $_position, 0.5,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
555 to($_small_gradient_color),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
556 to(transparentize($_small_gradient_color, 1)));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
557
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
558 $_big_gradient: -gtk-gradient(radial,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
559 $_position, 0,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
560 $_position, 0.6,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
561 from(transparentize($_big_gradient_color, 0.93)),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
562 to(transparentize($_big_gradient_color, 1)));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
563
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
564 @if $t==normal {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
565 background-image: $_small_gradient, $_big_gradient;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
566 background-size: $_small_gradient_size, $_big_gradient_size;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
567 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
568
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
569 @else if $t==backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
570 background-image: $_small_gradient;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
571 background-size: $_small_gradient_size;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
572 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
573
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
574 background-repeat: no-repeat;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
575 background-position: $_position;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
576
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
577 background-color: transparent; // reset some properties to be sure to not inherit them somehow
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
578 border: none; //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
579 box-shadow: none; //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
580 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
581
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
582 @mixin undershoot($p) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
583 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
584 // undershoot
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
585 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
586 // $p: position
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
587 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
588 // possible $p values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
589 // top, bottom, right, left
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
590 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
591
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
592 $_undershoot_color_dark: transparentize(black, 0.8);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
593 $_undershoot_color_light: transparentize(white, 0.8);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
594
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
595 $_gradient_dir: left;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
596 $_dash_bg_size: 10px 1px;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
597 $_gradient_repeat: repeat-x;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
598 $_bg_pos: center $p;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
599
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
600 background-color: transparent; // shouldn't be needed, but better to be sure;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
601
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
602 @if ($p == left) or ($p == right) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
603 $_gradient_dir: top;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
604 $_dash_bg_size: 1px 10px;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
605 $_gradient_repeat: repeat-y;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
606 $_bg_pos: $p center;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
607 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
608
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
609 background-image: linear-gradient(to $_gradient_dir, // this is the dashed line
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
610 $_undershoot_color_light 50%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
611 $_undershoot_color_dark 50%);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
612
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
613 padding-#{$p}: 1px;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
614 background-size: $_dash_bg_size;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
615 background-repeat: $_gradient_repeat;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
616 background-origin: content-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
617 background-position: $_bg_pos;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
618 }