zurb-foundation 2.2.1.2 → 3.0.3
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/.gitignore +17 -2
- data/Capfile +5 -0
- data/Gemfile +1 -1
- data/LICENSE +22 -0
- data/README.md +87 -0
- data/Rakefile +1 -0
- data/config/deploy.rb +42 -0
- data/foundation.gemspec +17 -21
- data/index.html +138 -0
- data/lib/foundation/engine.rb +2 -2
- data/lib/foundation/sass_script_functions.rb +29 -0
- data/lib/foundation/version.rb +1 -2
- data/lib/zurb-foundation.rb +6 -3
- data/stylesheets/_foundation.scss +14 -0
- data/stylesheets/foundation/_base.scss +6 -0
- data/stylesheets/foundation/_mixins.scss +46 -0
- data/stylesheets/foundation/_modular-scale.sass +332 -0
- data/stylesheets/foundation/_semantic-grid.scss +67 -0
- data/stylesheets/foundation/_settings.scss +71 -0
- data/stylesheets/foundation/app.scss +26 -0
- data/stylesheets/foundation/buttons.scss +175 -0
- data/stylesheets/foundation/forms.scss +130 -0
- data/stylesheets/foundation/globals.scss +34 -0
- data/stylesheets/foundation/grid.scss +132 -0
- data/stylesheets/foundation/ie.scss +16 -0
- data/stylesheets/foundation/mobile.scss +32 -0
- data/stylesheets/foundation/navbar.scss +107 -0
- data/stylesheets/foundation/offcanvas.scss +57 -0
- data/{vendor/assets/stylesheets/foundation/orbit.css.scss → stylesheets/foundation/orbit.scss} +68 -68
- data/stylesheets/foundation/reveal.scss +54 -0
- data/stylesheets/foundation/tabs.scss +89 -0
- data/stylesheets/foundation/typography.scss +83 -0
- data/stylesheets/foundation/ui.scss +352 -0
- data/templates/project/.gitignore +44 -0
- data/templates/project/MIT-LICENSE.txt +20 -0
- data/templates/project/humans.txt +8 -0
- data/templates/project/index.html +133 -0
- data/templates/project/manifest.rb +51 -0
- data/templates/project/robots.txt +4 -0
- data/templates/project/sass/_settings.scss +48 -0
- data/templates/project/sass/app.scss +20 -0
- data/templates/project/sass/ie.scss +4 -0
- data/templates/project/stylesheets/app.css +0 -0
- data/templates/project/stylesheets/ie.css +0 -0
- data/test.html +758 -0
- data/type.html +153 -0
- data/vendor/assets/images/foundation/orbit/left-arrow-small.png +0 -0
- data/vendor/assets/images/foundation/orbit/right-arrow-small.png +0 -0
- data/vendor/assets/images/foundation/orbit/right-arrow.png +0 -0
- data/vendor/assets/javascripts/foundation/app.js +92 -71
- data/vendor/assets/javascripts/foundation/index.js +8 -7
- data/vendor/assets/javascripts/foundation/jquery.customforms.js +74 -73
- data/vendor/assets/javascripts/foundation/jquery.min.js +4 -0
- data/vendor/assets/javascripts/foundation/jquery.offcanvas.js +50 -0
- data/vendor/assets/javascripts/foundation/jquery.orbit-1.4.0.js +103 -101
- data/vendor/assets/javascripts/foundation/jquery.placeholder.min.js +0 -1
- data/vendor/assets/javascripts/foundation/jquery.reveal.js +39 -15
- data/vendor/assets/javascripts/foundation/jquery.tooltips.js +96 -90
- data/vendor/assets/javascripts/foundation/modernizr.foundation.js +3 -4
- metadata +101 -46
- data/README.markdown +0 -163
- data/build.rb +0 -49
- data/lib/foundation/generators/USAGE +0 -15
- data/lib/foundation/generators/install_generator.rb +0 -27
- data/lib/foundation/generators/layout_generator.rb +0 -28
- data/lib/foundation/generators/templates/application.css +0 -5
- data/lib/foundation/generators/templates/application.html.erb +0 -31
- data/lib/foundation/generators/templates/application.html.haml +0 -30
- data/lib/foundation/generators/templates/application.html.slim +0 -30
- data/lib/foundation/generators/templates/application.js +0 -4
- data/vendor/assets/images/foundation/misc/button-gloss.png +0 -0
- data/vendor/assets/images/foundation/misc/button-overlay.png +0 -0
- data/vendor/assets/images/foundation/misc/custom-form-sprites.png +0 -0
- data/vendor/assets/images/foundation/misc/input-bg-outset.png +0 -0
- data/vendor/assets/images/foundation/misc/input-bg.png +0 -0
- data/vendor/assets/images/foundation/misc/modal-gloss.png +0 -0
- data/vendor/assets/images/foundation/misc/table-sorter.png +0 -0
- data/vendor/assets/stylesheets/foundation/forms.css.scss +0 -134
- data/vendor/assets/stylesheets/foundation/globals.css.scss +0 -139
- data/vendor/assets/stylesheets/foundation/grid.css.scss +0 -129
- data/vendor/assets/stylesheets/foundation/ie.css.scss +0 -13
- data/vendor/assets/stylesheets/foundation/index.css +0 -10
- data/vendor/assets/stylesheets/foundation/mobile.css.scss +0 -222
- data/vendor/assets/stylesheets/foundation/reveal.css.scss +0 -100
- data/vendor/assets/stylesheets/foundation/typography.css.scss +0 -63
- data/vendor/assets/stylesheets/foundation/ui.css.scss +0 -418
@@ -0,0 +1,46 @@
|
|
1
|
+
// Font size mixin to include px and rem
|
2
|
+
|
3
|
+
@mixin font-size($size, $is-important: false) {
|
4
|
+
@if $is-important {
|
5
|
+
font-size: $size + px !important;
|
6
|
+
font-size: ($size / 10) + rem !important;
|
7
|
+
} @else {
|
8
|
+
font-size: $size + px;
|
9
|
+
font-size: ($size / 10) + rem;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
// Grid Calculation for Percentages
|
14
|
+
|
15
|
+
@function gridCalc($colNumber, $totalColumns) {
|
16
|
+
@return percentage(($colNumber / $totalColumns));
|
17
|
+
}
|
18
|
+
|
19
|
+
// Default Font Stack
|
20
|
+
|
21
|
+
@mixin defaultFontFamily {
|
22
|
+
font-family: "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
23
|
+
}
|
24
|
+
|
25
|
+
// Create CSS Triangles in a Breeze
|
26
|
+
|
27
|
+
@mixin cssTriangle($triangleSize, $triangleColor, $triangleDirection) {
|
28
|
+
content: "";
|
29
|
+
display: block;
|
30
|
+
width: 0;
|
31
|
+
height: 0;
|
32
|
+
border: solid $triangleSize;
|
33
|
+
@if ($triangleDirection == top) {
|
34
|
+
border-color: $triangleColor transparent transparent transparent;
|
35
|
+
}
|
36
|
+
@if ($triangleDirection == bottom) {
|
37
|
+
border-color: transparent transparent $triangleColor transparent;
|
38
|
+
}
|
39
|
+
@if ($triangleDirection == left) {
|
40
|
+
border-color: transparent transparent transparent $triangleColor;
|
41
|
+
}
|
42
|
+
@if ($triangleDirection == right) {
|
43
|
+
border-color: transparent $triangleColor transparent transparent;
|
44
|
+
}
|
45
|
+
// .example { @include css-triangle(5px, #fff, bottom); }
|
46
|
+
}
|
@@ -0,0 +1,332 @@
|
|
1
|
+
// SASSY MODULAR-SCALE
|
2
|
+
// https://github.com/scottkellum/modular-scale
|
3
|
+
|
4
|
+
@charset "UTF-8"
|
5
|
+
|
6
|
+
// Ratios
|
7
|
+
$golden: 1.618
|
8
|
+
$gold: $golden
|
9
|
+
$double-octave: (4 / 1)
|
10
|
+
$major-twelfth: (3 / 1)
|
11
|
+
$major-eleventh: (8 / 3)
|
12
|
+
$major-tenth: (5 / 2)
|
13
|
+
$octave: (2 / 1)
|
14
|
+
$major-seventh: (15 / 8)
|
15
|
+
$minor-seventh: (16 / 9)
|
16
|
+
$major-sixth: (5 / 3)
|
17
|
+
$minor-sixth: (8 / 5)
|
18
|
+
$fifth: (3 / 2)
|
19
|
+
$augfourth: (1 / 1.4142135623730950488) // (1 / square root 2)
|
20
|
+
$fourth: (4 / 3)
|
21
|
+
$major-third: (5 / 4)
|
22
|
+
$minor-third: (6 / 5)
|
23
|
+
$major-second: (9 / 8)
|
24
|
+
$minor-second: (16 / 15)
|
25
|
+
|
26
|
+
// Defaults
|
27
|
+
// $ratio: $golden !default
|
28
|
+
// $base-size: 16px !default
|
29
|
+
$property: font-size !default
|
30
|
+
$class-slug: ms !default
|
31
|
+
|
32
|
+
// Modular Scale function
|
33
|
+
@function modular-scale($multiple, $base-size, $ratio)
|
34
|
+
// return the $base-size if $multiple is zero
|
35
|
+
@if $multiple == 0
|
36
|
+
@if type-of($base-size) == 'list'
|
37
|
+
$base-size: sort-list($base-size)
|
38
|
+
@return nth($base-size, 1)
|
39
|
+
// return just the simple $base-size value if it's not a list
|
40
|
+
@return $base-size
|
41
|
+
|
42
|
+
// if multiple base-sizes are passed in as a list
|
43
|
+
// and multiple ratios are passed in as a list
|
44
|
+
// calculate values in using each base-size / ratio combination
|
45
|
+
@if type-of($base-size) == 'list' and type-of($ratio) == 'list'
|
46
|
+
@if unit(ms-multibase-multiratio($multiple, $base-size, $ratio)) == 'px'
|
47
|
+
@return round(ms-multibase-multiratio($multiple, $base-size, $ratio))
|
48
|
+
@return ms-multibase-multiratio($multiple, $base-size, $ratio)
|
49
|
+
|
50
|
+
// if multiple base-sizes are passed in as a list
|
51
|
+
// calculate values in using each base-size
|
52
|
+
@if type-of($base-size) == 'list' and type-of($ratio) == 'number'
|
53
|
+
@if unit(ms-multibase($multiple, $base-size, $ratio)) == 'px'
|
54
|
+
@return round(ms-multibase($multiple, $base-size, $ratio))
|
55
|
+
@return ms-multibase($multiple, $base-size, $ratio)
|
56
|
+
|
57
|
+
// if multiple ratios are passed in as a list
|
58
|
+
// calculate values in using each ratio
|
59
|
+
@if type-of($base-size) == 'number' and type-of($ratio) == 'list'
|
60
|
+
@if unit(ms-multiratio($multiple, $base-size, $ratio)) == 'px'
|
61
|
+
@return round(ms-multiratio($multiple, $base-size, $ratio))
|
62
|
+
@return ms-multiratio($multiple, $base-size, $ratio)
|
63
|
+
|
64
|
+
// If there are no lists just run the simple function
|
65
|
+
@if unit(exponent($ratio, $multiple) * $base-size) == 'px'
|
66
|
+
@return round(exponent($ratio, $multiple) * $base-size)
|
67
|
+
@return exponent($ratio, $multiple) * $base-size
|
68
|
+
|
69
|
+
|
70
|
+
// calculate values in using each base-size / ratio combination
|
71
|
+
@function ms-multibase-multiratio($multiple, $base-size, $ratio)
|
72
|
+
// start with an empty list to place all values in
|
73
|
+
$scale-values: ()
|
74
|
+
// make sure base sizes are in ascending order
|
75
|
+
$base-size: sort-list($base-size)
|
76
|
+
// take each base-size in turn
|
77
|
+
$k: 1
|
78
|
+
@while $k <= length($base-size)
|
79
|
+
// add each $base-size to the list except the first
|
80
|
+
@if $k > 1
|
81
|
+
$scale-values: append($scale-values, nth($base-size, $k))
|
82
|
+
// take each ratio in turn
|
83
|
+
$j: 1
|
84
|
+
@while $j <= length($ratio)
|
85
|
+
// reset $modular-scale for each set
|
86
|
+
$modular-scale: nth($base-size, $k)
|
87
|
+
// do the scale for each base-size using this ratio
|
88
|
+
@if $multiple > 0
|
89
|
+
// up $multiple times
|
90
|
+
// and add the result to $scale-values
|
91
|
+
@for $i from 1 through $multiple
|
92
|
+
$modular-scale: exponent(nth($ratio, $j), $i) * nth($base-size, $k)
|
93
|
+
$scale-values: append($scale-values, $modular-scale)
|
94
|
+
// and down until the value is lower than the lowest $base-size
|
95
|
+
// and add the result to $scale-values
|
96
|
+
$i: -1
|
97
|
+
$modular-scale: nth($base-size, $k)
|
98
|
+
@while $modular-scale >= nth($base-size, 1)
|
99
|
+
$modular-scale: exponent(nth($ratio, $j), $i) * nth($base-size, $k)
|
100
|
+
$scale-values: append($scale-values, $modular-scale)
|
101
|
+
$i: $i - 1
|
102
|
+
@if $multiple < 0
|
103
|
+
// do the scale down for each set to below 1px
|
104
|
+
$i: -1
|
105
|
+
$modular-scale: nth($base-size, $k)
|
106
|
+
@while $modular-scale > 1
|
107
|
+
$modular-scale: exponent(nth($ratio, $j), $i) * nth($base-size, $k)
|
108
|
+
$scale-values: append($scale-values, $modular-scale)
|
109
|
+
$i: $i - 1
|
110
|
+
$j: $j + 1
|
111
|
+
$k: $k + 1
|
112
|
+
// return trimmed and sorted final list
|
113
|
+
@return trim-sort($multiple, $scale-values, $base-size)
|
114
|
+
|
115
|
+
|
116
|
+
// calculate values in using each base-size
|
117
|
+
@function ms-multibase($multiple, $base-size, $ratio)
|
118
|
+
// start with an empty list to place all values in
|
119
|
+
$scale-values: ()
|
120
|
+
// make sure base sizes are in ascending order
|
121
|
+
$base-size: sort-list($base-size)
|
122
|
+
// take each base-size in turn
|
123
|
+
$k: 1
|
124
|
+
@while $k <= length($base-size)
|
125
|
+
// add each $base-size to the list except the first
|
126
|
+
@if $k > 1
|
127
|
+
$scale-values: append($scale-values, nth($base-size, $k))
|
128
|
+
// reset $modular-scale for each set
|
129
|
+
$modular-scale: nth($base-size, $k)
|
130
|
+
// do the scale for each base-size using this ratio
|
131
|
+
@if $multiple > 0
|
132
|
+
// up $multiple times
|
133
|
+
// and add the result to $scale-values
|
134
|
+
@for $i from 1 through $multiple
|
135
|
+
$modular-scale: exponent($ratio, $i) * nth($base-size, $k)
|
136
|
+
$scale-values: append($scale-values, $modular-scale)
|
137
|
+
// and down until the value is lower than the lowest $base-size
|
138
|
+
// and add the result to $scale-values
|
139
|
+
$i: -1
|
140
|
+
$modular-scale: nth($base-size, $k)
|
141
|
+
@while $modular-scale >= nth($base-size, 1)
|
142
|
+
$modular-scale: exponent($ratio, $i) * nth($base-size, $k)
|
143
|
+
$scale-values: append($scale-values, $modular-scale)
|
144
|
+
$i: $i - 1
|
145
|
+
@if $multiple < 0
|
146
|
+
// do the scale down for each set to below 1px
|
147
|
+
$i: -1
|
148
|
+
$modular-scale: nth($base-size, $k)
|
149
|
+
@while $modular-scale > 1
|
150
|
+
$modular-scale: exponent($ratio, $i) * nth($base-size, $k)
|
151
|
+
$scale-values: append($scale-values, $modular-scale)
|
152
|
+
$i: $i - 1
|
153
|
+
$k: $k + 1
|
154
|
+
// return trimmed and sorted final list
|
155
|
+
@return trim-sort($multiple, $scale-values, $base-size)
|
156
|
+
|
157
|
+
|
158
|
+
// calculate values in using each ratio
|
159
|
+
@function ms-multiratio($multiple, $base-size, $ratio)
|
160
|
+
// start with an empty list to place all values in
|
161
|
+
$scale-values: ()
|
162
|
+
// If $multiple is a positive integer (up the scale)
|
163
|
+
@if $multiple > 0
|
164
|
+
// take each ratio in turn
|
165
|
+
$j: 1
|
166
|
+
@while $j <= length($ratio)
|
167
|
+
// reset $modular-scale for each set
|
168
|
+
$modular-scale: $base-size
|
169
|
+
// do the scale using this ratio thru the multiple, and add the result to $scale-values
|
170
|
+
@for $i from 1 through $multiple
|
171
|
+
$modular-scale: exponent(nth($ratio, $j), $i) * $base-size
|
172
|
+
$scale-values: append($scale-values, $modular-scale)
|
173
|
+
$j: $j + 1
|
174
|
+
// sort acsending
|
175
|
+
$scale-values: sort-list($scale-values)
|
176
|
+
// return the final value using the laced list
|
177
|
+
@return nth($scale-values, $multiple)
|
178
|
+
// If $multiple is a negative integer (down the scale)
|
179
|
+
@if $multiple < 0
|
180
|
+
// take each ratio in turn
|
181
|
+
$j: 1
|
182
|
+
@while $j <= length($ratio)
|
183
|
+
// reset $modular-scale for each set
|
184
|
+
$modular-scale: $base-size
|
185
|
+
// do the scale using this ratio thru the multiple, and add the result to $scale-values
|
186
|
+
@for $i from 1 through ($multiple * -1)
|
187
|
+
$modular-scale: exponent(nth($ratio, $j), -$i) * $base-size
|
188
|
+
$scale-values: append($scale-values, $modular-scale)
|
189
|
+
$j: $j + 1
|
190
|
+
// sort decending
|
191
|
+
$scale-values: sort-list($scale-values, 'dec')
|
192
|
+
// return the final value using the laced list
|
193
|
+
@return nth($scale-values, $multiple * -1)
|
194
|
+
|
195
|
+
|
196
|
+
// trim and sort the final list
|
197
|
+
@function trim-sort($multiple, $scale-values, $base-size)
|
198
|
+
@if $multiple > 0
|
199
|
+
// trim list so we can count from the lowest $base-size
|
200
|
+
$scale-values: trim-list($scale-values, nth($base-size, 1))
|
201
|
+
// sort acsending
|
202
|
+
$scale-values: sort-list($scale-values)
|
203
|
+
// return the final value using the laced list
|
204
|
+
@return nth($scale-values, $multiple)
|
205
|
+
@else
|
206
|
+
// trim list so we can count from the lowest $base-size
|
207
|
+
$scale-values: trim-list($scale-values, nth($base-size, 1), 'dec')
|
208
|
+
// sort acsending
|
209
|
+
$scale-values: sort-list($scale-values, 'dec')
|
210
|
+
// return the final value using the laced list
|
211
|
+
@return nth($scale-values, -$multiple)
|
212
|
+
|
213
|
+
|
214
|
+
/////////////////////////////////////////////////////////////////////////
|
215
|
+
|
216
|
+
// Shortcut
|
217
|
+
@function ms($multiple, $base-size, $ratio)
|
218
|
+
// Return the value from the Modular Scale function
|
219
|
+
@return modular-scale($multiple, $base-size, $ratio)
|
220
|
+
|
221
|
+
// Classes Mixin
|
222
|
+
=modular-scale-classes($multiple, $property, $class-slug, $base-size, $ratio)
|
223
|
+
|
224
|
+
// Loop from 0 through the value of $multiple and generate a range of classes
|
225
|
+
@for $i from 0 through $multiple
|
226
|
+
.#{$class-slug}-#{$i}
|
227
|
+
// Print the $property and return the value from the Modular Scale function
|
228
|
+
#{$property}: modular-scale($i, $base-size, $ratio)
|
229
|
+
|
230
|
+
=ms-classes($multiple, $property, $class-slug, $base-size, $ratio)
|
231
|
+
+modular-scale-classes($multiple, $property, $class-slug, $base-size, $ratio)
|
232
|
+
|
233
|
+
// Write Modular Scale List
|
234
|
+
@function modular-scale-list($start: 0, $finish: 20, $base-size: $base-size, $ratio: $ratio)
|
235
|
+
$ms-list: unquote("MS-LIST:")
|
236
|
+
@for $i from $start through $finish
|
237
|
+
$ms-list: append($ms-list, ms($i, $base-size, $ratio))
|
238
|
+
@return $ms-list
|
239
|
+
|
240
|
+
@function ms-list($start: 0, $finish: 20, $base-size: $base-size, $ratio: $ratio)
|
241
|
+
@return modular-scale-list($start, $finish, $base-size, $ratio)
|
242
|
+
|
243
|
+
=modular-scale-list($start: 0, $finish: 20, $base-size: $base-size, $ratio: $ratio)
|
244
|
+
@debug modular-scale-list($start, $finish, $base-size, $ratio)
|
245
|
+
|
246
|
+
=ms-list($start: 0, $finish: 20, $base-size: $base-size, $ratio: $ratio)
|
247
|
+
@debug modular-scale-list($start, $finish, $base-size, $ratio)
|
248
|
+
|
249
|
+
/////////////////////////////////////////////////////////////////////////
|
250
|
+
|
251
|
+
|
252
|
+
// Sass exponent support
|
253
|
+
@function exponent($base, $exponent)
|
254
|
+
// reset value
|
255
|
+
$value: $base
|
256
|
+
// positive intergers get multiplied
|
257
|
+
@if $exponent > 1
|
258
|
+
@for $i from 2 through $exponent
|
259
|
+
$value: $value * $base
|
260
|
+
// negitive intergers get divided. A number divided by itself is 1
|
261
|
+
@if $exponent < 1
|
262
|
+
@for $i from 0 through -$exponent
|
263
|
+
$value: $value / $base
|
264
|
+
// return the last value written
|
265
|
+
@return $value
|
266
|
+
|
267
|
+
|
268
|
+
// Sass list sorting support
|
269
|
+
@function sort-list($list, $dir: 'asc')
|
270
|
+
// built-in list sorting in Sass would make this go away.
|
271
|
+
// declare some empty lists to put our new order and temporary values
|
272
|
+
$new-order: ()
|
273
|
+
$temp: ()
|
274
|
+
// fill $temp with the contents of $list
|
275
|
+
$temp: join($temp, $list)
|
276
|
+
// if sorting ascending
|
277
|
+
@if $dir == 'asc'
|
278
|
+
// loop through all values in $list
|
279
|
+
@for $i from 1 through length($list)
|
280
|
+
// impossibly high starter value to compare
|
281
|
+
$low: 1000000
|
282
|
+
// check for lowest value in $temp
|
283
|
+
@for $j from 1 through length($temp)
|
284
|
+
@if nth($temp, $j) < $low
|
285
|
+
$low: nth($temp, $j)
|
286
|
+
// add lowest value to $new-order
|
287
|
+
$new-order: append($new-order, $low)
|
288
|
+
// empty $temp for the next comparison
|
289
|
+
$temp: ()
|
290
|
+
// re-populate $temp with remaining values to sort
|
291
|
+
@for $k from 1 through length($list)
|
292
|
+
@if nth($list, $k) > $low
|
293
|
+
$temp: append($temp, nth($list, $k))
|
294
|
+
@if $dir == 'dec'
|
295
|
+
// loop through all values in $list
|
296
|
+
@for $i from 1 through length($list)
|
297
|
+
// 0 starter value
|
298
|
+
$high: 0
|
299
|
+
// check for highest value in $temp
|
300
|
+
@for $j from 1 through length($temp)
|
301
|
+
@if nth($temp, $j) > $high
|
302
|
+
$high: nth($temp, $j)
|
303
|
+
$new-order: append($new-order, $high)
|
304
|
+
// empty $temp for the next comparison
|
305
|
+
$temp: ()
|
306
|
+
// re-populate $temp with remaining values to sort
|
307
|
+
@for $k from 1 through length($list)
|
308
|
+
@if nth($list, $k) < $high
|
309
|
+
$temp: append($temp, nth($list, $k))
|
310
|
+
@return $new-order
|
311
|
+
|
312
|
+
|
313
|
+
// Sass list trimming support
|
314
|
+
@function trim-list($list, $start, $dir: 'asc')
|
315
|
+
// built-in list trimming in Sass would make this go away.
|
316
|
+
// declare some empty lists to put our trimmed values
|
317
|
+
$trimmed: ()
|
318
|
+
// if sorting ascending
|
319
|
+
@if $dir == 'asc'
|
320
|
+
// loop through all values in $list
|
321
|
+
@for $i from 1 through length($list)
|
322
|
+
@if nth($list, $i) >= $start
|
323
|
+
$trimmed: append($trimmed, nth($list, $i))
|
324
|
+
@if $dir == 'dec'
|
325
|
+
// loop through all values in $list
|
326
|
+
@for $i from 1 through length($list)
|
327
|
+
@if nth($list, $i) <= $start
|
328
|
+
$trimmed: append($trimmed, nth($list, $i))
|
329
|
+
@return $trimmed
|
330
|
+
|
331
|
+
// Other libraries can easily query if this function is avalible
|
332
|
+
$modular-scale-loaded: true
|
@@ -0,0 +1,67 @@
|
|
1
|
+
// Inspired by https://github.com/twigkit/semantic.gs/blob/master/stylesheets/scss/grid.scss
|
2
|
+
|
3
|
+
// Mixin for Semantic Grid reponsiveness
|
4
|
+
|
5
|
+
@mixin respondTo($media) {
|
6
|
+
@if $media == smallScreen {
|
7
|
+
@media only screen and (max-width: $screenSmall - 1) { @content; }
|
8
|
+
} @else if $media == mediumScreen {
|
9
|
+
@media only screen and (max-width: $screenMedium) and (min-width: $screenSmall) { @content; }
|
10
|
+
} @else if $media == largeScreen {
|
11
|
+
@media only screen and (min-width: $screenXlarge) { @content; }
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
// The micro clearfix http://nicolasgallagher.com/micro-clearfix-hack/
|
16
|
+
|
17
|
+
@mixin clearfix() { *zoom:1;
|
18
|
+
&:before, &:after { content: ""; display: table; }
|
19
|
+
&:after { clear: both; }
|
20
|
+
}
|
21
|
+
@mixin mobileClearfix() {
|
22
|
+
@include respondTo(smallScreen) { &:before, &:after { content: ""; display: table; }
|
23
|
+
&:after { clear: both; }
|
24
|
+
&:last-child { float: none; }
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
// Outer row mixin for container rows
|
29
|
+
|
30
|
+
@mixin outerRow() { width: $rowWidth; max-width: 100%; min-width: $screenSmall; margin: 0 auto; @include clearfix(); @include respondTo(smallScreen) { width: auto; min-width: 0; margin-left: 0; margin-right: 0; } }
|
31
|
+
|
32
|
+
// Inner row mixin for nested rows, must be a child of an outer-row element. $behavior can be 'collapse' to get rid of margins
|
33
|
+
|
34
|
+
@mixin innerRow($behavior: false) {
|
35
|
+
@if $behavior == collapse { width: auto; max-width: none; min-width: 0; margin: 0; @include clearfix();
|
36
|
+
} @else { width: auto; max-width: none; min-width: 0; margin: 0 (-($columnGutter/2)); @include clearfix(); }
|
37
|
+
}
|
38
|
+
|
39
|
+
// Columns mixin, syntax is ($columns, $behavior). Behavior can be 'centered' which centers things or 'collapse' which collapses the gutters. ex @include row(4,[center | collapse])
|
40
|
+
|
41
|
+
@mixin column($columns:$columns, $behavior: false) {
|
42
|
+
@if $behavior == center { float: none; margin: 0 auto; position: relative; min-height: 1px; padding: 0 ($columnGutter/2); width: gridCalc($columns, $totalColumns); @include respondTo(smallScreen) { width: auto !important; float: none; } @include mobileClearfix();
|
43
|
+
} @else if $behavior == collapse { float: left; position: relative; min-height: 1px; padding: 0; width: gridCalc($columns, $totalColumns); @include respondTo(smallScreen) { width: auto !important; float: none; } @include mobileClearfix();
|
44
|
+
} @else { float: left; position: relative; min-height: 1px; padding: 0 ($columnGutter/2); width: gridCalc($columns, $totalColumns); @include respondTo(smallScreen) { width: auto !important; float: none; } @include mobileClearfix(); }
|
45
|
+
}
|
46
|
+
|
47
|
+
// Offset Mixin, include after a column mixin to manipulate its grid offset.
|
48
|
+
|
49
|
+
@mixin offsetBy($offset:1) { margin-left: gridCalc($offset, $totalColumns); }
|
50
|
+
|
51
|
+
// Push/Pull Mixins, include after a column mixin to manipulate stack ordering.
|
52
|
+
|
53
|
+
@mixin push($push:1) { left: gridCalc($push, $totalColumns); }
|
54
|
+
@mixin pull($push:1) { right: gridCalc($push, $totalColumns); }
|
55
|
+
|
56
|
+
// Mobile Row, synctax is @include mobile-row();
|
57
|
+
|
58
|
+
@mixin mobileRow() { @include respondTo(smallScreen) { width: auto; min-width: 0; margin-left: 0; margin-right: 0; @include clearfix(); } }
|
59
|
+
|
60
|
+
// Mobile Columns, syntax is @include mobile-column(#);
|
61
|
+
|
62
|
+
@mixin mobileColumn($columns:$columns) { @include respondTo(smallScreen) { width: gridCalc($columns, $mobileTotalColumns); float: left; padding: 0 ($columnGutter/2); } }
|
63
|
+
|
64
|
+
// Mobile Push/Pull Mixin
|
65
|
+
|
66
|
+
@mixin mobilePush($push:1) { @include respondTo(smallScreen) { left: gridCalc($push, $mobileTotalColumns); } }
|
67
|
+
@mixin mobilePull($push:1) { @include respondTo(smallScreen) { right: gridCalc($push, $mobileTotalColumns); } }
|