annotate gtk-3.0/_drawing.scss @ 18:cf44599f0382

Fix more formerly-linked buttons to add borders
author IBBoard <dev@ibboard.co.uk>
date Sat, 09 Jul 2016 17:05:52 +0100
parents ca246bc0af4a
children cb3e1a45b770
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
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
22 @function entry_focus_border($fc:$selected_bg_color) {
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
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
27 @function entry_focus_shadow($fc:$selected_bg_color) {
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
28 @return inset 0 0 0 1px $fc;
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 @function entry_gradient($c) {
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
32 @if $variant=='light' { @return linear-gradient(to bottom, mix($borders_color, $c, 35%),
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
33 mix($borders_color, $c, 7%) 3px,
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
34 $c 90%); }
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
35 @else { @return linear-gradient(to bottom, mix($borders_color, $c, 95%),
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
36 mix($borders_color, $c, 40%) 3px,
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
37 $c 90%); }
0
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
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 @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
41 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 // Entries drawing function
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 // $t: entry type
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 // $fc: focus color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 // $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
47 // use the default one
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 // possible $t values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50 // 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
51 //
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
52
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53 background-color: transparent;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 background-image: entry_gradient($base_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 $_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
56 $_entry_edge: if($edge == none, none, _widget_edge($edge));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
58 @if $t==normal {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
59 color: $text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
60 border-color: $borders_color;
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
61 @include _shadows(entry_focus_shadow(transparentize($fc,1)), $_entry_edge);
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
62 // for the transition to work the number of shadows in different states needs to match, hence the transparent shadow here.
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
63 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
64 @if $t==focus {
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
65 @include _shadows(entry_focus_shadow($fc), $_entry_edge);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
66 border-color: entry_focus_border($fc);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
67 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
68 @if $t==insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
69 color: $insensitive_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
70 border-color: $borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
71 background-image: linear-gradient(to bottom, $insensitive_bg_color);
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
72 box-shadow: $_entry_edge;
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
73
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
74 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
75 @if $t==backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
76 color: $backdrop_text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
77 border-color: $backdrop_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
78 background-image: linear-gradient(to bottom, $backdrop_base_color);
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
79 box-shadow: $_blank_edge;
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
80 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
81 @if $t==backdrop-insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
82 color: $backdrop_insensitive_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
83 border-color: $backdrop_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84 background-image: linear-gradient(to bottom, $insensitive_bg_color);
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
85 box-shadow: $_blank_edge;
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
86 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
87 @if $t==osd {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
88 color: $osd_text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
89 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
90 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
91 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
92 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
93 text-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
94 icon-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
95 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
96 @if $t==osd-focus {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
97 color: $osd_text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
98 border-color: $selected_bg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
99 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
100 background-clip: padding-box;
17
ca246bc0af4a Update to GTK 3.18 and regenerate assets
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
101 box-shadow: entry_focus_shadow($fc);
0
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
102 text-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
103 icon-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
104 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
105 @if $t==osd-insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
106 color: $osd_insensitive_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
107 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
108 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
109 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
110 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
111 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
112 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
113 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
114 @if $t==osd-backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
115 color: $osd_text_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
116 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
117 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
118 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
119 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
120 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
121 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
122 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
123 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
124
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
125 // buttons
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
126
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
127 @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
128 // the border form the
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
129 // base color
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 @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
132 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
133 // calculate the color of text shadows
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 // $tc is the text color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
136 // $bg is the background color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
137 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
138 $_lbg: lightness($bg)/100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
139 @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
140 @else { @return transparentize(black,$_lbg*0.8); }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
141 }
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 @function _button_hilight_color($c) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
144 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
145 // calculate the right top hilight color for buttons
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
146 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
147 // $c: base color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
148 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
149 @if lightness($c)>90% { @return white; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
150 @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
151 @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
152 @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
153 @else { @return transparentize(white, 0.9); }
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
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
156 @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
157 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
158 // helper function for the text emboss effect
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
159 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
160 // $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
161 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
162 // 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
163 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
164
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
165 $_shadow: _text_shadow_color($tc, $bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
166
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
167 @if lightness($tc)<50% {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
168 text-shadow: 0 1px $_shadow;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
169 icon-shadow: 0 1px $_shadow;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
170 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
171 @else {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
172 text-shadow: 0 -1px $_shadow;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
173 icon-shadow: 0 -1px $_shadow;
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 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
176
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
177 @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
178 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
179 // Button drawing function
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
180 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
181 // $t: button type,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
182 // $c: base button color for colored* types
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
183 // $tc: optional text color for colored* types
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
184 // $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
185 // use the default one
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 // possible $t values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
188 // normal, hover, active, insensitive, insensitive-active,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
189 // backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
190 // 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
191 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
192
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
193 $_hilight_color: _button_hilight_color($c);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
194 $_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
195 $_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
196
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
197 @if $t==normal {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
198 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
199 // normal button
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 color: $tc;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
202 outline-color: transparentize($tc, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
203 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
204 background-image: linear-gradient(to bottom,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
205 lighten($c,5%),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
206 $c 40%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
207 darken($c,5%)
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 @include _button_text_shadow($tc,$c);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
210 @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
211 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
212
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
213 @else if $t==hover {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
214 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
215 // hovered button
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 color: $tc;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
218 outline-color: transparentize($tc, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
219 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
220 background-image: linear-gradient(to bottom,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
221 lighten($c,14%),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
222 lighten($c,4%) 40%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
223 $c);
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 @include _button_text_shadow($tc,lighten($c,4%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
226 @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
227 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
228
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
229 @else if $t==active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
230 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
231 // pushed button
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 color: $tc;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
234 outline-color: transparentize($tc, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
235 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
236 background-image: linear-gradient(to bottom,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
237 darken($c,9%),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
238 darken($c,6.6%) 40%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
239 darken($c,5%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
240 @include _button_text_shadow($tc,darken($c,10%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
241 @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
242 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
243 $_button_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
244 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
245 @else if $t==insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
246 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
247 // insensitive button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
248 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
249 $_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
250
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
251 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
252 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
253 $insensitive_borders_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
254 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
255 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
256 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
257 // 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
258 // black with 0 alpha
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
259 @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
260 > .label { color: inherit; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
261 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
262 @else if $t==insensitive-active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
263 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
264 // insensitive pushed button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
265 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
266 $_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
267 $insensitive_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
268 $_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
269
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
270 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
271 border-color: $_bc;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
272 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
273 // 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
274 // black with 0 alpha
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
275 @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
276 > .label { color: inherit; }
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
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
279 @else if $t==backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
280 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
281 // backdrop button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
282 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
283 $_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
284 $_bc: if($variant=='light',$c,_border_color($c));
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 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
287 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
288 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
289 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
290 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
291 @include _shadows(inset 0 1px transparentize(white,1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
292 $_blank_edge);
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
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
295 @else if $t==backdrop-active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
296 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
297 // backdrop pushed button FIXME no colors here!
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
298 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
299 $_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
300 $_bc: if($variant=='light',$_bg,_border_color($c));
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 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
303 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
304 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
305 @include _shadows(inset 0 1px transparentize(white,1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
306 $_blank_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
307 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
308
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
309 @else if $t==backdrop-insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
310 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
311 // backdrop insensitive button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
312 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
313
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
314 $_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
315 $_bc: if($variant=='light',$_bg,_border_color($c));
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 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
318 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
319 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
320 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
321 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
322 // 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
323 // black with 0 alpha
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
324 @include _shadows(inset 0 1px transparentize(white,1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
325 $_blank_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
326 > .label { color: inherit; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
327 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
328
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
329 @else if $t==backdrop-insensitive-active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
330 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
331 // backdrop insensitive pushed button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
332 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
333
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
334 $_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
335 darken($insensitive_bg_color,5%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
336 $_bc: if($variant=='light',$_bg,_border_color($c));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
337
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
338 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
339 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
340 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
341 @include _shadows(inset 0 1px transparentize(white,1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
342 $_blank_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
343 > .label { color: inherit; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
344 }
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 @else if $t==osd {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
347 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
348 // normal osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
349 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
350 $_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
351 $osd_bg_color);
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 color: $osd_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
354 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
355 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
356 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
357 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
358 text-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
359 icon-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
360 outline-color: transparentize($osd_fg_color, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
361 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
362 @else if $t==osd-hover {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
363 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
364 // active osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
365 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
366 $_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
367 lighten($osd_bg_color, 12%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
368
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
369 color: white;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
370 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
371 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
372 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
373 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
374 text-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
375 icon-shadow: 0 1px black;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
376 outline-color: transparentize($osd_fg_color, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
377 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
378 @else if $t==osd-active {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
379 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
380 // active osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
381 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
382 $_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
383
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
384 color: white;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
385 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
386 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
387 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
388 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
389 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
390 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
391 outline-color: transparentize($osd_fg_color, 0.7);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
392 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
393 @else if $t==osd-insensitive {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
394 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
395 // insensitive osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
396 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
397 color: $osd_insensitive_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
398 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
399 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
400 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
401 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
402 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
403 icon-shadow: none;
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 @else if $t==osd-backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
406 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
407 // backdrop osd button
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
408 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
409 $_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
410 $osd_bg_color);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
411
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
412 color: $osd_fg_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
413 border-color: $osd_borders_color;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
414 background-image: linear-gradient(to bottom, $_bg);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
415 background-clip: padding-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
416 box-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
417 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
418 icon-shadow: none;
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 @else if $t==undecorated {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
421 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
422 // reset
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
423 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
424 border-color: transparent;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
425 background-color: transparent;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
426 background-image: 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 @include _shadows(inset 0 1px transparentize(white, 1),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
429 $_blank_edge);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
430
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
431 text-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
432 icon-shadow: none;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
433 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
434 }
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 @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
437 color: mix($tc,$bg_color,80%);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
438 @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
439 @else {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
440 background-image: linear-gradient(to bottom,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
441 mix(black,$c,15%) 5%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
442 mix(black,$c,10%) 20%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
443 mix(black,$c,10%) 90%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
444 $c);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
445 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
446
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
447 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
448
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
449 @if not($noedge) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
450 @if lightness($c) > 60% {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
451 box-shadow: inset 0 -1px $borders_edge,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
452 0 1px $borders_edge;
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 @else {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
455 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
456 0 1px transparentize($borders_edge,0.5);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
457 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
458 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
459 @else { box-shadow: none; }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
460 }
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 @mixin progressbar_fill($d:horizontal) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
463 $dir: if($d==vertical,right,bottom);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
464 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
465 lighten($selected_bg_color,6%));
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
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
468 @function headerbar_gradient($c, $tc:lighten($c,4%)) {
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 // headerbar gradient helper function
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
471 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
472 // $c: base color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
473 // $tc: top color
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 @return linear-gradient(to bottom, $tc, $c);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
476 }
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 @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
479 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
480 // headerbar fill
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
481 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
482 // $c: base color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
483 // $tc: top color
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
484 // $hc: top highlight color
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 $_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
487 mix(_border_color($c), $c, 20%));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
488
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
489 background-image: headerbar_gradient($c, $tc);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
490 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
491 inset 0 1px $hc; // top highlight
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
492
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
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
495 @mixin overshoot($p, $t:normal, $c:$fg_color) {
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 // overshoot
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
498 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
499 // $p: position
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
500 // $t: type
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
501 // $c: base color
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 // possible $p values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
504 // top, bottom, right, left
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
505 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
506 // possible $t values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
507 // normal, backdrop
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
508 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
509
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
510 $_small_gradient_length: 5%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
511 $_big_gradient_length: 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
512
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
513 $_position: center top;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
514 $_small_gradient_size: 100% $_small_gradient_length;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
515 $_big_gradient_size: 100% $_big_gradient_length;
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 @if $p==bottom {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
518 $_position: center bottom;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
519 $_linear_gradient_direction: to top;
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
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
522 @else if $p==right {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
523 $_position: right center;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
524 $_small_gradient_size: $_small_gradient_length 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
525 $_big_gradient_size: $_big_gradient_length 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
526 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
527
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
528 @else if $p==left {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
529 $_position: left center;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
530 $_small_gradient_size: $_small_gradient_length 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
531 $_big_gradient_size: $_big_gradient_length 100%;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
532 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
533
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
534 $_small_gradient_color: $c;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
535 $_big_gradient_color: $c;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
536
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
537 @if $c==$fg_color {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
538 $_small_gradient_color: darken($borders_color, 10%);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
539 $_big_gradient_color: $fg_color;
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 @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
542 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
543
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
544 $_small_gradient: -gtk-gradient(radial,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
545 $_position, 0,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
546 $_position, 0.5,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
547 to($_small_gradient_color),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
548 to(transparentize($_small_gradient_color, 1)));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
549
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
550 $_big_gradient: -gtk-gradient(radial,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
551 $_position, 0,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
552 $_position, 0.6,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
553 from(transparentize($_big_gradient_color, 0.93)),
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
554 to(transparentize($_big_gradient_color, 1)));
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
555
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
556 @if $t==normal {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
557 background-image: $_small_gradient, $_big_gradient;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
558 background-size: $_small_gradient_size, $_big_gradient_size;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
559 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
560
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
561 @else if $t==backdrop {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
562 background-image: $_small_gradient;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
563 background-size: $_small_gradient_size;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
564 }
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
565
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
566 background-repeat: no-repeat;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
567 background-position: $_position;
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 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
570 border: none; //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
571 box-shadow: none; //
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 @mixin undershoot($p) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
575 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
576 // undershoot
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
577 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
578 // $p: position
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
579 //
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
580 // possible $p values:
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
581 // top, bottom, right, left
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
582 //
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_color_dark: transparentize(black, 0.8);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
585 $_undershoot_color_light: transparentize(white, 0.8);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
586
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
587 $_gradient_dir: left;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
588 $_dash_bg_size: 10px 1px;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
589 $_gradient_repeat: repeat-x;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
590 $_bg_pos: center $p;
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 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
593
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
594 @if ($p == left) or ($p == right) {
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
595 $_gradient_dir: top;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
596 $_dash_bg_size: 1px 10px;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
597 $_gradient_repeat: repeat-y;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
598 $_bg_pos: $p center;
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
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
601 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
602 $_undershoot_color_light 50%,
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
603 $_undershoot_color_dark 50%);
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
604
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
605 padding-#{$p}: 1px;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
606 background-size: $_dash_bg_size;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
607 background-repeat: $_gradient_repeat;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
608 background-origin: content-box;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
609 background-position: $_bg_pos;
a48477723cfe Base Adwaita theme for GTK 3.16
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
610 }