1
+ // color vars
2
+ $charcoal : #6c6c6c ;
3
+ $olive : #b8b690 ;
4
+ $orange : #d97036 ;
5
+ $beige : #e2ddb7 ;
6
+ $creme : #fcfbf7 ;
7
+ $near-black : #191919 ;
8
+
9
+ $bkgd-img : ' ../resources/img/grit.png' ;
10
+
11
+ // mixins
12
+ @mixin font-face ($font-name ) {
13
+ @font-face {
14
+ font-family : $font-name ;
15
+ src : local ($font-name ), url (' ../resources/font/' + $font-name + ' .ttf' );
16
+ }
17
+ }
18
+
19
+ @mixin bkgd-transition ($duration : 0.5s , $easing : ease ) {
20
+ -moz-transition : background $duration $easing ;
21
+ -webkit-transition : background $duration $easing ;
22
+ }
23
+
24
+ // Styles for canvas
1
25
html {
2
26
height : 100% ;
3
- background : #f1eedc url (' ../resources/img/grit.png' ) repeat ;
4
- -moz-transition : background 0.5s ease ;
5
- -webkit-transition : background 0.5s ease ;
27
+ background : #f1eedc url ($bkgd-img ) repeat ;
28
+ @include bkgd-transition ;
6
29
7
30
& #day {
8
- body { background-color : #fcfbf7 ; }
9
- #optionTab { background : #f1eedc url (' ../resources/ img/grit.png ' ) repeat right ; }
31
+ body { background-color : $creme ; }
32
+ #optionTab { background : #f1eedc url ($bkgd- img ) repeat right ; }
10
33
hr { background-color : #cfccab ; }
11
- div #controls span , div #optionTabText { color : #6c6c6c ; }
34
+ div #controls span , div #optionTabText { color : $charcoal ; }
12
35
}
13
36
14
37
& #night {
15
- background : #434237 url (' ../resources/ img/grit.png ' ) repeat ;
16
- body { background-color : #191919 ; }
17
- #optionTab { background : #434237 url (' ../resources/ img/grit.png ' ) repeat right ; }
38
+ background : #434237 url ($bkgd- img ) repeat ;
39
+ body { background-color : $near-black ; }
40
+ #optionTab { background : #434237 url ($bkgd- img ) repeat right ; }
18
41
hr { background-color : #7c7961 ; }
19
42
div #controls span , div #optionTabText { color : #aaa ; }
20
43
}
21
44
}
22
45
23
46
body {
24
- font-family : ' Raleway' ;
47
+ font-family : ' Raleway-Light ' ;
25
48
border-radius : 10px ;
26
- background : #fcfbf7 ;
49
+ background : $creme ;
27
50
position : fixed ;
28
51
top : 10px ;
29
52
left : 10px ;
30
53
right : 10px ;
31
54
bottom : 10px ;
32
- color : #6c6c6c ;
55
+ color : $charcoal ;
33
56
-moz-user-select : none ;
34
57
-webkit-user-select : none ;
35
- -moz-transition : background 0.5s ease ;
36
- -webkit-transition : background 0.5s ease ;
58
+ @include bkgd-transition ;
37
59
}
38
60
39
61
h1 {
42
64
text-shadow : 2px 2px 5px #555555 ;
43
65
font-size : 75px ;
44
66
font-weight : normal ;
45
- font-family : ' Dancing Script' ;
67
+ font-family : ' Dancing- Script' ;
46
68
}
47
69
48
70
49
- /* * Styles for blocks and time digits * */
71
+ // Styles for blocks and time digits
50
72
div #clockWidget , div #timeDisplay {
51
73
top : 50% ;
52
74
left : 50% ;
@@ -63,7 +85,7 @@ div#clockWidget {
63
85
div #timeDisplay {
64
86
display : none ;
65
87
letter-spacing : 2px ;
66
- font-family : ' Raleway Thin' ;
88
+ font-family : ' Raleway- Thin' ;
67
89
68
90
& .horizontal {
69
91
width : 150px ;
@@ -109,40 +131,39 @@ div.block {
109
131
display : inline-block ;
110
132
line-height : 27px ;
111
133
font-size : 18px ;
112
- -moz-transition :background 0.2s ease-in ;
113
- -webkit-transition :background 0.2s ease-in ;
134
+ @include bkgd-transition (0.2s , ease-in );
114
135
115
136
& .row2 {
116
137
border : 3px solid #a0a078 ;
117
- background : #b8b690 url (' ../resources/ img/grit.png ' ) repeat ;
138
+ background : $olive url ($bkgd- img ) repeat ;
118
139
119
- & .dark { background : #b8b690 url (' ../resources/ img/grit.png ' ) repeat ; }
120
- & .light { background : rgba (244 , 243 , 235 , 0.1 ) url (' ../resources/ img/grit.png ' ) repeat ; }
140
+ & .dark { background : $olive url ($bkgd- img ) repeat ; }
141
+ & .light { background : rgba (244 , 243 , 235 , 0.1 ) url ($bkgd- img ) repeat ; }
121
142
}
122
143
123
144
& .row1 {
124
145
border : 3px solid #c85b2c ;
125
- background : #d97036 url (' ../resources/ img/grit.png ' ) repeat ;
146
+ background : $orange url ($bkgd- img ) repeat ;
126
147
127
- & .dark { background : #d97036 url (' ../resources/ img/grit.png ' ) repeat ; }
128
- & .light { background : rgba (248 , 236 , 226 , 0.1 ) url (' ../resources/ img/grit.png ' ) repeat ; }
148
+ & .dark { background : $orange url ($bkgd- img ) repeat ; }
149
+ & .light { background : rgba (248 , 236 , 226 , 0.1 ) url ($bkgd- img ) repeat ; }
129
150
}
130
151
131
152
& .row0 {
132
153
border : 3px solid #c3c19b ;
133
- background : #e2ddb7 url (' ../resources/ img/grit.png ' ) repeat ;
154
+ background : $beige url ($bkgd- img ) repeat ;
134
155
135
- & .dark { background : #e2ddb7 url (' ../resources/ img/grit.png ' ) repeat ; }
136
- & .light { background : rgba (248 , 247 , 239 , 0.1 ) url (' ../resources/ img/grit.png ' ) repeat ; }
156
+ & .dark { background : $beige url ($bkgd- img ) repeat ; }
157
+ & .light { background : rgba (248 , 247 , 239 , 0.1 ) url ($bkgd- img ) repeat ; }
137
158
}
138
159
139
160
> span { color : #444 ; }
140
161
}
141
162
142
163
143
- /* * Styles for options * */
164
+ // Styles for options
144
165
div #optionTab {
145
- background : #f1eedc url (' ../resources/ img/grit.png ' ) repeat right ;
166
+ background : #f1eedc url ($bkgd- img ) repeat right ;
146
167
letter-spacing : 2px ;
147
168
top : 50% ;
148
169
left : 100% ;
@@ -154,10 +175,9 @@ div#optionTab {
154
175
height : 94px ;
155
176
width : 44px ;
156
177
cursor : default ;
157
- -moz-transition : background 0.5s ease ;
158
- -webkit-transition : background 0.5s ease ;
159
- -webkit-backface-visibility : hidden ; /* eliminates trailing border lines during animation */
160
- } /* http://stackoverflow.com/questions/12273528/trailing-border-lines-in-chrome */
178
+ @include bkgd-transition ;
179
+ -webkit-backface-visibility : hidden ; // eliminates trailing border lines during animation
180
+ } // http://stackoverflow.com/questions/12273528/trailing-border-lines-in-chrome
161
181
162
182
div #optionTabText {
163
183
margin-top : 46px ;
@@ -230,16 +250,15 @@ div#layout {
230
250
}
231
251
232
252
233
- /* * Styles for option panel buttons * */
253
+ // Styles for option panel buttons
234
254
button {
235
- color : #6c6c6c ;
255
+ color : $charcoal ;
236
256
font-size : .9em ;
237
- font-family : ' Raleway' ;
257
+ font-family : ' Raleway-Light ' ;
238
258
letter-spacing : 1px ;
239
259
margin : 4px 0 ;
240
260
cursor : pointer ;
241
- -moz-transition : background 0.4s ease ;
242
- -webkit-transition : background 0.4s ease ;
261
+ @include bkgd-transition (0.4s );
243
262
border : 1px solid #cfccab ;
244
263
background-color : #f3f1e4 ;
245
264
border-radius : 6px ;
@@ -258,7 +277,7 @@ button {
258
277
opacity : 0.6 ;
259
278
260
279
& :hover , & :focus , & :active {
261
- color : #6C6C6C ;
280
+ color : $charcoal ;
262
281
background-color : #f3f1e4 ;
263
282
}
264
283
}
@@ -272,19 +291,7 @@ button {
272
291
& #sun , & #horizontal { display : none ; }
273
292
}
274
293
275
-
276
- /* * Import fonts **/
277
- @font-face {
278
- font-family : ' Raleway Thin' ;
279
- src : local (' Raleway-Thin' ), url (' ../resources/font/Raleway-Thin.ttf' );
280
- }
281
-
282
- @font-face {
283
- font-family : ' Raleway' ;
284
- src : local (' Raleway-Light' ), url (' ../resources/font/Raleway-Light.ttf' );
285
- }
286
-
287
- @font-face {
288
- font-family : ' Dancing Script' ;
289
- src : local (' Dancing-Script' ), url (' ../resources/font/Dancing-Script.ttf' );
290
- }
294
+ // Import fonts
295
+ @include font-face (' Raleway-Thin' );
296
+ @include font-face (' Raleway-Light' );
297
+ @include font-face (' Dancing-Script' );
0 commit comments