edge_framework 1.1.0 → 1.2.0
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.
- checksums.yaml +8 -8
- data/README.md +149 -93
- data/assets/kitchen-sink.html +23 -29
- data/assets/sass/edge.scss +1 -1
- data/assets/sass/edge/_base.scss +36 -47
- data/assets/sass/edge/_helpers.scss +1 -1
- data/assets/sass/edge/components/_animate.scss +1 -1
- data/assets/sass/edge/components/_button.scss +1 -1
- data/assets/sass/edge/components/_code.scss +1 -1
- data/assets/sass/edge/components/_form.scss +1 -1
- data/assets/sass/edge/components/_grid.scss +179 -181
- data/assets/sass/edge/components/_normalize.scss +2 -1
- data/assets/sass/edge/components/_print.scss +1 -1
- data/assets/sass/edge/components/_tile.scss +84 -79
- data/assets/sass/edge/components/_typography.scss +1 -1
- data/assets/sass/edge/components/_visibility.scss +1 -51
- data/assets/sass/kitchen-sink.scss +58 -58
- data/edge.gemspec +5 -5
- data/lib/edge/version.rb +1 -1
- metadata +18 -19
- data/assets/sass/edge/components/_grid_old.scss +0 -346
data/assets/kitchen-sink.html
CHANGED
@@ -294,7 +294,7 @@
|
|
294
294
|
</div>
|
295
295
|
</div> -->
|
296
296
|
|
297
|
-
<div class="row" data-page="code">
|
297
|
+
<!-- <div class="row" data-page="code">
|
298
298
|
<div class="large-12 columns">
|
299
299
|
<h1>EDGE Code</h1>
|
300
300
|
<h3>Markup</h3>
|
@@ -341,13 +341,13 @@
|
|
341
341
|
end
|
342
342
|
</code></pre>
|
343
343
|
</div>
|
344
|
-
</div>
|
344
|
+
</div> -->
|
345
345
|
|
346
346
|
<!-- <div class="row" data-page="tile">
|
347
347
|
<div class="large-12 columns">
|
348
348
|
<div class="demo-tile">
|
349
349
|
<h1>Tile</h1>
|
350
|
-
<ul class="
|
350
|
+
<ul class="tile-7 small-tile-5">
|
351
351
|
<li><p>1</p></li>
|
352
352
|
<li><p>1</p></li>
|
353
353
|
<li><p>1</p></li>
|
@@ -362,7 +362,7 @@
|
|
362
362
|
<li><p>1</p></li>
|
363
363
|
</ul>
|
364
364
|
<h2>Tile Collapse</h2>
|
365
|
-
<ul class="
|
365
|
+
<ul class="tile-5 small-tile-3 collapse">
|
366
366
|
<li><p>1</p></li>
|
367
367
|
<li><p>1</p></li>
|
368
368
|
<li><p>1</p></li>
|
@@ -432,7 +432,7 @@
|
|
432
432
|
</div>
|
433
433
|
</div> -->
|
434
434
|
|
435
|
-
|
435
|
+
<div class="row" data-page="grid">
|
436
436
|
<div class="large-12 columns">
|
437
437
|
<div class="demo-grid">
|
438
438
|
<h1>Grid</h1>
|
@@ -563,7 +563,7 @@
|
|
563
563
|
|
564
564
|
</div>
|
565
565
|
</div>
|
566
|
-
</div>
|
566
|
+
</div>
|
567
567
|
|
568
568
|
<!-- <section class="row" data-page="visibility">
|
569
569
|
<div class="large-12 column">
|
@@ -674,26 +674,6 @@
|
|
674
674
|
</div>
|
675
675
|
</section>
|
676
676
|
-->
|
677
|
-
<!-- <div class="row collapse demo-grid" data-page="grid">
|
678
|
-
<h1>Collapse not nested</h1>
|
679
|
-
<div class="large-8 column">
|
680
|
-
<p>8</p>
|
681
|
-
</div>
|
682
|
-
<div class="large-4 column">
|
683
|
-
<p>4</p>
|
684
|
-
</div>
|
685
|
-
</div> -->
|
686
|
-
|
687
|
-
<!--
|
688
|
-
<div class="row demo-grid" data-page="grid">
|
689
|
-
<h1>Not nested</h1>
|
690
|
-
<div class="large-8 column">
|
691
|
-
<p>8</p>
|
692
|
-
</div>
|
693
|
-
<div class="large-4 column">
|
694
|
-
<p>4</p>
|
695
|
-
</div>
|
696
|
-
</div> -->
|
697
677
|
|
698
678
|
<!-- <section class="row" data-page="custom-grid">
|
699
679
|
<div class="large-12 column">
|
@@ -816,6 +796,21 @@
|
|
816
796
|
</div>
|
817
797
|
</section> -->
|
818
798
|
|
799
|
+
<section class="row" data-page="design-grid">
|
800
|
+
<div class="large-12 column demo-grid">
|
801
|
+
<h1>Demo Design Custom Grid</h1>
|
802
|
+
<h3>325 (50) 175</h3>
|
803
|
+
<div class="dgrid-ar row">
|
804
|
+
<div class="dgrid-a1 column">
|
805
|
+
<p>325</p>
|
806
|
+
</div>
|
807
|
+
<div class="dgrid-a2 column">
|
808
|
+
<p>175</p>
|
809
|
+
</div>
|
810
|
+
</div>
|
811
|
+
</div>
|
812
|
+
</section>
|
813
|
+
|
819
814
|
<!-- <section class="row" data-page="button">
|
820
815
|
<div class="large-4 column">
|
821
816
|
<h1>Button</h1>
|
@@ -932,11 +927,10 @@
|
|
932
927
|
<footer id="footer">
|
933
928
|
</footer>
|
934
929
|
|
935
|
-
|
936
|
-
<script type="text/javascript" src="js/vendor/jquery.min.js"></script>
|
930
|
+
<!--
|
937
931
|
<script type="text/javascript" src="js/edge.js"></script>
|
938
932
|
<script type="text/javascript" src="js/edge/edge.prism.js"></script>
|
939
933
|
<script type="text/javascript" src="js/edge/edge.animate.js"></script>
|
940
|
-
|
934
|
+
-->
|
941
935
|
</body>
|
942
936
|
</html>
|
data/assets/sass/edge.scss
CHANGED
data/assets/sass/edge/_base.scss
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
// This module MUST be imported first before any other EDGE module
|
2
1
|
@charset "UTF-8";
|
3
2
|
@import "compass";
|
4
3
|
|
@@ -14,31 +13,25 @@ $experimental-support-for-microsoft : false;
|
|
14
13
|
$experimental-support-for-opera : false;
|
15
14
|
$experimental-support-for-khtml : false;
|
16
15
|
|
17
|
-
//
|
16
|
+
// ------------------
|
18
17
|
// OUTPUT CONFIG
|
19
|
-
//
|
20
|
-
// Responsive : add responsiveness to the output
|
21
|
-
//
|
22
|
-
// External call : Add extra feature if calling Component's mixin externally
|
23
|
-
// Include : if false - no CSS output
|
24
|
-
// -------------------------------------------------------
|
25
|
-
$debug : false !default;
|
18
|
+
// ------------------
|
26
19
|
$responsive : true !default;
|
20
|
+
$user-mode : false !default;
|
21
|
+
$is-in-media : false !default; // check if the code is within @media block
|
27
22
|
|
28
|
-
|
29
|
-
|
30
|
-
// Can't be overriden
|
23
|
+
// Must be true
|
31
24
|
$include-normalize : true !default;
|
32
25
|
$include-typography : true !default;
|
33
26
|
$include-grid : true !default;
|
34
27
|
$include-form : true !default;
|
35
28
|
|
36
|
-
// Default true
|
29
|
+
// Default is true
|
37
30
|
$include-tile : true !default;
|
38
31
|
$include-visibility : true !default;
|
39
32
|
$include-button : true !default;
|
40
33
|
|
41
|
-
// Default false
|
34
|
+
// Default is false
|
42
35
|
$include-animate : false !default;
|
43
36
|
$include-print : false !default;
|
44
37
|
$include-code : false !default;
|
@@ -47,18 +40,16 @@ $include-code : false !default;
|
|
47
40
|
// COLOR
|
48
41
|
// ----------
|
49
42
|
|
50
|
-
//
|
51
|
-
|
43
|
+
// Two main colors of your site
|
44
|
+
$main-color : #2a71e3 !default;
|
45
|
+
$sub-color : #d7d7d7 !default;
|
46
|
+
|
52
47
|
$passive-color : #d7d7d7 !default;
|
53
48
|
$blue-color : #2a71e3 !default;
|
54
49
|
$yellow-color : #fac741 !default;
|
55
50
|
$red-color : #d35400 !default;
|
56
51
|
$green-color : #229e61 !default;
|
57
52
|
|
58
|
-
// Two main colors of your site
|
59
|
-
$main-color : $blue-color !default;
|
60
|
-
$sub-color : $passive-color !default;
|
61
|
-
|
62
53
|
// ---------------
|
63
54
|
// GLOBAL VALUE
|
64
55
|
// ---------------
|
@@ -71,49 +62,43 @@ $g-transition : all .2s ease-out !default;
|
|
71
62
|
$body-font-size : 16px !default;
|
72
63
|
$body-line-height : 1.5 !default;
|
73
64
|
|
74
|
-
//
|
65
|
+
// --------------------------------
|
75
66
|
// PIXEL --> EM CONVERTER
|
76
|
-
//
|
77
|
-
//
|
67
|
+
// How to use:
|
68
|
+
// font-size: em(14px);
|
69
|
+
// padding: em(10px 5px 20px);
|
70
|
+
// --------------------------------
|
71
|
+
|
72
|
+
// Strips unit and return plain number
|
78
73
|
@function stripUnit($num) {
|
79
74
|
@return $num / ($num * 0 + 1);
|
80
75
|
}
|
81
76
|
|
82
77
|
// Convert the number to EM
|
83
78
|
@function convertToEm($value, $context: $body-font-size) {
|
84
|
-
//
|
79
|
+
// if not number, return it as is
|
85
80
|
@if type-of($value) != number { @return $value; }
|
86
81
|
|
87
82
|
$value: stripUnit($value) / stripUnit($context) * 1em;
|
88
|
-
//
|
83
|
+
// turn 0em into 0
|
89
84
|
@if ($value == 0em) {
|
90
85
|
$value: 0;
|
91
86
|
}
|
92
87
|
@return $value;
|
93
88
|
}
|
94
89
|
|
95
|
-
// EXAMPLE USAGE
|
96
|
-
// width : em(500px);
|
97
|
-
// padding : em(20px 30px 15px 10px);
|
98
|
-
// border : em(10px solid rgba(black, 0.3) );
|
99
90
|
@function em($values, $context: $body-font-size) {
|
100
|
-
//
|
101
|
-
@if $
|
102
|
-
@return $values;
|
91
|
+
// if only contain single number, convert it directly
|
92
|
+
@if type-of($values) == number {
|
93
|
+
@return convertToEm($values, $context);
|
103
94
|
}
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
}
|
110
|
-
|
111
|
-
$emValues : (); // This will eventually store the converted $values in a list
|
112
|
-
@each $val in $values {
|
113
|
-
$emValues: append($emValues, convertToEm($val, $context) );
|
114
|
-
}
|
115
|
-
@return join((), $emValues, space );
|
95
|
+
|
96
|
+
// if contains multiple values, loop through it
|
97
|
+
$emValues : ();
|
98
|
+
@each $val in $values {
|
99
|
+
$emValues: append($emValues, convertToEm($val, $context) );
|
116
100
|
}
|
101
|
+
@return join((), $emValues, space );
|
117
102
|
}
|
118
103
|
|
119
104
|
// -------------------
|
@@ -123,7 +108,7 @@ $body-line-height : 1.5 !default;
|
|
123
108
|
// @include below(500px)
|
124
109
|
// @include above(retina)
|
125
110
|
// @include between(small, medium)
|
126
|
-
|
111
|
+
//
|
127
112
|
// @media only screen and #{above(small)} and #{portrait}
|
128
113
|
// -------------------
|
129
114
|
$mini-screen : 480px !default;
|
@@ -132,11 +117,11 @@ $large-screen : 1440px !default;
|
|
132
117
|
$retina-screen : 192dpi !default;
|
133
118
|
|
134
119
|
@function translateSize($size) {
|
135
|
-
//
|
120
|
+
// if number, return it as it is
|
136
121
|
@if type-of($size) == number {
|
137
122
|
@return $size;
|
138
123
|
}
|
139
|
-
//
|
124
|
+
// if keyword, return the translated size
|
140
125
|
@else if $size == mini {
|
141
126
|
@return $mini-screen;
|
142
127
|
}
|
@@ -188,6 +173,7 @@ $retina-screen : 192dpi !default;
|
|
188
173
|
|
189
174
|
// Standalone mixin
|
190
175
|
@mixin below($named-size) {
|
176
|
+
$is-in-media: true;
|
191
177
|
$size: translateSize($named-size);
|
192
178
|
@if $named-size == retina {
|
193
179
|
@media only screen and (-webkit-max-device-pixel-ratio: 2), (max-resolution: $size) {
|
@@ -197,9 +183,11 @@ $retina-screen : 192dpi !default;
|
|
197
183
|
@else {
|
198
184
|
@media only screen and (max-width: $size) { @content; }
|
199
185
|
}
|
186
|
+
$is-in-media: false;
|
200
187
|
}
|
201
188
|
|
202
189
|
@mixin above($named-size) {
|
190
|
+
$is-in-media: true;
|
203
191
|
$size: translateSize($named-size) + 1px;
|
204
192
|
@if $named-size == retina {
|
205
193
|
@media only screen and (-webkit-min-device-pixel-ratio: 2), (min-resolution: $size) {
|
@@ -209,6 +197,7 @@ $retina-screen : 192dpi !default;
|
|
209
197
|
@else {
|
210
198
|
@media only screen and (min-width: $size) { @content; }
|
211
199
|
}
|
200
|
+
$is-in-media: false;
|
212
201
|
}
|
213
202
|
|
214
203
|
@mixin between($smaller-size, $larger-size) {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
// =============
|
2
2
|
// EDGE GRID
|
3
3
|
// =============
|
4
|
-
// Based on Foundation 4 by ZURB
|
5
4
|
|
6
5
|
$row-max-width : 1140px !default;
|
7
6
|
$total-columns : 12 !default;
|
@@ -20,17 +19,18 @@ $column-gutter : 20px !default;
|
|
20
19
|
}
|
21
20
|
|
22
21
|
// ---------------------------------
|
23
|
-
//
|
24
|
-
// -
|
22
|
+
// BASE ROW
|
23
|
+
// - Styling for base framework
|
25
24
|
// ---------------------------------
|
26
25
|
|
27
|
-
@mixin row(
|
28
|
-
$
|
29
|
-
$
|
30
|
-
$
|
31
|
-
$collapse : false,
|
32
|
-
$for-base : false ) {
|
26
|
+
@mixin base-row(
|
27
|
+
$nest : false,
|
28
|
+
$collapse : false,
|
29
|
+
$for-base : false) {
|
33
30
|
|
31
|
+
$width : $row-max-width;
|
32
|
+
$gutter : $column-gutter;
|
33
|
+
|
34
34
|
@if $for-base {
|
35
35
|
margin: 0 auto;
|
36
36
|
width: 100%;
|
@@ -41,16 +41,8 @@ $column-gutter : 20px !default;
|
|
41
41
|
}
|
42
42
|
@include clearfix;
|
43
43
|
}
|
44
|
-
|
45
|
-
// If gutter is passed as param, calculate it
|
46
|
-
@if $gutter != $column-gutter {
|
47
|
-
max-width: $width + $gutter;
|
48
44
|
|
49
|
-
|
50
|
-
min-width: $width + $gutter;
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
45
|
+
// Nested and collapsed
|
54
46
|
@if $nest and $collapse {
|
55
47
|
margin: 0;
|
56
48
|
padding-right: 0;
|
@@ -62,7 +54,7 @@ $column-gutter : 20px !default;
|
|
62
54
|
min-width: 0;
|
63
55
|
}
|
64
56
|
}
|
65
|
-
|
57
|
+
// Only nested
|
66
58
|
@else if $nest {
|
67
59
|
margin-right: -($gutter / 2);
|
68
60
|
margin-left: -($gutter / 2);
|
@@ -73,7 +65,7 @@ $column-gutter : 20px !default;
|
|
73
65
|
min-width: 0;
|
74
66
|
}
|
75
67
|
}
|
76
|
-
|
68
|
+
// Only collapsed
|
77
69
|
@else if $collapse {
|
78
70
|
margin: 0 auto;
|
79
71
|
width: 100%;
|
@@ -83,133 +75,79 @@ $column-gutter : 20px !default;
|
|
83
75
|
min-width: $width;
|
84
76
|
}
|
85
77
|
}
|
86
|
-
|
87
|
-
@if $external-call {
|
88
|
-
.row & {
|
89
|
-
margin-right: -($gutter / 2);
|
90
|
-
margin-left: -($gutter / 2);
|
91
|
-
}
|
92
|
-
}
|
93
78
|
}
|
94
79
|
|
95
|
-
//
|
96
|
-
//
|
97
|
-
|
98
|
-
|
99
|
-
$column : 0,
|
100
|
-
$total : 0,
|
101
|
-
$offset : 0,
|
102
|
-
$parent-offset : 0) {
|
103
|
-
|
104
|
-
@if $column > 0 {
|
105
|
-
width: gridCalc($column, $total);
|
106
|
-
} @else {
|
107
|
-
width: 100%;
|
108
|
-
}
|
80
|
+
// -----------------------------------
|
81
|
+
// ROW
|
82
|
+
// - Styling for external mixin call
|
83
|
+
// -----------------------------------
|
109
84
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
}
|
119
|
-
|
120
|
-
// ----------------------------------
|
121
|
-
// Prevent duplicate in column
|
122
|
-
// ----------------------------------
|
123
|
-
@mixin source-ordering-column(
|
124
|
-
$push : 0,
|
125
|
-
$pull : 0,
|
126
|
-
$total : 0) {
|
85
|
+
@mixin row(
|
86
|
+
$gutter : 0px,
|
87
|
+
$width : $row-max-width,
|
88
|
+
$collapse : false) {
|
89
|
+
|
90
|
+
// If gutter is passed as param, calculate it
|
91
|
+
@if $gutter != $column-gutter {
|
92
|
+
max-width: $width + $gutter;
|
127
93
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
}
|
132
|
-
@if $pull > 0 {
|
133
|
-
#{$default-opposite}: gridCalc($pull, $total);
|
134
|
-
#{$default-float}: auto;
|
94
|
+
@if not $responsive {
|
95
|
+
min-width: $width + $gutter;
|
96
|
+
}
|
135
97
|
}
|
136
|
-
}
|
137
98
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
@mixin source-ordering-output() {
|
142
|
-
@for $i from 1 through $total-columns - 1 {
|
143
|
-
.large-offset-#{$i} {
|
144
|
-
@include column($large-offset:$i);
|
145
|
-
}
|
146
|
-
.push#{-$i} {
|
147
|
-
@include column($push:$i);
|
148
|
-
}
|
149
|
-
.pull#{-$i} {
|
150
|
-
@include column($pull:$i);
|
151
|
-
}
|
99
|
+
@if $gutter > 0 {
|
100
|
+
margin-right: -($gutter / 2);
|
101
|
+
margin-left: -($gutter / 2);
|
152
102
|
}
|
153
103
|
}
|
154
104
|
|
155
|
-
//
|
156
|
-
//
|
157
|
-
// -
|
158
|
-
//
|
159
|
-
@mixin column(
|
160
|
-
$large : 0,
|
161
|
-
$small : 0, // For external call only, small size screen
|
162
|
-
$mini : 0, // For external call only, mini size screen
|
163
|
-
$large-offset : 0,
|
164
|
-
$small-offset : 0, // For external call only
|
165
|
-
$mini-offset : 0, // For external call only
|
166
|
-
$push : 0,
|
167
|
-
$pull : 0,
|
168
|
-
$collapse : false,
|
169
|
-
$centered : false,
|
170
|
-
$gutter : $column-gutter,
|
171
|
-
$total : $total-columns,
|
172
|
-
$for-base : false ) {
|
105
|
+
// ------------------------------
|
106
|
+
// BASE COLUMN
|
107
|
+
// - Styling for base framework
|
108
|
+
// ------------------------------
|
173
109
|
|
110
|
+
@mixin base-column(
|
111
|
+
$size : 0,
|
112
|
+
$offset : 0,
|
113
|
+
$push : 0,
|
114
|
+
$pull : 0,
|
115
|
+
$collapse : false,
|
116
|
+
$centered : false,
|
117
|
+
$gutter : 0px,
|
118
|
+
$total : $total-columns,
|
119
|
+
$for-base : false) {
|
120
|
+
|
174
121
|
@if $for-base {
|
175
122
|
position: relative;
|
176
123
|
float: $default-float;
|
177
|
-
padding-right: $gutter / 2;
|
178
|
-
padding-left: $gutter / 2;
|
179
|
-
}
|
180
|
-
|
181
|
-
// If gutter's value is different from default, it means it is passed as param
|
182
|
-
@if $gutter != $column-gutter {
|
183
|
-
padding-right: $gutter / 2;
|
184
|
-
padding-left: $gutter / 2;
|
124
|
+
padding-right: $column-gutter / 2;
|
125
|
+
padding-left: $column-gutter / 2;
|
185
126
|
}
|
186
127
|
|
187
|
-
//
|
128
|
+
// Collapsed, no gutter
|
188
129
|
@if $collapse {
|
189
130
|
padding-right: 0;
|
190
131
|
padding-left: 0;
|
191
132
|
}
|
192
133
|
|
193
|
-
//
|
194
|
-
@if $
|
195
|
-
margin-#{$default-float}: gridCalc($
|
134
|
+
// Offset, calculate margins
|
135
|
+
@if $offset > 0 {
|
136
|
+
margin-#{$default-float}: gridCalc($offset, $total);
|
196
137
|
}
|
197
|
-
|
198
|
-
//
|
199
|
-
@if $
|
200
|
-
width: gridCalc($
|
138
|
+
|
139
|
+
// Size, calculate width
|
140
|
+
@if $size > 0 {
|
141
|
+
width: gridCalc($size, $total);
|
201
142
|
}
|
202
143
|
|
203
|
-
//
|
204
|
-
@if $
|
205
|
-
|
206
|
-
|
207
|
-
}
|
208
|
-
} @else {
|
209
|
-
@include source-ordering-column($push:$push, $pull:$pull, $total:$total);
|
144
|
+
// Custom Gutter
|
145
|
+
@if $gutter > 0 {
|
146
|
+
padding-right: $gutter / 2;
|
147
|
+
padding-left: $gutter / 2;
|
210
148
|
}
|
211
|
-
|
212
|
-
//
|
149
|
+
|
150
|
+
// Centered, add centered margin
|
213
151
|
@if $centered {
|
214
152
|
display: block;
|
215
153
|
float: none;
|
@@ -217,60 +155,114 @@ $column-gutter : 20px !default;
|
|
217
155
|
margin-left: auto !important;
|
218
156
|
}
|
219
157
|
|
220
|
-
//
|
221
|
-
@if $
|
222
|
-
|
158
|
+
// Source Ordering
|
159
|
+
@if $push > 0 {
|
160
|
+
#{$default-float}: gridCalc($push, $total);
|
161
|
+
#{$default-opposite}: auto;
|
162
|
+
}
|
163
|
+
|
164
|
+
@if $pull > 0 {
|
165
|
+
#{$default-opposite}: gridCalc($pull, $total);
|
166
|
+
#{$default-float}: auto;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
// -----------------------------------
|
171
|
+
// COLUMN
|
172
|
+
// - Styling for external mixin call
|
173
|
+
// -----------------------------------
|
174
|
+
|
175
|
+
@mixin column(
|
176
|
+
$size : 0,
|
177
|
+
$small : 0,
|
178
|
+
$mini : 0,
|
179
|
+
$offset : 0,
|
180
|
+
$push : 0,
|
181
|
+
$pull : 0,
|
182
|
+
$collapse : false,
|
183
|
+
$centered : false,
|
184
|
+
$gutter : 0px,
|
185
|
+
$total : $total-columns) {
|
186
|
+
|
187
|
+
// Sizing
|
188
|
+
@if $size > 0 {
|
189
|
+
@include base-column($size:$size, $total:$total);
|
190
|
+
|
223
191
|
@if $small > 0 {
|
224
192
|
@include below(small) {
|
225
|
-
@include
|
226
|
-
}
|
227
|
-
|
228
|
-
@if $mini > 0 {
|
229
|
-
@include below(mini) {
|
230
|
-
@include external-call-column($column:$mini, $total:$total, $offset:$mini-offset, $parent-offset:$small-offset);
|
231
|
-
}
|
232
|
-
}
|
233
|
-
}
|
234
|
-
// If small is not passed, stack the column
|
235
|
-
@else {
|
236
|
-
@include below(small) {
|
237
|
-
@include external-call-column($column:$small, $total:$total, $offset:$small-offset, $parent-offset:$large-offset);
|
193
|
+
@include base-column($size:$small, $total:$total);
|
238
194
|
}
|
239
195
|
}
|
240
|
-
}
|
241
196
|
|
242
|
-
// Create notes when on debug
|
243
|
-
@if $debug and $external-call {
|
244
|
-
$notes: "large-#{$large}";
|
245
|
-
@if $large-offset > 0 {
|
246
|
-
$notes: $notes + " large-offset-#{$large-offset}";
|
247
|
-
}
|
248
|
-
@if $small > 0 {
|
249
|
-
$notes: $notes + " small-#{$small}";
|
250
|
-
}
|
251
|
-
@if $small-offset > 0 {
|
252
|
-
$notes: $notes + " small-offset-#{$small-offset}";
|
253
|
-
}
|
254
197
|
@if $mini > 0 {
|
255
|
-
|
198
|
+
@include below(mini) {
|
199
|
+
@include base-column($size:$mini, $total:$total);
|
200
|
+
}
|
256
201
|
}
|
257
|
-
|
258
|
-
|
202
|
+
}
|
203
|
+
|
204
|
+
// Collapse and Centered behavior is the same as base column
|
205
|
+
@include base-column(
|
206
|
+
$collapse: $collapse,
|
207
|
+
$centered: $centered,
|
208
|
+
$gutter: $gutter,
|
209
|
+
$total: $total
|
210
|
+
);
|
211
|
+
|
212
|
+
// Source Ordering, follow base column
|
213
|
+
@if $responsive and not $is-in-media {
|
214
|
+
// make Offset not inherited in small screen
|
215
|
+
@include above(small) {
|
216
|
+
@include base-column($offset:$offset, $pull:$pull, $push:$push, $total:$total);
|
259
217
|
}
|
260
|
-
|
261
|
-
|
218
|
+
} @else {
|
219
|
+
@include base-column($offset:$offset, $pull:$pull, $push:$push, $total:$total);
|
220
|
+
}
|
221
|
+
}
|
222
|
+
|
223
|
+
// ----------------------------------------------
|
224
|
+
// COLUMN PIXEL
|
225
|
+
// - Measured with pixel instead of grid portion
|
226
|
+
// ----------------------------------------------
|
227
|
+
|
228
|
+
@mixin column-px(
|
229
|
+
$size : 0px,
|
230
|
+
$width : 0px,
|
231
|
+
$gutter : $column-gutter,
|
232
|
+
$centered : false ) {
|
233
|
+
|
234
|
+
// Collapse and Centered behavior is the same as base column
|
235
|
+
@include base-column(
|
236
|
+
$centered: $centered
|
237
|
+
);
|
238
|
+
|
239
|
+
width: percentage(($size + $gutter) / ($width + $gutter) );
|
240
|
+
|
241
|
+
@if $gutter > 0 {
|
242
|
+
padding-right: $gutter / 2;
|
243
|
+
padding-left: $gutter / 2;
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
// ---------------------
|
248
|
+
// SOURCE ORDERING
|
249
|
+
// ---------------------
|
250
|
+
@mixin source-ordering() {
|
251
|
+
@for $i from 1 through $total-columns - 1 {
|
252
|
+
.large-offset-#{$i},
|
253
|
+
.offset-#{$i} {
|
254
|
+
@include base-column($offset:$i);
|
262
255
|
}
|
263
|
-
|
264
|
-
|
256
|
+
.push#{-$i} {
|
257
|
+
@include base-column($push:$i);
|
265
258
|
}
|
266
|
-
|
267
|
-
|
259
|
+
.pull#{-$i} {
|
260
|
+
@include base-column($pull:$i);
|
268
261
|
}
|
269
|
-
h-column: $notes;
|
270
262
|
}
|
271
263
|
}
|
272
264
|
|
273
|
-
@if $include-grid and not $
|
265
|
+
@if $include-grid and not $user-mode {
|
274
266
|
|
275
267
|
/* ------------
|
276
268
|
EDGE Grid
|
@@ -278,22 +270,22 @@ $column-gutter : 20px !default;
|
|
278
270
|
|
279
271
|
// Normal row
|
280
272
|
.row {
|
281
|
-
@include row($for-base:true);
|
273
|
+
@include base-row($for-base:true);
|
282
274
|
|
283
275
|
// Collapsed row
|
284
276
|
&.collapse {
|
285
|
-
@include row($collapse:true);
|
277
|
+
@include base-row($collapse:true);
|
286
278
|
.column,
|
287
279
|
.columns {
|
288
|
-
@include column($collapse:true);
|
280
|
+
@include base-column($collapse:true);
|
289
281
|
}
|
290
282
|
}
|
291
283
|
|
292
284
|
// Nested-collapsed row
|
293
285
|
.row {
|
294
|
-
@include row($nest:true);
|
286
|
+
@include base-row($nest:true);
|
295
287
|
&.collapse {
|
296
|
-
@include row($nest:true, $collapse:true);
|
288
|
+
@include base-row($nest:true, $collapse:true);
|
297
289
|
}
|
298
290
|
}
|
299
291
|
}
|
@@ -301,50 +293,56 @@ $column-gutter : 20px !default;
|
|
301
293
|
// Normal column
|
302
294
|
.column,
|
303
295
|
.columns {
|
304
|
-
@include column($
|
296
|
+
@include base-column($size:$total-columns, $for-base:true);
|
305
297
|
}
|
306
298
|
|
299
|
+
// Large sizing
|
307
300
|
@for $i from 1 through $total-columns {
|
308
|
-
.large#{-$i} { @include column($
|
301
|
+
.large#{-$i} { @include base-column($size:$i); }
|
309
302
|
}
|
310
303
|
|
311
304
|
// Centered column
|
312
305
|
.column.large-centered,
|
313
|
-
.columns.large-centered
|
314
|
-
|
306
|
+
.columns.large-centered,
|
307
|
+
.column.centered,
|
308
|
+
.columns.centered {
|
309
|
+
@include base-column($centered:true);
|
315
310
|
}
|
316
311
|
|
317
|
-
// Source Ordering
|
318
312
|
@if $responsive {
|
319
313
|
@include above(small) {
|
320
|
-
@include source-ordering
|
314
|
+
@include source-ordering();
|
321
315
|
}
|
322
|
-
} @else {
|
323
|
-
@include source-ordering-output();
|
324
316
|
}
|
317
|
+
// Remove media query so when the window scaled down, the styling isn't gone.
|
318
|
+
@else {
|
319
|
+
@include source-ordering();
|
320
|
+
}
|
321
|
+
|
325
322
|
|
323
|
+
// Small screen and below
|
326
324
|
@if $responsive {
|
327
|
-
|
325
|
+
|
328
326
|
@include below(small) {
|
329
327
|
.column,
|
330
328
|
.columns {
|
331
|
-
@include column($
|
329
|
+
@include base-column($size:$total-columns);
|
332
330
|
}
|
333
331
|
@for $i from 1 through $total-columns {
|
334
332
|
.small#{-$i} {
|
335
|
-
@include column($
|
333
|
+
@include base-column($size:$i);
|
336
334
|
}
|
337
335
|
}
|
338
336
|
|
339
337
|
@for $i from 0 through $total-columns - 2 {
|
340
338
|
.small-offset-#{$i} {
|
341
|
-
@include column($
|
339
|
+
@include base-column($offset:$i);
|
342
340
|
}
|
343
341
|
}
|
344
342
|
|
345
343
|
.column.small-centered,
|
346
344
|
.columns.small-centered {
|
347
|
-
@include column($centered:true);
|
345
|
+
@include base-column($centered:true);
|
348
346
|
}
|
349
347
|
}
|
350
348
|
|