edge_framework 0.6.1 → 0.8.1
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.
- data/Gemfile +1 -1
- data/Gemfile.lock +38 -0
- data/assets/sass/edge/_base.scss +224 -193
- data/assets/sass/edge/_components.scss +1 -1
- data/assets/sass/edge/_helpers.scss +2 -2
- data/assets/sass/edge/components/_code.scss +4 -4
- data/assets/sass/edge/components/_grid-old.scss +287 -0
- data/assets/sass/edge/components/_grid.scss +221 -241
- data/assets/sass/edge/components/_tile.scss +113 -0
- data/assets/sass/edge/components/_visibility.scss +2 -2
- data/assets/sass/edge/helpers/_sprites.scss +4 -3
- data/assets/sass/for-test.scss +152 -0
- data/assets/test.html +441 -63
- data/lib/edge/version.rb +2 -2
- data/template/base/assets/sass/_setting.scss +15 -16
- data/template/base/assets/sass/{edge-framework.scss → framework.scss} +0 -0
- data/template/base/config.rb +16 -0
- metadata +8 -4
- data/assets/sass/edge/components/_block-grid.scss +0 -112
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
edge_framework (0.6.1)
|
5
|
+
compass (>= 0.12.0)
|
6
|
+
sass (>= 3.2.0)
|
7
|
+
win32console
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
chunky_png (1.2.9)
|
13
|
+
compass (0.12.2)
|
14
|
+
chunky_png (~> 1.2)
|
15
|
+
fssm (>= 0.2.7)
|
16
|
+
sass (~> 3.1)
|
17
|
+
diff-lcs (1.2.4)
|
18
|
+
fssm (0.2.10)
|
19
|
+
rake (10.1.0)
|
20
|
+
rspec (2.14.1)
|
21
|
+
rspec-core (~> 2.14.0)
|
22
|
+
rspec-expectations (~> 2.14.0)
|
23
|
+
rspec-mocks (~> 2.14.0)
|
24
|
+
rspec-core (2.14.5)
|
25
|
+
rspec-expectations (2.14.2)
|
26
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
27
|
+
rspec-mocks (2.14.3)
|
28
|
+
sass (3.2.13)
|
29
|
+
win32console (1.3.2-x86-mingw32)
|
30
|
+
|
31
|
+
PLATFORMS
|
32
|
+
x86-mingw32
|
33
|
+
|
34
|
+
DEPENDENCIES
|
35
|
+
bundler (~> 1.3)
|
36
|
+
edge_framework!
|
37
|
+
rake
|
38
|
+
rspec
|
data/assets/sass/edge/_base.scss
CHANGED
@@ -17,34 +17,33 @@ $experimental-support-for-khtml : false;
|
|
17
17
|
// -------------------------------------------------------
|
18
18
|
// OUTPUT CONFIG
|
19
19
|
// DEBUG:
|
20
|
-
// Set to true for
|
20
|
+
// Set to true for useful functionality during
|
21
21
|
// development
|
22
|
+
// RESPONSIVE:
|
23
|
+
// Add responsiveness to the output
|
22
24
|
// EXTERNAL CALL:
|
23
25
|
// Add extra feature if calling Component's mixin exter-
|
24
26
|
// -nally
|
25
|
-
// RESPONSIVE:
|
26
|
-
// Add responsiveness to the GRID
|
27
27
|
// INCLUDE:
|
28
28
|
// Set to false if you want to import the mixins only
|
29
29
|
// -------------------------------------------------------
|
30
30
|
$debug : false !default;
|
31
|
+
$responsive : true !default;
|
31
32
|
|
32
33
|
$external-call : false !default; // user shouldn't modify this
|
33
34
|
|
34
|
-
$responsive : true !default;
|
35
|
-
|
36
35
|
$include-normalize : true !default;
|
37
36
|
$include-typography : true !default;
|
38
37
|
|
39
38
|
$include-grid : true !default;
|
40
|
-
$include-
|
39
|
+
$include-tile : true !default;
|
41
40
|
$include-visibility : true !default;
|
42
41
|
|
43
42
|
$include-button : true !default;
|
44
43
|
$include-form : true !default;
|
45
|
-
$include-print : true !default;
|
46
44
|
|
47
|
-
$include-
|
45
|
+
$include-print : false !default;
|
46
|
+
$include-code : false !default;
|
48
47
|
|
49
48
|
// ----------
|
50
49
|
// COLOR
|
@@ -78,20 +77,20 @@ $body-line-height : 1.5 !default;
|
|
78
77
|
// ------------------------
|
79
78
|
// It strips the unit of measure and returns it
|
80
79
|
@function stripUnit($num) {
|
81
|
-
|
80
|
+
@return $num / ($num * 0 + 1);
|
82
81
|
}
|
83
82
|
|
84
83
|
// Convert the number to EM
|
85
84
|
@function convertToEm($value, $context: $body-font-size) {
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
85
|
+
// If not number, return it as is
|
86
|
+
@if type-of($value) != number { @return $value; }
|
87
|
+
|
88
|
+
$value: stripUnit($value) / stripUnit($context) * 1em;
|
89
|
+
// Turn 0em into 0
|
90
|
+
@if ($value == 0em) {
|
91
|
+
$value: 0;
|
92
|
+
}
|
93
|
+
@return $value;
|
95
94
|
}
|
96
95
|
|
97
96
|
// EXAMPLE USAGE
|
@@ -99,141 +98,173 @@ $body-line-height : 1.5 !default;
|
|
99
98
|
// padding : em(20px 30px 15px 10px);
|
100
99
|
// border : em(10px solid rgba(black, 0.3) );
|
101
100
|
@function em($values, $context: $body-font-size) {
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
101
|
+
// If debug mode, return it plainly
|
102
|
+
@if $debug {
|
103
|
+
@return $values;
|
104
|
+
}
|
105
|
+
// Only convert to EM on non-debug mode
|
106
|
+
@else {
|
107
|
+
// If the value only contain single number, return it quickly without the overhead further below
|
108
|
+
@if type-of($values) == number {
|
109
|
+
@return convertToEm($values, $context);
|
110
|
+
}
|
111
|
+
|
112
|
+
$emValues : (); // This will eventually store the converted $values in a list
|
113
|
+
@each $val in $values {
|
114
|
+
$emValues: append($emValues, convertToEm($val, $context) );
|
115
|
+
}
|
116
|
+
@return join((), $emValues, space );
|
117
|
+
}
|
119
118
|
}
|
120
119
|
|
121
120
|
// -------------------
|
122
121
|
// MEDIA QUERIES
|
122
|
+
// How to use:
|
123
|
+
// @include below(small)
|
124
|
+
// @include below(500px)
|
125
|
+
// @include above(retina)
|
126
|
+
// @include between(small, medium)
|
127
|
+
|
128
|
+
// @media only screen and #{above(small)} and #{portrait}
|
123
129
|
// -------------------
|
124
|
-
$
|
125
|
-
$small-screen
|
126
|
-
$medium-screen : 1140px !default;
|
130
|
+
$mini-screen : 480px !default;
|
131
|
+
$small-screen : 768px !default;
|
127
132
|
$large-screen : 1440px !default;
|
128
133
|
$retina-screen : 192dpi !default;
|
129
134
|
|
130
|
-
@
|
131
|
-
|
135
|
+
@function translateSize($size-name) {
|
136
|
+
// If passed param is number, return it as it is
|
137
|
+
@if type-of($size-name) == number {
|
138
|
+
@return $size;
|
139
|
+
}
|
140
|
+
// Else, return the size as requested
|
141
|
+
@else if $size-name == mini {
|
142
|
+
@return $mini-screen;
|
143
|
+
}
|
144
|
+
@else if $size-name == small {
|
145
|
+
@return $small-screen;
|
146
|
+
}
|
147
|
+
@else if $size-name == large {
|
148
|
+
@return $large-screen;
|
149
|
+
}
|
150
|
+
@else if $size-name == retina {
|
151
|
+
@return $retina-screen;
|
152
|
+
}
|
132
153
|
}
|
133
154
|
|
134
|
-
|
135
|
-
|
155
|
+
// Function to be used in conjunction with @media
|
156
|
+
@function below($named-size) {
|
157
|
+
$size: translateSize($named-size);
|
158
|
+
@if $size == retina {
|
159
|
+
@return "(-webkit-max-device-pixel-ratio: 2), (max-resolution: #{$size})";
|
160
|
+
}
|
161
|
+
@else {
|
162
|
+
@return "(max-width: #{$size})";
|
163
|
+
}
|
136
164
|
}
|
137
165
|
|
138
|
-
@
|
139
|
-
|
140
|
-
|
141
|
-
|
166
|
+
@function above($named-size) {
|
167
|
+
$size: translateSize($named-size);
|
168
|
+
@if $named-size == retina {
|
169
|
+
@return "(-webkit-min-device-pixel-ratio: 2), (min-resolution: #{$size})";
|
170
|
+
}
|
171
|
+
@else {
|
172
|
+
@return "(min-width: #{$size})";
|
173
|
+
}
|
142
174
|
}
|
143
175
|
|
144
|
-
|
145
|
-
|
146
|
-
|
176
|
+
@function between($smaller-size, $larger-size) {
|
177
|
+
$smaller-size: translateSize($smaller-size);
|
178
|
+
$larger-size: translateSize($larger-size);
|
179
|
+
@return "(min-width: #{$smaller-size}) and (max-width: #{$larger-size})";
|
147
180
|
}
|
148
|
-
|
149
|
-
@
|
150
|
-
|
151
|
-
}
|
152
|
-
// 768px and up. If you're planning to support IE8, NEVER use medium-up
|
153
|
-
@mixin medium-up() {
|
154
|
-
@include above($small-screen + 1px) { @content; }
|
181
|
+
|
182
|
+
@function landscape() {
|
183
|
+
@return "(orientation: landscape)";
|
155
184
|
}
|
156
|
-
|
157
|
-
@
|
158
|
-
|
185
|
+
|
186
|
+
@function portrait() {
|
187
|
+
@return "(orientation: portrait)";
|
159
188
|
}
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
189
|
+
|
190
|
+
// Standalone mixin
|
191
|
+
@mixin below($named-size) {
|
192
|
+
$size: translateSize($named-size);
|
193
|
+
@if $named-size == retina {
|
194
|
+
@media only screen and (-webkit-max-device-pixel-ratio: 2), (max-resolution: $size) {
|
195
|
+
@content;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
@else {
|
199
|
+
@media only screen and (max-width: $size) { @content; }
|
200
|
+
}
|
168
201
|
}
|
169
|
-
|
170
|
-
@mixin
|
171
|
-
|
202
|
+
|
203
|
+
@mixin above($named-size) {
|
204
|
+
$size: translateSize($named-size);
|
205
|
+
@if $named-size == retina {
|
206
|
+
@media only screen and (-webkit-min-device-pixel-ratio: 2), (min-resolution: $size) {
|
207
|
+
@content;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
@else {
|
211
|
+
@media only screen and (min-width: $size) { @content; }
|
212
|
+
}
|
172
213
|
}
|
173
|
-
|
174
|
-
@mixin
|
175
|
-
|
214
|
+
|
215
|
+
@mixin between($smaller-size, $larger-size) {
|
216
|
+
$smaller-size: translateSize($smaller-size);
|
217
|
+
$larger-size: translateSize($larger-size);
|
218
|
+
@media only screen and (min-width: $smaller-size) and (max-width: $larger-size) {
|
219
|
+
@content;
|
220
|
+
}
|
176
221
|
}
|
177
222
|
|
178
223
|
// ----------------------------------------------
|
179
224
|
// CLEARING FLOAT
|
180
|
-
//
|
181
|
-
//
|
182
|
-
// If you prefer readable output, use the mixin
|
183
|
-
// If you prefer smaller output, use placeholder
|
225
|
+
// Make a container wraps floated element
|
184
226
|
// ----------------------------------------------
|
185
|
-
%clearfix {
|
186
|
-
zoom: 1;
|
187
|
-
&:before, &:after {
|
188
|
-
content : " ";
|
189
|
-
display : table;
|
190
|
-
}
|
191
|
-
&:after {
|
192
|
-
clear: both;
|
193
|
-
}
|
194
|
-
}
|
195
227
|
@mixin clearfix {
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
228
|
+
zoom: 1;
|
229
|
+
&:before, &:after {
|
230
|
+
content: " ";
|
231
|
+
display: table;
|
232
|
+
}
|
233
|
+
&:after {
|
234
|
+
clear: both;
|
235
|
+
}
|
204
236
|
}
|
205
237
|
|
206
|
-
|
207
238
|
// --------------------------------
|
208
239
|
// SELECTION
|
209
|
-
//
|
240
|
+
// Change the text highlight color
|
210
241
|
// --------------------------------
|
211
242
|
|
212
243
|
@mixin selection($background-color:lighten($main-color, 35%), $color:white) {
|
213
244
|
::-moz-selection {
|
214
|
-
background
|
215
|
-
text-shadow
|
216
|
-
color
|
245
|
+
background: $background-color;
|
246
|
+
text-shadow: none !important;
|
247
|
+
color: $color !important;
|
217
248
|
}
|
218
249
|
|
219
250
|
::selection {
|
220
|
-
background
|
221
|
-
text-shadow
|
222
|
-
color
|
251
|
+
background: $background-color;
|
252
|
+
text-shadow: none !important;
|
253
|
+
color: $color !important;
|
223
254
|
}
|
224
255
|
}
|
225
256
|
|
226
257
|
// ------------------------------------------------------
|
227
258
|
// DISABLE SELECTION
|
228
|
-
//
|
259
|
+
// Prevents user to select/highlight the element's text
|
229
260
|
// ------------------------------------------------------
|
230
261
|
@mixin disable-user-select {
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
262
|
+
-webkit-touch-callout: none;
|
263
|
+
-webkit-user-select: none;
|
264
|
+
-khtml-user-select: none;
|
265
|
+
-moz-user-select: none;
|
266
|
+
-ms-user-select: none;
|
267
|
+
user-select: none;
|
237
268
|
}
|
238
269
|
|
239
270
|
// ---------------------
|
@@ -244,91 +275,91 @@ $default-float : left !default;
|
|
244
275
|
$default-opposite : right !default;
|
245
276
|
// No need to change this conditional statement, $text-direction variable controls it all.
|
246
277
|
@if $text-direction == ltr {
|
247
|
-
|
248
|
-
|
278
|
+
$default-float : left;
|
279
|
+
$default-opposite : right;
|
249
280
|
} @else {
|
250
|
-
|
251
|
-
|
281
|
+
$default-float : right;
|
282
|
+
$default-opposite : left;
|
252
283
|
}
|
253
284
|
|
254
285
|
// ----------------------------------------------------------
|
255
286
|
// TRIANGLE
|
256
|
-
//
|
287
|
+
// Create a triangle
|
257
288
|
//
|
258
|
-
//
|
289
|
+
// Don't specify the `height` to create equalateral triangle
|
259
290
|
// ----------------------------------------------------------
|
260
291
|
@mixin triangle($width, $direction:top, $color:$main-color, $height:false) {
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
292
|
+
// If height is not specified, make the triangle equalateral
|
293
|
+
@if not $height {
|
294
|
+
// If normal triangle, `height` is set to half `width`
|
295
|
+
@if $direction == top or
|
296
|
+
$direction == right or
|
297
|
+
$direction == left or
|
298
|
+
$direction == bottom {
|
299
|
+
$height : ($width / 2) * 1.732;
|
300
|
+
}
|
301
|
+
// Else if cornered triangle, `heigth` is the same as `width`
|
302
|
+
@else if $direction == top-right or
|
303
|
+
$direction == top-left or
|
304
|
+
$direction == bottom-right or
|
305
|
+
$direction == bottom-left {
|
306
|
+
$height : $width;
|
307
|
+
}
|
308
|
+
}
|
309
|
+
width : 0;
|
310
|
+
height : 0;
|
311
|
+
font-size : 0;
|
312
|
+
line-height : 0%;
|
313
|
+
border-style : solid;
|
314
|
+
border-color : transparent;
|
315
|
+
// Top /\
|
316
|
+
@if $direction == top {
|
317
|
+
border-width : 0 $width/2 $height $width/2;
|
318
|
+
border-bottom-color : $color;
|
319
|
+
}
|
320
|
+
// Right |>
|
321
|
+
@else if $direction == right {
|
322
|
+
border-width : $width/2 0 $width/2 $height;
|
323
|
+
border-left-color : $color;
|
324
|
+
}
|
325
|
+
// Bottom \/
|
326
|
+
@else if $direction == bottom {
|
327
|
+
border-width : $height $width/2 0 $width/2;
|
328
|
+
border-top-color : $color;
|
329
|
+
}
|
330
|
+
// Left <|
|
331
|
+
@else if $direction == left {
|
332
|
+
border-width : $width/2 $height $width/2 0;
|
333
|
+
border-right-color : $color;
|
334
|
+
}
|
335
|
+
|
336
|
+
// __
|
337
|
+
// Top-right \ |
|
338
|
+
// \|
|
339
|
+
@else if $direction == top-right {
|
340
|
+
border-width : 0 $width $height 0;
|
341
|
+
border-right-color : $color;
|
342
|
+
}
|
343
|
+
|
344
|
+
// Bottom-right /|
|
345
|
+
// /_|
|
346
|
+
@else if $direction == bottom-right {
|
347
|
+
border-width : 0 0 $height $width;
|
348
|
+
border-bottom-color : $color;
|
349
|
+
}
|
350
|
+
// Bottom-left |\
|
351
|
+
// |_\
|
352
|
+
@else if $direction == bottom-left {
|
353
|
+
border-width : $height 0 0 $width;
|
354
|
+
border-left-color : $color;
|
355
|
+
}
|
356
|
+
// __
|
357
|
+
// Top-left | /
|
358
|
+
// |/
|
359
|
+
@else if $direction == top-left {
|
360
|
+
border-width : $height $width 0 0;
|
361
|
+
border-top-color : $color;
|
362
|
+
}
|
332
363
|
}
|
333
364
|
|
334
365
|
// ------------------------------------------------
|
@@ -336,12 +367,12 @@ $default-opposite : right !default;
|
|
336
367
|
// for property that is not supported by Compass
|
337
368
|
// ------------------------------------------------
|
338
369
|
@mixin css3($property, $value,
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
370
|
+
$moz : $experimental-support-for-mozilla,
|
371
|
+
$webkit : $experimental-support-for-webkit,
|
372
|
+
$o : $experimental-support-for-opera,
|
373
|
+
$ms : $experimental-support-for-microsoft,
|
374
|
+
$khtml : $experimental-support-for-khtml,
|
375
|
+
$official : true) {
|
345
376
|
|
346
377
|
@if $webkit { -webkit-#{$property}: $value; }
|
347
378
|
@if $khtml { -khtml-#{$property}: $value; }
|