edge_framework 0.9.10 → 0.9.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +297 -89
  3. data/assets/sass/edge/_base.scss +29 -14
  4. data/assets/sass/edge/components/_button.scss +36 -47
  5. data/assets/sass/edge/components/_grid.scss +7 -7
  6. data/assets/sass/edge/components/_tile.scss +20 -5
  7. data/assets/sass/edge/components/_typography.scss +1 -6
  8. data/assets/sass/edge/components/_visibility.scss +15 -35
  9. data/assets/sass/edge.scss +1 -1
  10. data/assets/sass/for-test.scss +13 -6
  11. data/assets/test.html +42 -45
  12. data/bin/edge +3 -3
  13. data/lib/edge/install_generator.rb +56 -0
  14. data/lib/edge/message.rb +2 -6
  15. data/lib/edge/version.rb +1 -1
  16. data/lib/edge_framework.rb +4 -0
  17. data/readme-img/compass-edge-big.jpg +0 -0
  18. data/readme-img/compass-edge.jpg +0 -0
  19. data/readme-img/generator/assets/css/.keep +0 -0
  20. data/readme-img/generator/assets/css/app.css +67 -0
  21. data/readme-img/generator/assets/css/framework.css +1015 -0
  22. data/readme-img/generator/assets/files/.keep +0 -0
  23. data/readme-img/generator/assets/fonts/.keep +0 -0
  24. data/readme-img/generator/assets/img/favicon-big.png +0 -0
  25. data/readme-img/generator/assets/img/favicon.png +0 -0
  26. data/readme-img/generator/assets/img/ipad.svg +19 -0
  27. data/readme-img/generator/assets/img/iphone.svg +22 -0
  28. data/readme-img/generator/assets/js/app.js +3 -0
  29. data/readme-img/generator/assets/js/vendor/custom.modernizr.js +4 -0
  30. data/readme-img/generator/assets/js/vendor/jquery.min.js +6 -0
  31. data/readme-img/generator/assets/sass/_setting.scss +107 -0
  32. data/readme-img/generator/assets/sass/app.scss +102 -0
  33. data/readme-img/generator/assets/sass/framework.scss +10 -0
  34. data/readme-img/generator/content.html +40 -0
  35. data/readme-img/generator/index.html +49 -0
  36. data/readme-img/generator/robots.txt +7 -0
  37. data/readme-img/grid-centered.jpg +0 -0
  38. data/readme-img/grid-collapse.jpg +0 -0
  39. data/readme-img/grid-large-small.jpg +0 -0
  40. data/readme-img/grid-large.jpg +0 -0
  41. data/readme-img/grid-nesting.jpg +0 -0
  42. data/readme-img/grid-offset.jpg +0 -0
  43. data/readme-img/grid-ordering.jpg +0 -0
  44. data/readme-img/grid-tile.jpg +0 -0
  45. data/readme-img/logo.jpg +0 -0
  46. data/readme-img/rails-edge-big.jpg +0 -0
  47. data/readme-img/rails-edge.jpg +0 -0
  48. data/template/base/assets/sass/_setting.scss +41 -52
  49. data/template/master/assets/sass/_setting.scss +118 -0
  50. data/template/rails/application.html.erb +30 -0
  51. metadata +36 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDVlNDM5NDIzMzAwMmE4OTNkNTk3Mjk2ODZhNjBlNjgyZjc5ZmY5Mw==
4
+ YjAyMmQwYTdjODRkYzczOTMzMzIwNjQ5YjQ1YjY0NDk0YWY3Mzg3ZA==
5
5
  data.tar.gz: !binary |-
6
- Y2FjZmFmOWE3MGYyNjlmYmEyZTY1YzhkMzExMzVmOGUzYmVkMjhlMQ==
6
+ NjhhZjdiNTMyMjIxMDMyZmY3ZDQ5YWJmOTUzOGRjMmI0NWIxN2M4YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDRjOTRmMTZmMzZhYzIwYjQxZGRlMGFiYTI0MGIwODVmMzVjNjBmMjg3NGQ2
10
- NDQ5N2FhZDVlMmY1ZTgzYWQ2YjViZWJkYTVkMjIyYmEzZTUwMDNmZWU4YjZl
11
- OGRlMTZlMTU4ZTUyZjc4YjU4ZGU0OGEwYmEyN2I0NmFkNGRhYzU=
9
+ ODY1YzkwMWNmZjA2MWJiZDU3OGI2ZjU5OTQxOGFkOGZkYzgwODliYjc3MjAw
10
+ MWY2NzAzZWJhOThhOTZhY2FiNmZmMzA1MjllZDY5ZTUzNjY4NjY2ZjdhYzQ5
11
+ ODgwZDI0MzI5MDJlMDVkZTY3NDU0N2RkNmU3YjRkN2NkODk1ZDI=
12
12
  data.tar.gz: !binary |-
13
- Y2YwYTZjZTZlYTdkYmI0YWU2ZTMxM2M5MzA1MTQ0NTA3MjM0Y2FhYWU1NzQ4
14
- MDZmYzI4MTAzZGY4NzgzODYzMzgyYWQ1ZmI3ZWZiNDdlYTljMmFmODhlNTQw
15
- NTIzMTE5YWZiYWQyODBkMGY4MGVkZTgxOTQ2NjZmNzkzZDI5MGE=
13
+ Yzc4NTE5YzNhMTZjNDdjYTY0NTM5NzVlNDJhYTNiYzRjZThhYzAwNTk5NTk4
14
+ MmU1YTBmYzk0OWIyN2NkYTVhOThhMDVhNjg0ZDAwZWY3MDY3YzhjNmZkZGEy
15
+ ZTU2ZWM1YjQ4NzA5ODRmNTlmOWZiZDI0NTA4N2M4ZGNlMDE4OTE=
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
+ ![Edge Framework](http://cdn.setyono.net/edge/logo.jpg)
2
+
1
3
  EDGE FRAMEWORK
2
4
  ==========================
3
5
 
4
- **ABOUT EDGE**
5
-
6
- Edge is a light-weight responsive Sass framework. No gimmick, just the basic necessity to build modern website.
6
+ Edge is a light-weight responsive Sass framework. No gimmick, just the barebone to build modern website.
7
7
 
8
8
  It is based on [Foundation by ZURB](http://www.zurb.com).
9
9
 
@@ -11,9 +11,8 @@ It is based on [Foundation by ZURB](http://www.zurb.com).
11
11
 
12
12
  My personal preference is to have a framework not do something and implement it myself than have a framework do something and figure out how to do the opposite.
13
13
 
14
-
15
14
  INSTALLATION
16
- =============
15
+ -----------------
17
16
 
18
17
  gem install edge_framework
19
18
 
@@ -21,25 +20,69 @@ Windows PC doesn't come with Ruby pre-installed, so you can follow [this Ruby in
21
20
 
22
21
  After you installed Ruby, type in the command above on `cmd` (command prompt).
23
22
 
24
- GRID SYSTEM - COLUMN
23
+ GRID SYSTEM
25
24
  ==================
25
+ .row
26
+ .column
27
+ .large-x
28
+ .small-x
29
+
30
+ Our Grid is divided into **12 columns**. Start with "row" followed by "column" used in conjunction with its width.
31
+
32
+ <div class="row">
33
+ <div class="large-8 column"></div>
34
+ <div class="large-4 column"></div>
35
+ </div>
36
+
37
+ ![Edge Grid - Large only](http://cdn.setyono.net/edge/grid-large.jpg)
26
38
 
27
39
  <div class="row">
28
- <div class="large-4 small-6 column"></div>
29
40
  <div class="large-8 small-6 column"></div>
41
+ <div class="large-4 small-6 column"></div>
30
42
  </div>
31
43
 
32
- Our Grid is divided into **12 columns**. Start with row followed by column and its width.
44
+ ![Edge Grid - Large and Small](http://cdn.setyono.net/edge/grid-large-small.jpg)
33
45
 
34
46
  The tag doesn't have to be div, it can be section, article, header, etc.
35
47
 
48
+ Never style either row or column, you might see unexpected behavior.
49
+
36
50
  Sizing:
37
51
 
38
52
  - Large - above 768px
39
53
 
40
- - Small (optional) - below or equal to 768px, width will be 100% if not specified.
54
+ - Small - below or equal to 768px, width will be 100% if not specified.
55
+
56
+ Nesting
57
+ -----------
58
+
59
+ <div class="row">
60
+ <div class="large-8 column">
61
+ <div class="row">
62
+ <div class="large-2 column"></div>
63
+ <div class="large-10 column"></div>
64
+ </div>
65
+ </div>
66
+ <div class="large-4 column"></div>
67
+ </div>
68
+
69
+ ![Edge Grid - Nesting](http://cdn.setyono.net/edge/grid-nesting.jpg)
70
+
71
+ Collapse
72
+ -----------
73
+
74
+ .row.collapse
75
+
76
+ Remove the gutter.
77
+
78
+ <div class="row collapse">
79
+ <div class="large-9 small-6 column"></div>
80
+ <div class="large-3 small-6 column"></div>
81
+ </div>
82
+
83
+ All nested rows inside collapsed one will be collapsed too.
41
84
 
42
- The snippets above is `4 - 8` on Large screen and `6 - 6` on Small screen.
85
+ ![Edge Grid - Collapse](http://cdn.setyono.net/edge/grid-collapse.jpg)
43
86
 
44
87
  Centering
45
88
  -----------
@@ -50,19 +93,10 @@ Centering
50
93
  You can make a column **horizontally centered** on your screen by adding the class above. Large centering is inherited on small screen.
51
94
 
52
95
  <div class="row">
53
- <div class="large-8 large-centered column"></div>
96
+ <div class="large-7 small-7 large-centered column"></div>
54
97
  </div>
55
98
 
56
- Feel free to nest the row if you want more than two columns to be centered:
57
-
58
- <section class="row">
59
- <div class="large-8 large-centered column">
60
- <div class="row">
61
- <div class="large-6 column"></div>
62
- <div class="large-6 column"></div>
63
- </div>
64
- </div>
65
- </section>
99
+ ![Edge Grid - Centered](http://cdn.setyono.net/edge/grid-centered.jpg)
66
100
 
67
101
  Offset
68
102
  -----------
@@ -77,12 +111,7 @@ Offset is used to leave a **gap** before the column. Large offset is ignored on
77
111
  <div class="large-6 large-offset-4 column"></div>
78
112
  </div>
79
113
 
80
- The snippets below only has offset on small screen:
81
-
82
- <div class="row">
83
- <div class="large-2 small-4 column"></div>
84
- <div class="large-10 small-6 small-offset-2 column"></div>
85
- </div>
114
+ ![Edge Grid - Offset](http://cdn.setyono.net/edge/grid-offset.jpg)
86
115
 
87
116
  Column Ordering
88
117
  -----------------
@@ -90,24 +119,20 @@ Column Ordering
90
119
  push-x
91
120
  pull-x
92
121
 
93
- Sometimes you want a column to be on the right for Large screen but left-side for Small screen.
94
-
95
122
  **Push** pushes the column to the right, while **Pull** pulls it to the left.
96
123
 
97
124
  Push and Pull is ignored on small screen.
98
125
 
126
+ Let's say you want a sidebar to be on the right for large screen; but on the bottom for small screen.
127
+
99
128
  <div class="row">
100
- <aside class="large-4 small-4 push-4 column"></aside>
101
- <main class="large-8 small-8 pull-8 column"></main>
129
+ <main class="large-8 push-4 column"></main>
130
+ <aside class="large-4 pull-8 column"></aside>
102
131
  </div>
103
132
 
104
133
  The snippet above will look like this:
105
134
 
106
- // on Large screen
107
- |---main---||aside|
108
-
109
- // on Small screen
110
- |aside||---main---|
135
+ ![Edge Grid - Ordering](http://cdn.setyono.net/edge/grid-ordering.jpg)
111
136
 
112
137
  GRID SYSTEM - TILE
113
138
  =================
@@ -115,22 +140,55 @@ GRID SYSTEM - TILE
115
140
  ul.large-tile-x
116
141
  ul.small-tile-x
117
142
 
118
- Tile evenly divides the list into column-like size.
143
+ Evenly divides the list into block size.
119
144
 
120
- <ul class="large-tile-4">
121
- <li></li>
122
- <li></li>
123
- <li></li>
124
- <li></li>
125
- <li></li>
145
+ <ul class="large-tile-3 small-tile-2">
146
+ <li>1</li>
147
+ <li>2</li>
148
+ <li>3</li>
149
+ <li>4</li>
150
+ <li>5</li>
126
151
  </ul>
127
152
 
128
- In the example above, there are 4 list-items per row, 25% width each.
153
+ ![Edge Grid - Tile](http://cdn.setyono.net/edge/grid-tile.jpg)
129
154
 
130
- Without small sizing, each item will be 100% width. Here's how you can control the responsiveness:
155
+ Without the small size, the tile will expand 100% on small screen.
131
156
 
132
- <ul class="large-tile-6 small-tile-3">
133
- </ul>
157
+ Just like row, you can collapse tile too:
158
+
159
+ <ul class="large-tile-7 collapse"></ul>
160
+
161
+ TYPOGRAPHY
162
+ ======================
163
+
164
+ Outside of CSS reset, we don't offer much feature regarding Typography.
165
+
166
+ Default Unordered list (ul) has bullet point, but most of the time we don't need it. So, we made a convention on how to write `ul`.
167
+
168
+ Without class
169
+
170
+ <ul>...<ul>
171
+
172
+ Result:
173
+ • List 1
174
+ • List 2
175
+ • List 3
176
+
177
+ With any class
178
+
179
+ <ul class="something">...</ul>
180
+
181
+ Result:
182
+ List 1
183
+ List 2
184
+ List 3
185
+
186
+ If you want horizontal list, add `.inline-list` class.
187
+
188
+ <ul class="inline-list">...</ul>
189
+
190
+ Result:
191
+ List 1 List 2 List 3
134
192
 
135
193
  VISIBILITY
136
194
  ==================
@@ -138,7 +196,7 @@ VISIBILITY
138
196
  .hide-for-<size>
139
197
  .show-for-<size>
140
198
 
141
- Hide or show element on specific screen size. This class is applicable to any elements.
199
+ <size> = large / small / mini
142
200
 
143
201
  **Hide** means hidden only on that size. **Show** means visible only on that size.
144
202
 
@@ -150,10 +208,20 @@ Sizing:
150
208
 
151
209
  - Mini - below or equal to 480px
152
210
 
153
- Note that small size is below 768px which means it includes mini size.
211
+ **VISIBILITY SCALE**
212
+
213
+ 0-----480-----768------------->
214
+
215
+ |-mini-|
216
+
217
+ |----small-----|
218
+
219
+ |----large----->
220
+
221
+ Notice that small size includes the mini portion too.
154
222
 
155
223
  **VISIBILITY TABLE**
156
-
224
+
157
225
  ✓ = visible
158
226
 
159
227
  Large Small Mini
@@ -168,11 +236,12 @@ Note that small size is below 768px which means it includes mini size.
168
236
 
169
237
  From the table, we can see that some classes like `.hide-for-large` and `.show-for-small` have same result. It is up to your preference on which word makes more sense.
170
238
 
171
- **EXAMPLES**
239
+ EXAMPLE
240
+ --------------
172
241
 
173
242
  Sidebar hidden on mini screen
174
243
 
175
- <aside class="sidebar hide-for-mini"></aside>
244
+ <aside hide-for-mini"></aside>
176
245
 
177
246
  Slider visible only on large screen
178
247
 
@@ -183,57 +252,210 @@ Slider visible only on large screen
183
252
  TEMPLATE GENERATOR
184
253
  ====================
185
254
 
186
- Edge can generate basic template for your project. Run this command inside your project directory:
255
+ Generate basic template for your project. Run this command inside your project directory:
187
256
 
188
257
  1. Static HTML
189
258
 
190
259
  `edge create html`
191
260
 
192
- 2. Standard PHP
193
-
261
+ 2. Static PHP (under construction)
262
+
194
263
  `edge create php`
195
264
 
196
- 3. Wordpress
197
-
198
- `edge create wordpress`
265
+ 3. Rails (run inside Rails project)
266
+
267
+ `rails g edge:install`
199
268
 
200
- 4. Coming soon: Rails, Sinatra, Django, Flask
269
+ 4. Coming soon: Wordpress, Sinatra, and Flask
201
270
 
202
271
  COMPASS
203
272
  =================
204
273
 
205
- Inside the generated template, go to `assets/sass/` and you will see `_settings.scss`. This file overrides the default styling like primary color or column's gutter.
274
+ ![Edge Compass](http://cdn.setyono.net/edge/compass-edge.jpg)
275
+
276
+ The generated template includes **config.rb** for Compass. So, we can directly compile it using:
277
+
278
+ compass watch
279
+
280
+ Inside the template, go to `assets/sass/` and you will see `_settings.scss`. This file overrides the default styling like primary color or column's gutter.
206
281
 
207
- Just uncomment the variable and change the value:
282
+ Just uncomment the variable and change the value. For example:
208
283
 
209
284
  // $column-gutter : 20px;
210
-
285
+
211
286
  Become:
212
287
 
213
288
  $column-gutter : 30px;
214
289
 
215
- **STARTING FROM SCRATCH**
290
+ GRID - mixin
291
+ ======================
292
+
293
+ row()
294
+ $gutter : px
295
+ $width : px
296
+ $collapse : bool
297
+
298
+ column()
299
+ $large : int
300
+ $small : int
301
+ $mini : int
302
+ $large-offset : int
303
+ $small-offset : int
304
+ $mini-offset : int
305
+ $push : int
306
+ $pull : int
307
+ $centered : bool
308
+ $collapse : bool
309
+ $gutter : px
310
+ $total : int // total columns
311
+
312
+ Custom grid makes the markup cleaner and less duplication.
313
+
314
+ It allows one additional sizing: **mini** which is below 480px on default. You can only set mini size when small size is specified.
315
+
316
+ Base class ("row" and "column") must be explicitly written.
317
+
318
+ // HTML
319
+ <div class="row">
320
+ <aside class="column"></aside>
321
+ <main class="column"></main>
322
+ </div>
216
323
 
217
- Here's the guide if you decided not to use the template generator.
324
+ // SCSS
325
+ aside {
326
+ @include column(2, 4, 12);
327
+ // or
328
+ @include column($large: 2, $small: 4, $mini: 12);
329
+ }
218
330
 
219
- There are two main imports:
331
+ main {
332
+ @include column(10, 8, 12);
333
+ // or
334
+ @include column($large: 10, $small: 8, $mini: 12);
335
+ }
220
336
 
221
- - **edge** - output all of the framework's styling. Used in conjunction with your own generic style that can be re-used in other project.
337
+ **GUTTER**
222
338
 
223
- `@import "edge";`
339
+ If you want to modify the global gutter, change it in Setting file.
340
+
341
+ But if you want it only on specific set of columns, apply it in both row and column.
342
+
343
+ // HTML
344
+ <div class="my-row row">
345
+ <aside class="column"></aside>
346
+ <main class="column"></main>
347
+ </div>
224
348
 
225
- - **edge/helpers** - allow the use of Edge's mixin, doesn't output anything. Used in conjunction with site-specific style
349
+ // SCSS
350
+ .my-row {
351
+ @include row($gutter: 50px);
352
+ }
226
353
 
227
- `@import "edge/helpers";`
354
+ aside {
355
+ @include column($large: 2, $gutter: 50px);
356
+ }
228
357
 
229
- Then at the top of **config.rb**, add this line:
358
+ main {
359
+ @include column($large: 10, $gutter: 50px);
360
+ }
361
+
362
+ **TOTAL COLUMNS**
363
+
364
+ aside {
365
+ @include column($large: 20, $total: 100);
366
+ }
367
+
368
+ main {
369
+ @include column($large: 80, $total: 100);
370
+ }
371
+
372
+ **COLLAPSE**
373
+
374
+ Collapse must be applied to both custom row and column.
375
+
376
+ .my-row {
377
+ @include row($collapse: true);
378
+ }
230
379
 
231
- require "edge_framework"
380
+ main {
381
+ @include column($large: 10, $collapse: true);
382
+ }
383
+
384
+ TILE - mixin
385
+ ======================
386
+
387
+ tile()
388
+ $large : int
389
+ $small : int
390
+ $mini : int
391
+ $gutter : px,
392
+ $collapse : bool
393
+
394
+ Just like column's mixin, you can set mini size.
395
+
396
+ <ul class="products"></ul>
397
+
398
+ .products {
399
+ @include tile(4, 2, 1);
400
+ // or
401
+ @include tile($large: 4, $small: 2, $mini: 1);
402
+ }
403
+
404
+ VISIBILITY - mixin
405
+ ========================
406
+
407
+ hide-for($size)
408
+ show-for($size)
409
+
410
+ $size = large / small / mini
411
+
412
+ It has the same behavior with using the class.
413
+
414
+ <aside>...</aside>
415
+
416
+ aside {
417
+ @include hide-for(large);
418
+ }
419
+
420
+ MEDIA QUERY - mixin
421
+ =========================
422
+
423
+ below($size)
424
+ above($size)
425
+ between($smaller-size, $larger-size)
426
+
427
+ $size = px / large / small / mini
428
+
429
+ **Below** means less than or equal to (`<=`).
430
+
431
+ **Above** means more than (`>`).
432
+
433
+ **Between** is inclusive to both (`>= smaller-size` and `<= larger-size`).
434
+
435
+ Other than the usual "large" or "small", you can also use pixel on this mixin.
436
+
437
+ p {
438
+ color: black;
439
+
440
+ @include below(small) {
441
+ color: blue;
442
+ }
443
+
444
+ @include below(500px) {
445
+ color: red;
446
+ }
447
+
448
+ @include between(100px, small) {
449
+ color: green;
450
+ }
451
+ }
232
452
 
233
453
  RAILS
234
454
  =================
235
455
 
236
- You can use Edge by including this in your Gemfile:
456
+ ![Edge Rails](http://cdn.setyono.net/edge/rails-edge.jpg)
457
+
458
+ Gemfile:
237
459
 
238
460
  gem 'sass', '= 3.2.14'
239
461
  gem 'sass-rails', '~> 4.0.0'
@@ -242,22 +464,8 @@ You can use Edge by including this in your Gemfile:
242
464
 
243
465
  The latest version of Sass (3.3.x) is not compatible with latest Compass (0.12.x). So until they fixed it, use Sass version 3.2.14
244
466
 
245
- If you're not planning to override any variables, include `require edge` in your assets pipeline (application.css)
246
-
247
- /*
248
- *= require_self
249
- *= require edge
250
- *= require_tree .
251
- */
252
-
253
- Otherwise, use the generator to get the starter kit which includes Setting file.
254
-
255
- rails g edge:install (COMING SOON)
467
+ Template generator:
256
468
 
257
- The Rails generator is not ready yet. Alternatively, copy all the Sass files from any of the Template generator and put it on `assets/stylesheets` directory. Then in your application.css:
469
+ rails g edge:install
258
470
 
259
- /*
260
- *= require_self
261
- *= require framework
262
- *= require_tree .
263
- */
471
+ The command will give you Edge's SCSS files and append the pipeline.
@@ -28,40 +28,43 @@ $vertical-rhythm : false !default;
28
28
 
29
29
  $external-call : false !default; // user shouldn't modify this
30
30
 
31
+ // Can't be overriden
31
32
  $include-normalize : true !default;
32
33
  $include-typography : true !default;
33
-
34
34
  $include-grid : true !default;
35
+ $include-form : true !default;
36
+
37
+ // Default true
35
38
  $include-tile : true !default;
36
39
  $include-visibility : true !default;
37
-
38
40
  $include-button : true !default;
39
- $include-form : true !default;
40
- $include-animate : true !default;
41
41
 
42
+ // Default false
43
+ $include-animate : false !default;
42
44
  $include-print : false !default;
43
45
  $include-code : false !default;
44
46
 
45
47
  // ----------
46
48
  // COLOR
47
49
  // ----------
48
- // Two main colors of your site
49
- $main-color : #0173bc !default;
50
- $sub-color : #e9e9e9 !default;
51
50
 
52
51
  // These 5 colors below should NEVER be used directly
53
52
  // Put it to other variable like $header-color: $blue-color;
54
- $passive-color : #e9e9e9 !default;
55
- $blue-color : #0173bc !default;
56
- $yellow-color : #dba924 !default;
57
- $red-color : #da2e18 !default;
58
- $green-color : #2cae34 !default;
53
+ $passive-color : #d7d7d7 !default;
54
+ $blue-color : #2a71e3 !default;
55
+ $yellow-color : #fac741 !default;
56
+ $red-color : #d35400 !default;
57
+ $green-color : #229e61 !default;
58
+
59
+ // Two main colors of your site
60
+ $main-color : $blue-color !default;
61
+ $sub-color : $passive-color !default;
59
62
 
60
63
  // ---------------
61
64
  // GLOBAL VALUE
62
65
  // ---------------
63
- $g-radius : 5px !default;
64
- $g-transition : all 0.2s ease-out !default;
66
+ $g-radius : 3px !default;
67
+ $g-transition : all .2s ease-out !default;
65
68
 
66
69
  // ----------------------------
67
70
  // BASE FONT and LINE-HEIGHT
@@ -217,6 +220,18 @@ $retina-screen : 192dpi !default;
217
220
  }
218
221
  }
219
222
 
223
+ // ------------
224
+ // CONTRAST
225
+ // ------------
226
+
227
+ @function is_dark($color) {
228
+ @return contrast-color($color, false, true, 70%);
229
+ }
230
+
231
+ @function is_light($color) {
232
+ @return not is_dark($color);
233
+ }
234
+
220
235
  // ----------------------------------------------
221
236
  // CLEARING FLOAT
222
237
  // Make a container wraps floated element