edge_framework 0.9.0 → 0.9.9

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 (37) hide show
  1. data/README.md +6 -10
  2. data/assets/js/edge/edge.animate.js +0 -0
  3. data/assets/sass/edge/_base.scss +34 -22
  4. data/assets/sass/edge/_components.scss +5 -4
  5. data/assets/sass/edge/_helpers.scss +2 -14
  6. data/assets/sass/edge/components/_animate.scss +151 -0
  7. data/assets/sass/edge/components/_button.scss +98 -41
  8. data/assets/sass/edge/components/_code.scss +170 -166
  9. data/assets/sass/edge/components/_form.scss +77 -76
  10. data/assets/sass/edge/components/_grid.scss +15 -12
  11. data/assets/sass/edge/components/_normalize.scss +60 -59
  12. data/assets/sass/edge/components/_print.scss +73 -70
  13. data/assets/sass/edge/components/_tile.scss +24 -10
  14. data/assets/sass/edge/components/_typography.scss +127 -138
  15. data/assets/sass/edge/components/_visibility.scss +156 -44
  16. data/assets/sass/edge/helpers/_sprites.scss +75 -63
  17. data/assets/sass/edge/helpers/_sticky-footer.scss +26 -31
  18. data/assets/sass/edge.scss +1 -1
  19. data/assets/sass/for-test.scss +247 -151
  20. data/assets/test.html +323 -11
  21. data/edge.gemspec +17 -18
  22. data/lib/edge/engine.rb +19 -0
  23. data/lib/edge/message.rb +32 -29
  24. data/lib/edge/sprockets.rb +4 -0
  25. data/lib/edge/version.rb +2 -2
  26. data/lib/edge_framework.rb +63 -67
  27. data/template/base/assets/js/app.js +1 -1
  28. data/template/base/assets/sass/_setting.scss +35 -35
  29. data/template/base/config.rb +1 -1
  30. data/template/html/index.html +3 -3
  31. data/template/php/partials/footer.php +2 -2
  32. data/template/wordpress/footer.php +2 -3
  33. metadata +8 -24
  34. data/assets/sass/edge/components/_block-grid-margin.scss +0 -112
  35. data/assets/sass/edge/components/_grid-margin.scss +0 -309
  36. data/assets/sass/edge/components/_grid-old.scss +0 -287
  37. data/lib/edge/console.rb +0 -15
@@ -1,9 +1,9 @@
1
- // ------------------------------------------
2
- // CODE HIGHLIGHTER
3
- // Based on Prism.js - Coy Theme
4
- // @origin Tim Shedor
5
- // https://github.com/tshedor/workshop-wp-theme
6
- // -------------------------------------------------------
1
+ // =============
2
+ // EDGE CODE
3
+ // =============
4
+ // Based on Prism.js - Coy Theme
5
+ // @origin Tim Shedor
6
+ // https://github.com/tshedor/workshop-wp-theme
7
7
 
8
8
  $code-font-family : "Consolas", Courier, "monospace" !default;
9
9
  $code-theme : light !default; // dark or light
@@ -46,7 +46,7 @@ $code-python-color : #376a94; // dark-blue
46
46
  }
47
47
  }
48
48
 
49
- @if $include-code {
49
+ @if $include-code and not $external-call {
50
50
  /* ----------------------
51
51
  EDGE CODE Highlighter
52
52
  ---------------------- */
@@ -157,54 +157,56 @@ pre {
157
157
 
158
158
 
159
159
  @if $code-theme == light {
160
- .token.comment,
161
- .token.block-comment,
162
- .token.prolog,
163
- .token.doctype,
164
- .token.cdata {
165
- color: #7D8B99;
166
- }
160
+ .token {
161
+ &.comment,
162
+ &.block-comment,
163
+ &.prolog,
164
+ &.doctype,
165
+ &.cdata {
166
+ color: #7D8B99;
167
+ }
167
168
 
168
- .token.punctuation {
169
- color: #5F6364;
170
- }
169
+ &.punctuation {
170
+ color: #5F6364;
171
+ }
171
172
 
172
- .token.property,
173
- .token.tag,
174
- .token.boolean,
175
- .token.number,
176
- .token.function-name,
177
- .token.constant,
178
- .token.symbol {
179
- color: #c92c2c;
180
- }
173
+ &.property,
174
+ &.tag,
175
+ &.boolean,
176
+ &.number,
177
+ &.function-name,
178
+ &.constant,
179
+ &.symbol {
180
+ color: #c92c2c;
181
+ }
181
182
 
182
- .token.selector,
183
- .token.attr-name,
184
- .token.string,
185
- .token.function,
186
- .token.builtin {
187
- color: #2f9c0a;
188
- }
183
+ &.selector,
184
+ &.attr-name,
185
+ &.string,
186
+ &.function,
187
+ &.builtin {
188
+ color: #2f9c0a;
189
+ }
189
190
 
190
- .token.operator,
191
- .token.entity,
192
- .token.url,
193
- .token.variable {
194
- color: #a67f59;
195
- background: rgba(255, 255, 255, 0.5);
196
- }
191
+ &.operator,
192
+ &.entity,
193
+ &.url,
194
+ &.variable {
195
+ color: #a67f59;
196
+ background: rgba(255, 255, 255, 0.5);
197
+ }
197
198
 
198
- .token.atrule,
199
- .token.attr-value,
200
- .token.keyword,
201
- .token.class-name {
202
- color: #1990b8;
203
- }
199
+ &.atrule,
200
+ &.attr-value,
201
+ &.keyword,
202
+ &.class-name {
203
+ color: #1990b8;
204
+ }
204
205
 
205
- .token.regex,
206
- .token.important {
207
- color: #e90;
206
+ &.regex,
207
+ &.important {
208
+ color: #e90;
209
+ }
208
210
  }
209
211
 
210
212
  [data-lang="css"] .token.string,
@@ -214,151 +216,153 @@ pre {
214
216
  }
215
217
  }
216
218
  @else if $code-theme == dark {
217
- .token.property,
218
- .token.tag,
219
- .token.constant,
220
- .token.symbol {
221
- color: #f92672;
222
- }
219
+ .token {
220
+ &.property,
221
+ &.tag,
222
+ &.constant,
223
+ &.symbol {
224
+ color: #f92672;
225
+ }
223
226
 
224
- .token.boolean,
225
- .token.number{
226
- color: #ae81ff;
227
- }
227
+ &.boolean,
228
+ &.number{
229
+ color: #ae81ff;
230
+ }
228
231
 
229
- .token.selector,
230
- .token.attr-name,
231
- .token.string,
232
- .token.builtin {
233
- color: #a6e22e;
234
- }
232
+ &.selector,
233
+ &.attr-name,
234
+ &.string,
235
+ &.builtin {
236
+ color: #a6e22e;
237
+ }
235
238
 
239
+ &.atrule,
240
+ &.attr-value
241
+ {
242
+ color: #e6db74;
243
+ }
236
244
 
237
- .token.operator,
238
- .token.entity,
239
- .token.url,
240
- .language-css .token.string,
241
- .style .token.string,
242
- .token.variable {
243
- color: #f8f8f2;
244
- }
245
245
 
246
- .token.atrule,
247
- .token.attr-value
248
- {
249
- color: #e6db74;
250
- }
246
+ &.keyword{
247
+ color: #66d9ef;
248
+ }
251
249
 
250
+ &.regex,
251
+ &.important {
252
+ color: #fd971f;
253
+ }
252
254
 
253
- .token.keyword{
254
- color: #66d9ef;
255
+ &.operator,
256
+ &.entity,
257
+ &.url,
258
+ &.variable {
259
+ color: #f8f8f2;
260
+ }
255
261
  }
256
262
 
257
- .token.regex,
258
- .token.important {
259
- color: #fd971f;
263
+ [data-lang="css"] .token.string,
264
+ .style .token.string {
265
+ color: #f8f8f2;
260
266
  }
261
267
  }
262
268
 
269
+ .token {
270
+ &.important {
271
+ font-weight: normal;
272
+ }
263
273
 
264
- .token.important {
265
- font-weight: normal;
266
- }
267
-
268
- .token.entity {
269
- cursor: help;
270
- }
271
-
272
- .namespace {
273
- opacity: .7;
274
- }
275
-
276
- /* Plugin styles */
277
-
278
- .token.tab:not(:empty):before,
279
- .token.cr:before,
280
- .token.lf:before {
281
- color: #e0d7d1;
282
- }
283
-
284
- /* Line Highlighter */
285
-
286
- .line-highlight {
287
- position: absolute;
288
- right: 0;
289
- left: 0;
274
+ &.entity {
275
+ cursor: help;
276
+ }
290
277
 
291
- pointer-events: none;
292
- line-height: inherit;
293
- white-space: pre;
294
-
295
- @if $code-theme == dark {
296
- @include background-image(linear-gradient(left, rgba(#e2e2e2, .1) 70%, rgba(#e2e2e2, 0) ) );
297
- } @else {
298
- @include background-image(linear-gradient(left, rgba(#8c8c8c, .1) 70%, rgba(#8c8c8c, 0) ) );
278
+ &.tab:not(:empty):before,
279
+ &.cr:before,
280
+ &.lf:before {
281
+ color: #e0d7d1;
299
282
  }
300
-
301
283
  }
302
284
 
303
- .line-highlight:before,
304
- .line-highlight[data-end]:after {
305
- content: attr(data-start);
306
- position: absolute;
307
- z-index: 2;
308
- top: .4em;
309
- left: .5em;
310
- min-width: 1em;
311
- padding: 0 .5em;
312
- color: hsl(24, 20%, 95%);
313
- font: bold 65%/1.5 sans-serif;
314
- text-align: center;
315
- vertical-align: .3em;
316
- border-radius: 999px;
317
- text-shadow: none;
318
- box-shadow: 0 1px white;
285
+ pre {
286
+ .namespace {
287
+ opacity: .7;
319
288
  }
320
289
 
321
- .line-highlight[data-end]:after {
322
- content: attr(data-end);
323
- top: auto;
324
- bottom: .4em;
325
- }
290
+ // LINE HIGHLIGHTER
326
291
 
327
- /* Line numbers */
292
+ .line-highlight {
293
+ position: absolute;
294
+ right: 0;
295
+ left: 0;
328
296
 
329
- pre.line-numbers {
330
- position: relative;
331
- counter-reset: linenumber;
332
- }
297
+ pointer-events: none;
298
+ line-height: inherit;
299
+ white-space: pre;
300
+
301
+ @if $code-theme == dark {
302
+ @include background-image(linear-gradient(left, rgba(#e2e2e2, .1) 70%, rgba(#e2e2e2, 0) ) );
303
+ } @else {
304
+ @include background-image(linear-gradient(left, rgba(#8c8c8c, .1) 70%, rgba(#8c8c8c, 0) ) );
305
+ }
333
306
 
334
- pre.line-numbers > code {
335
- position: relative;
336
- padding-left: 2.5em;
337
- }
307
+ &:before,
308
+ &[data-end]:after {
309
+ content: attr(data-start);
310
+ position: absolute;
311
+ z-index: 2;
312
+ top: 0;
313
+ left: 0;
314
+ padding: 0 .5em;
315
+ opacity: .5;
316
+
317
+ color: #f5f2f0;
318
+ font-weight: 700;
319
+ font-size: 1em;
320
+ text-align: center;
321
+ }
338
322
 
339
- .line-numbers .line-numbers-rows {
340
- position: absolute;
341
- pointer-events: none;
342
- top: 0;
343
- font-size: 100%;
344
- left: .5em;
345
- letter-spacing: -1px;
323
+ &[data-end]:after {
324
+ content: attr(data-end);
325
+ top: auto;
326
+ bottom: 0;
327
+ }
328
+ }
346
329
 
347
- @include disable-user-select();
348
- }
330
+ // LINE NUMBERS
349
331
 
350
- .line-numbers-rows > span {
351
- pointer-events: none;
352
- display: block;
353
- counter-increment: linenumber;
332
+ &.line-numbers {
333
+ position: relative;
334
+ counter-reset: linenumber;
335
+
336
+ > code {
337
+ position: relative;
338
+ padding-left: 2.5em;
339
+ }
354
340
  }
355
341
 
356
- .line-numbers-rows > span:before {
357
- content: counter(linenumber);
358
- color: #ddd;
342
+ .line-numbers-rows {
343
+ position: absolute;
344
+ pointer-events: none;
345
+ top: 0;
346
+ font-size: 100%;
347
+ left: .5em;
348
+ letter-spacing: -1px;
349
+
350
+ @include user-select(none);
351
+
352
+ > span {
353
+ pointer-events: none;
359
354
  display: block;
360
- padding-right: 0.8em;
361
- text-align: right;
355
+ counter-increment: linenumber;
356
+
357
+ &:before {
358
+ content: counter(linenumber);
359
+ color: #ddd;
360
+ display: block;
361
+ padding-right: 0.8em;
362
+ text-align: right;
363
+ }
362
364
  }
365
+ }
366
+ }
363
367
 
364
368
  } // $include-code
@@ -1,6 +1,6 @@
1
- // -------------
2
- // FORM
3
- // -------------
1
+ // ============
2
+ // EDGE FORM
3
+ // ============
4
4
 
5
5
  $input-padding : em(10px);
6
6
  $input-border-style : 1px solid;
@@ -13,97 +13,98 @@ $input-border-focus : $input-border-style $main-color;
13
13
  $prefix-bg-color : $passive-color;
14
14
 
15
15
  @mixin input() {
16
- [type="text"],
17
- [type="password"],
18
- [type="date"],
19
- [type="datetime"],
20
- [type="datetime-local"],
21
- [type="month"],
22
- [type="week"],
23
- [type="email"],
24
- [type="number"],
25
- [type="search"],
26
- [type="tel"],
27
- [type="time"],
28
- [type="url"],
29
- select,
30
- textarea {
31
- @content;
32
- }
16
+ [type="text"],
17
+ [type="password"],
18
+ [type="date"],
19
+ [type="datetime"],
20
+ [type="datetime-local"],
21
+ [type="month"],
22
+ [type="week"],
23
+ [type="email"],
24
+ [type="number"],
25
+ [type="search"],
26
+ [type="tel"],
27
+ [type="time"],
28
+ [type="url"],
29
+ select,
30
+ textarea {
31
+ @content;
32
+ }
33
33
  }
34
34
 
35
- // Style for generic input
35
+ // -------------------------------
36
+ // FORM INPUT
37
+ // - Base style for text input
38
+ // -------------------------------
36
39
  @mixin form-input($padding: $input-padding) {
37
- width: 100%;
38
- outline: none;
39
- padding: $input-padding;
40
- border: $input-border;
41
- border-top: $input-border-style darken($input-border-color, 5%);
42
-
43
- &:hover {
44
- border: $input-border-hover;
45
- @include box-shadow(inset 0 0 3px $input-border-color);
46
- }
47
-
48
- &:focus {
49
- border: $input-border-focus;
50
- @include box-shadow(inset 0 1px 2px rgba(black, 0.2));
51
- }
40
+ width: 100%;
41
+ outline: none;
42
+ padding: $input-padding;
43
+ border: $input-border;
44
+ border-top: $input-border-style darken($input-border-color, 5%);
45
+
46
+ &:hover {
47
+ border: $input-border-hover;
48
+ @include box-shadow(inset 0 0 3px $input-border-color);
49
+ }
50
+
51
+ &:focus {
52
+ border: $input-border-focus;
53
+ @include box-shadow(inset 0 1px 2px rgba(black, 0.2));
54
+ }
52
55
  }
53
56
 
54
- // Style for label
57
+ // ------------------------
58
+ // FORM LABEL
59
+ // - Base style for label
60
+ // ------------------------
55
61
  @mixin form-label($padding: $input-padding, $bg-color: $prefix-bg-color) {
56
- display: block;
57
- line-height: normal;
58
- padding-top: $padding;
59
- padding-bottom: $padding;
60
- border: $input-border-style transparent; // to make it vertically centered
61
-
62
- &.prefix,
63
- &.postfix {
64
- border: $input-border-style $bg-color;
65
- border-top: $input-border-style darken( $input-border-color, 5% );
66
- text-align: center;
67
- color: contrast-color($bg-color, #333, white, 60%);
68
- background: $bg-color;
69
- overflow: hidden;
70
- }
71
-
72
- &.prefix {
73
- border-right: none;
74
- }
75
-
76
- &.postfix {
77
- border-left: none;
78
- }
62
+ display: block;
63
+ line-height: normal;
64
+ padding-top: $padding;
65
+ padding-bottom: $padding;
66
+ border: $input-border-style transparent; // to make it vertically centered
67
+
68
+ &.prefix,
69
+ &.postfix {
70
+ border: $input-border-style $bg-color;
71
+ border-top: $input-border-style darken( $input-border-color, 5% );
72
+ text-align: center;
73
+ color: contrast-color($bg-color, #333, white, 60%);
74
+ background: $bg-color;
75
+ overflow: hidden;
76
+ }
77
+
78
+ &.prefix {
79
+ border-right: none;
80
+ }
81
+
82
+ &.postfix {
83
+ border-left: none;
84
+ }
79
85
  }
80
86
 
81
- // Disable unnecessary default styling from browser
82
- @mixin form-disable-default() {
83
- // Disable Chrome's datepicker
84
- input::-webkit-calendar-picker-indicator{
85
- display: none;
86
- }
87
-
88
- input[type="date"]::-webkit-input-placeholder{
89
- visibility: hidden !important;
90
- }
91
- }
92
-
93
- @if $include-form {
87
+ @if $include-form and not $external-call {
94
88
 
95
89
  /* ---------------
96
90
  EDGE Form
97
91
  --------------- */
98
92
 
99
93
  @include input {
100
- @include form-input();
94
+ @include form-input();
101
95
  }
102
96
 
103
97
  label {
104
- @include form-label();
98
+ @include form-label();
105
99
  }
106
100
 
107
- @include form-disable-default();
101
+ // Disable Chrome's datepicker
102
+ input::-webkit-calendar-picker-indicator{
103
+ display: none;
104
+ }
105
+
106
+ input[type="date"]::-webkit-input-placeholder{
107
+ visibility: hidden !important;
108
+ }
108
109
 
109
110
  } // $include-form
@@ -1,7 +1,7 @@
1
- // -----------------------------------------
2
- // GRID
3
- // Based on ZURB's Foundation 4
4
- // -----------------------------------------
1
+ // =============
2
+ // EDGE GRID
3
+ // =============
4
+ // Based on Foundation 4 by ZURB
5
5
 
6
6
  $row-max-width : 1140px !default;
7
7
  $total-columns : 12 !default;
@@ -14,7 +14,7 @@ $column-gutter : 20px !default;
14
14
 
15
15
  // ---------------------------------
16
16
  // GRID ROW
17
- // Create container for the grid
17
+ // - Create container for the grid
18
18
  // ---------------------------------
19
19
  @mixin grid-row(
20
20
  $nest : false,
@@ -86,6 +86,7 @@ $column-gutter : 20px !default;
86
86
 
87
87
  // ----------------------------------------------
88
88
  // Calculate size for column created externally
89
+ //-----------------------------------------------
89
90
  @mixin external-call-column(
90
91
  $column : 0,
91
92
  $total : 0,
@@ -110,6 +111,7 @@ $column-gutter : 20px !default;
110
111
 
111
112
  // ----------------------------------
112
113
  // Prevent duplicate in grid-column
114
+ // ----------------------------------
113
115
  @mixin source-ordering-column(
114
116
  $push : 0,
115
117
  $pull : 0,
@@ -127,6 +129,7 @@ $column-gutter : 20px !default;
127
129
 
128
130
  // --------------------------------------
129
131
  // Prevent duplicate in the base output
132
+ // --------------------------------------
130
133
  @mixin source-ordering-output() {
131
134
  @for $i from 1 through $total-columns - 1 {
132
135
  .large-offset-#{$i} {
@@ -143,7 +146,7 @@ $column-gutter : 20px !default;
143
146
 
144
147
  // ------------------------
145
148
  // GRID COLUMN
146
- // Create the grid
149
+ // - Create the grid
147
150
  // ------------------------
148
151
  @mixin grid-column(
149
152
  $large : 0,
@@ -229,7 +232,7 @@ $column-gutter : 20px !default;
229
232
  }
230
233
 
231
234
  // Create notes when on debug
232
- @if $debug {
235
+ @if $debug and $external-call {
233
236
  $notes: "large-#{$large}";
234
237
  @if $large-offset > 0 {
235
238
  $notes: $notes + " large-offset-#{$large-offset}";
@@ -255,15 +258,15 @@ $column-gutter : 20px !default;
255
258
  @if $center {
256
259
  $notes: $notes + " centered";
257
260
  }
258
- edge-column: $notes;
261
+ h-column: $notes;
259
262
  }
260
263
  }
261
264
 
262
- @if $include-grid {
265
+ @if $include-grid and not $external-call {
263
266
 
264
- /* ---------------
265
- EDGE Grid
266
- --------------- */
267
+ /* ------------
268
+ EDGE Grid
269
+ ------------ */
267
270
 
268
271
  // Normal row
269
272
  .row {