jekyll-theme-woforo 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +690 -0
  3. data/{LICENSE → LICENSE.txt} +5 -5
  4. data/README.md +128 -19
  5. data/_includes/analytics-providers/custom.html +3 -0
  6. data/_includes/analytics-providers/google-universal.html +9 -0
  7. data/_includes/analytics-providers/google.html +11 -0
  8. data/_includes/analytics.html +12 -0
  9. data/_includes/archive-single.html +38 -0
  10. data/_includes/author-profile-custom-links.html +7 -0
  11. data/_includes/author-profile.html +241 -0
  12. data/_includes/base_path +5 -0
  13. data/_includes/breadcrumbs.html +39 -0
  14. data/_includes/browser-upgrade.html +3 -0
  15. data/_includes/category-list.html +26 -0
  16. data/_includes/comment.html +22 -0
  17. data/_includes/comments-providers/custom.html +3 -0
  18. data/_includes/comments-providers/discourse.html +13 -0
  19. data/_includes/comments-providers/disqus.html +22 -0
  20. data/_includes/comments-providers/facebook.html +8 -0
  21. data/_includes/comments-providers/google-plus.html +2 -0
  22. data/_includes/comments-providers/scripts.html +18 -0
  23. data/_includes/comments-providers/staticman.html +42 -0
  24. data/_includes/comments.html +80 -0
  25. data/_includes/feature_row +50 -0
  26. data/_includes/figure +12 -0
  27. data/_includes/footer.html +22 -0
  28. data/_includes/footer/custom.html +3 -0
  29. data/_includes/gallery +47 -0
  30. data/_includes/group-by-array +47 -0
  31. data/_includes/head.html +19 -9
  32. data/_includes/head/custom.html +5 -0
  33. data/_includes/masthead.html +21 -0
  34. data/_includes/nav_list +47 -0
  35. data/_includes/page__hero.html +53 -0
  36. data/_includes/page__taxonomy.html +7 -0
  37. data/_includes/paginator.html +68 -0
  38. data/_includes/post_pagination.html +14 -0
  39. data/_includes/read-time.html +15 -0
  40. data/_includes/scripts.html +4 -0
  41. data/_includes/seo.html +145 -0
  42. data/_includes/sidebar.html +23 -0
  43. data/_includes/social-share.html +13 -0
  44. data/_includes/tag-list.html +26 -0
  45. data/_includes/toc +7 -0
  46. data/_layouts/archive-taxonomy.html +15 -0
  47. data/_layouts/archive.html +24 -0
  48. data/_layouts/compress.html +10 -0
  49. data/_layouts/default.html +25 -5
  50. data/_layouts/home.html +11 -0
  51. data/_layouts/single.html +74 -0
  52. data/_layouts/splash.html +20 -0
  53. data/_sass/_animations.scss +21 -0
  54. data/_sass/_archive.scss +238 -0
  55. data/_sass/_base.scss +315 -0
  56. data/_sass/_buttons.scss +153 -0
  57. data/_sass/_footer.scss +80 -0
  58. data/_sass/_forms.scss +391 -0
  59. data/_sass/_masthead.scss +53 -0
  60. data/_sass/_mixins.scss +53 -0
  61. data/_sass/_navigation.scss +544 -0
  62. data/_sass/_notices.scss +99 -0
  63. data/_sass/_page.scss +401 -0
  64. data/_sass/_print.scss +18 -0
  65. data/_sass/_reset.scss +187 -0
  66. data/_sass/_sidebar.scss +231 -0
  67. data/_sass/_syntax.scss +146 -0
  68. data/_sass/_tables.scss +38 -0
  69. data/_sass/_utilities.scss +470 -0
  70. data/_sass/_variables.scss +128 -0
  71. data/_sass/vendor/breakpoint/_breakpoint.scss +114 -0
  72. data/_sass/vendor/breakpoint/_context.scss +95 -0
  73. data/_sass/vendor/breakpoint/_helpers.scss +151 -0
  74. data/_sass/vendor/breakpoint/_legacy-settings.scss +50 -0
  75. data/_sass/vendor/breakpoint/_no-query.scss +15 -0
  76. data/_sass/vendor/breakpoint/_parsers.scss +215 -0
  77. data/_sass/vendor/breakpoint/_respond-to.scss +82 -0
  78. data/_sass/vendor/breakpoint/_settings.scss +71 -0
  79. data/_sass/vendor/breakpoint/parsers/_double.scss +33 -0
  80. data/_sass/vendor/breakpoint/parsers/_query.scss +82 -0
  81. data/_sass/vendor/breakpoint/parsers/_resolution.scss +31 -0
  82. data/_sass/vendor/breakpoint/parsers/_single.scss +26 -0
  83. data/_sass/vendor/breakpoint/parsers/_triple.scss +36 -0
  84. data/_sass/vendor/breakpoint/parsers/double/_default-pair.scss +21 -0
  85. data/_sass/vendor/breakpoint/parsers/double/_default.scss +22 -0
  86. data/_sass/vendor/breakpoint/parsers/double/_double-string.scss +22 -0
  87. data/_sass/vendor/breakpoint/parsers/resolution/_resolution.scss +60 -0
  88. data/_sass/vendor/breakpoint/parsers/single/_default.scss +13 -0
  89. data/_sass/vendor/breakpoint/parsers/triple/_default.scss +18 -0
  90. data/_sass/vendor/font-awesome/_animated.scss +34 -0
  91. data/_sass/vendor/font-awesome/_bordered-pulled.scss +25 -0
  92. data/_sass/vendor/font-awesome/_core.scss +12 -0
  93. data/_sass/vendor/font-awesome/_fixed-width.scss +6 -0
  94. data/_sass/vendor/font-awesome/_font-awesome.scss +18 -0
  95. data/_sass/vendor/font-awesome/_icons.scss +789 -0
  96. data/_sass/vendor/font-awesome/_larger.scss +13 -0
  97. data/_sass/vendor/font-awesome/_list.scss +19 -0
  98. data/_sass/vendor/font-awesome/_mixins.scss +60 -0
  99. data/_sass/vendor/font-awesome/_path.scss +15 -0
  100. data/_sass/vendor/font-awesome/_rotated-flipped.scss +20 -0
  101. data/_sass/vendor/font-awesome/_screen-reader.scss +5 -0
  102. data/_sass/vendor/font-awesome/_stacked.scss +20 -0
  103. data/_sass/vendor/font-awesome/_variables.scss +800 -0
  104. data/_sass/vendor/magnific-popup/_magnific-popup.scss +649 -0
  105. data/_sass/vendor/magnific-popup/_settings.scss +46 -0
  106. data/_sass/vendor/susy/_su.scss +4 -0
  107. data/_sass/vendor/susy/_susy.scss +4 -0
  108. data/_sass/vendor/susy/_susyone.scss +4 -0
  109. data/_sass/vendor/susy/susy/_su.scss +7 -0
  110. data/_sass/vendor/susy/susy/language/_susy.scss +24 -0
  111. data/_sass/vendor/susy/susy/language/_susyone.scss +13 -0
  112. data/_sass/vendor/susy/susy/language/susy/_background.scss +385 -0
  113. data/_sass/vendor/susy/susy/language/susy/_bleed.scss +200 -0
  114. data/_sass/vendor/susy/susy/language/susy/_box-sizing.scss +47 -0
  115. data/_sass/vendor/susy/susy/language/susy/_breakpoint-plugin.scss +185 -0
  116. data/_sass/vendor/susy/susy/language/susy/_container.scss +81 -0
  117. data/_sass/vendor/susy/susy/language/susy/_context.scss +36 -0
  118. data/_sass/vendor/susy/susy/language/susy/_gallery.scss +94 -0
  119. data/_sass/vendor/susy/susy/language/susy/_grids.scss +64 -0
  120. data/_sass/vendor/susy/susy/language/susy/_gutters.scss +154 -0
  121. data/_sass/vendor/susy/susy/language/susy/_isolate.scss +77 -0
  122. data/_sass/vendor/susy/susy/language/susy/_margins.scss +94 -0
  123. data/_sass/vendor/susy/susy/language/susy/_padding.scss +74 -0
  124. data/_sass/vendor/susy/susy/language/susy/_rows.scss +138 -0
  125. data/_sass/vendor/susy/susy/language/susy/_settings.scss +216 -0
  126. data/_sass/vendor/susy/susy/language/susy/_span.scss +163 -0
  127. data/_sass/vendor/susy/susy/language/susy/_validation.scss +16 -0
  128. data/_sass/vendor/susy/susy/language/susyone/_background.scss +18 -0
  129. data/_sass/vendor/susy/susy/language/susyone/_functions.scss +377 -0
  130. data/_sass/vendor/susy/susy/language/susyone/_grid.scss +312 -0
  131. data/_sass/vendor/susy/susy/language/susyone/_isolation.scss +51 -0
  132. data/_sass/vendor/susy/susy/language/susyone/_margin.scss +93 -0
  133. data/_sass/vendor/susy/susy/language/susyone/_media.scss +105 -0
  134. data/_sass/vendor/susy/susy/language/susyone/_padding.scss +92 -0
  135. data/_sass/vendor/susy/susy/language/susyone/_settings.scss +60 -0
  136. data/_sass/vendor/susy/susy/output/_float.scss +9 -0
  137. data/_sass/vendor/susy/susy/output/_shared.scss +15 -0
  138. data/_sass/vendor/susy/susy/output/_support.scss +9 -0
  139. data/_sass/vendor/susy/susy/output/float/_container.scss +16 -0
  140. data/_sass/vendor/susy/susy/output/float/_end.scss +40 -0
  141. data/_sass/vendor/susy/susy/output/float/_isolate.scss +22 -0
  142. data/_sass/vendor/susy/susy/output/float/_span.scss +35 -0
  143. data/_sass/vendor/susy/susy/output/shared/_background.scss +26 -0
  144. data/_sass/vendor/susy/susy/output/shared/_container.scss +21 -0
  145. data/_sass/vendor/susy/susy/output/shared/_direction.scss +42 -0
  146. data/_sass/vendor/susy/susy/output/shared/_inspect.scss +25 -0
  147. data/_sass/vendor/susy/susy/output/shared/_margins.scss +23 -0
  148. data/_sass/vendor/susy/susy/output/shared/_output.scss +14 -0
  149. data/_sass/vendor/susy/susy/output/shared/_padding.scss +23 -0
  150. data/_sass/vendor/susy/susy/output/support/_background.scss +58 -0
  151. data/_sass/vendor/susy/susy/output/support/_box-sizing.scss +19 -0
  152. data/_sass/vendor/susy/susy/output/support/_clearfix.scss +18 -0
  153. data/_sass/vendor/susy/susy/output/support/_prefix.scss +19 -0
  154. data/_sass/vendor/susy/susy/output/support/_rem.scss +22 -0
  155. data/_sass/vendor/susy/susy/output/support/_support.scss +85 -0
  156. data/_sass/vendor/susy/susy/su/_grid.scss +103 -0
  157. data/_sass/vendor/susy/susy/su/_settings.scss +73 -0
  158. data/_sass/vendor/susy/susy/su/_utilities.scss +111 -0
  159. data/_sass/vendor/susy/susy/su/_validation.scss +57 -0
  160. data/assets/css/main.scss +79 -0
  161. data/assets/fonts/FontAwesome.otf +0 -0
  162. data/assets/fonts/fontawesome-webfont.eot +0 -0
  163. data/assets/fonts/fontawesome-webfont.svg +2671 -0
  164. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  165. data/assets/fonts/fontawesome-webfont.woff +0 -0
  166. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  167. data/assets/js/_main.js +100 -0
  168. data/assets/js/main.min.js +5 -0
  169. data/assets/js/plugins/jquery.fitvids.js +82 -0
  170. data/assets/js/plugins/jquery.greedy-navigation.js +72 -0
  171. data/assets/js/plugins/jquery.magnific-popup.js +2049 -0
  172. data/assets/js/plugins/jquery.smooth-scroll.min.js +8 -0
  173. data/assets/js/plugins/stickyfill.min.js +8 -0
  174. data/assets/js/vendor/jquery/jquery-1.12.4.min.js +5 -0
  175. metadata +243 -16
  176. data/_includes/header.html +0 -0
  177. data/_layouts/page.html +0 -5
  178. data/_layouts/post.html +0 -9
  179. data/_sass/woforo.scss +0 -24
@@ -0,0 +1,16 @@
1
+ // Validation
2
+ // ==========
3
+
4
+
5
+ // Validate Column Math
6
+ // --------------------
7
+ @function valid-column-math(
8
+ $math,
9
+ $column-width
10
+ ) {
11
+ @if $math == static and not($column-width) {
12
+ @error 'Static math requires a valid column-width setting.';
13
+ }
14
+
15
+ @return $column-width;
16
+ }
@@ -0,0 +1,18 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Imports
3
+
4
+ @import "compass/layout/grid-background";
5
+ @import "compass/css3/background-origin";
6
+ @import "compass/css3/background-clip";
7
+
8
+ // ---------------------------------------------------------------------------
9
+ // Susy Grid Background
10
+ //
11
+ // A wrapper for the compass "column-grid-background" mixin
12
+ // Uses all your settings to create a grid background for a container element.
13
+ // Note: Sub-pixel rounding can lead to several pixels of variation between browsers.
14
+ @mixin susy-grid-background(){
15
+ @include column-grid-background($total-columns, column(), gutter(), 0);
16
+ @include background-origin(content-box);
17
+ @include background-clip(content-box);
18
+ }
@@ -0,0 +1,377 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Imports
3
+
4
+ // We need access to some basic font settings for handling media-queries.
5
+ @import "compass/typography/vertical_rhythm";
6
+
7
+ // For now, we also need this...
8
+ $browser-default-font-size-px : 16px;
9
+ $browser-default-font-size-percent : 100%;
10
+ $browser-default-font-size-pt : 12pt;
11
+
12
+ $rem-with-px-fallback : true !default;
13
+
14
+ // ---------------------------------------------------------------------------
15
+ // Sass list Functions
16
+
17
+ // Return a list with specific items removed
18
+ //
19
+ // filter($list, $target)
20
+ // - $list : The list to filter.
21
+ // - $target : An item to be removed from the list.
22
+ @function filter($list, $target) {
23
+ $clean: compact();
24
+ @if index($list, $target) {
25
+ @each $item in $list {
26
+ $clean: if($item == $target, $clean, append($clean, $item));
27
+ }
28
+ } @else { $clean: $list; }
29
+ @return $clean;
30
+ }
31
+
32
+ // ---------------------------------------------------------------------------
33
+ // Don't use static output when it will break things
34
+
35
+ // Switch element-level output to fluid, when container-width is wrong for static
36
+ //
37
+ // fix-static-misalignment([$style, $width])
38
+ // - $style: $container-style.
39
+ // - $width: $container-width.
40
+ @function fix-static-misalignment(
41
+ $style: $container-style,
42
+ $width: $container-width
43
+ ) {
44
+ @if $container-width and $container-width != container-outer-width($width: false) {
45
+ $style: fluid;
46
+ }
47
+ @return $style;
48
+ }
49
+
50
+ // ---------------------------------------------------------------------------
51
+ // Grid Functions
52
+
53
+ // Returns the full width of a grid based on your grid settings.
54
+ //
55
+ // $columns : The number of columns to get width for.
56
+ @function columns-width(
57
+ $columns : $total-columns
58
+ ) {
59
+ @if round($columns) != $columns {
60
+ @warn "Susy works best with integer column-spans." +
61
+ "For partial-columns, you may need to finesse the math by hand using functions directly.";
62
+ }
63
+ @return ($columns * $column-width) + (if($columns >= 1, ceil($columns - 1), 0) * $gutter-width);
64
+ }
65
+
66
+ // Return the grid width after adding or subtracting grid padding
67
+ //
68
+ // $width : the width of the grid without padding;
69
+ // $operation : ( add | subtract ) if padding should be added or subtracted;
70
+ @function handle-grid-padding(
71
+ $width,
72
+ $operation : subtract
73
+ ) {
74
+ $pad: $grid-padding*2;
75
+
76
+ @if comparable($width, $grid-padding) {
77
+ $width: if($operation == subtract, $width - $pad, $width + $pad);
78
+ } @else {
79
+ @warn "$grid-padding must be set in units comparable to the container width.";
80
+ }
81
+
82
+ @return $width;
83
+ }
84
+
85
+ // Return the full outer width of a Container element.
86
+ //
87
+ // $columns : The number of columns in the Grid Layout.
88
+ @function container-outer-width(
89
+ $columns : $total-columns,
90
+ $width : $container-width
91
+ ) {
92
+ $outerwidth: if($width, $width, columns-width($columns));
93
+
94
+ @if $width {
95
+ @if not($border-box-sizing) { $outerwidth: handle-grid-padding($outerwidth, subtract); }
96
+ } @else {
97
+ @if $border-box-sizing { $outerwidth: handle-grid-padding($outerwidth, add); }
98
+ }
99
+
100
+ @return $outerwidth;
101
+ }
102
+
103
+ // Return the percentage width of a single column in a given 'context'.
104
+ //
105
+ // $context : The grid context in columns, if nested.
106
+ // $style : The container style to use.
107
+ @function column(
108
+ $context : $total-columns,
109
+ $style : fix-static-misalignment()
110
+ ) {
111
+ @return if($style == static, $column-width, relative-width($column-width, $context));
112
+ }
113
+
114
+ // Return the percentage width of multiple 'columns' in a given 'context'.
115
+ //
116
+ // $columns : The number of columns to get relative width for.
117
+ // $context : The grid context in columns, if nested.
118
+ // $style : The container style to use.
119
+ @function columns(
120
+ $columns,
121
+ $context : $total-columns,
122
+ $style : fix-static-misalignment()
123
+ ) {
124
+ @return if($style == static, columns-width($columns), relative-width(columns-width($columns), $context));
125
+ }
126
+
127
+ // Return the percentage width of a single gutter in a given 'context'.
128
+ //
129
+ // $context : The grid context in columns, if nested.
130
+ // $style : The container style to use.
131
+ @function gutter(
132
+ $context : $total-columns,
133
+ $style : fix-static-misalignment()
134
+ ) {
135
+ @return if($style == static, $gutter-width, relative-width($gutter-width, $context));
136
+ }
137
+
138
+ // Return the percentage width of a given value in a given 'context'.
139
+ //
140
+ // $width : Any given width value.
141
+ // $context : The grid context in columns, if nested.
142
+ @function relative-width(
143
+ $width,
144
+ $context : $total-columns
145
+ ) {
146
+ @return percentage($width / columns-width($context));
147
+ }
148
+
149
+ // Return the total space occupied by multiple columns and associated gutters.
150
+ // Useful for adding padding or margins (prefix, suffix, push, pull, etc.)
151
+ //
152
+ // $columns : The number of columns to get relative space for.
153
+ // $context : The grid context in columns, if nested.
154
+ // $style : The container style to use.
155
+ @function space(
156
+ $columns,
157
+ $context : $total-columns,
158
+ $style : fix-static-misalignment()
159
+ ) {
160
+ @return columns($columns, $context, $style) + if($columns >= 1, gutter($context, $style), 0);
161
+ }
162
+
163
+ // Accept a list including column-count and (optional) position.
164
+ // Return either the column count or the position alone.
165
+ //
166
+ // $columns : the list to split and interprate.
167
+ // $request : The value to return, either 'columns' or 'position'.
168
+ @function split-columns-value(
169
+ $columns,
170
+ $request : columns
171
+ ) {
172
+ $pos : false;
173
+ $cols : false;
174
+
175
+ @each $var in $columns {
176
+ @if (type-of($var) == 'string') {
177
+ $pos: $var;
178
+ } @else {
179
+ @if (type-of($var) == 'number') and (unitless($var)) {
180
+ $cols: $var;
181
+ } @else {
182
+ @warn '"#{$var}" is not a valid part of "$columns: #{$columns}" in the columns() mixin.';
183
+ }
184
+ }
185
+ }
186
+
187
+ @if $request == 'columns' {
188
+ @return $cols;
189
+ } @else {
190
+ @if $request == 'position' {
191
+ @return $pos;
192
+ } @else {
193
+ @warn '"#{$request}" is not a valid value for $request';
194
+ }
195
+ }
196
+ }
197
+
198
+ // Accept nth-selector variables, and format them as a valid CSS3 selector.
199
+ //
200
+ // $n : [first | only | last | <equation>]
201
+ // $selector : [child | last-child | of-type | last-of-type ]
202
+ @function format-nth(
203
+ $n : last,
204
+ $selector : child
205
+ ) {
206
+ @if ($n == 'last') or ($n =='first') or ($n =='only') {
207
+ $selector: '#{$n}-#{$selector}';
208
+ } @else {
209
+ $selector: 'nth-#{$selector}(#{$n})';
210
+ }
211
+ @return $selector;
212
+ }
213
+
214
+ // ---------------------------------------------------------------------------
215
+ // Media Functions
216
+
217
+ // Return an em value adjusted to match the browser default font size.
218
+ // Note: This only works if actual sizes are set relative to browser defaults.
219
+ //
220
+ // $ems : The initial value to be converted.
221
+ // $font-size : The current font-size in.
222
+ @function base-ems(
223
+ $ems,
224
+ $font-size: $base-font-size
225
+ ){
226
+ $font-size : if(unit($ems) == 'rem', $base-font-size, $font-size);
227
+ $unit : unit($font-size);
228
+ $mult : $ems / ($ems * 0 + 1);
229
+
230
+ @if $unit == 'px' {
231
+ @return $font-size / $browser-default-font-size-px * $mult * 1em;
232
+ }
233
+ @else if $unit == '%' {
234
+ @return $font-size / $browser-default-font-size-percent * $mult * 1em;
235
+ }
236
+ @else if $unit == 'em' {
237
+ @return $font-size / 1em * $mult * 1em;
238
+ }
239
+ @else if $unit == 'pt' {
240
+ @return $font-size / $browser-default-font-size-pt * $mult * 1em;
241
+ }
242
+ @else {
243
+ @warn 'Variable $base-font-size does not have a valid font unit. Valid units for fonts in CSS are px, pt, em, and %.';
244
+ }
245
+ }
246
+
247
+ // This name will be deprecated...
248
+ @function absolute-ems(
249
+ $ems,
250
+ $font-size: $base-font-size
251
+ ){
252
+ @return base-ems( $ems, $font-size);
253
+ }
254
+
255
+ // Return a length, after any em-values have been sent through absolute-ems().
256
+ //
257
+ // $length : The length value to be checked and adjusted if necessary.
258
+ // $font-size : The current font-size in px.
259
+ @function fix-ems(
260
+ $length,
261
+ $font-size: $base-font-size
262
+ ){
263
+ @if $length {
264
+ @if (unit($length) == 'em') or (unit($length) == 'rem') {
265
+ $length: absolute-ems($length,$font-size);
266
+ }
267
+ }
268
+ @return $length;
269
+ }
270
+
271
+ // Sort a list of arguments into "$min $layout $max $ie" order, and return the list.
272
+ //
273
+ // $media-layout : a list of values [$min $layout $max $ie] including...
274
+ // : - one unitless number (columns in a layout)
275
+ // : - two optional lengths (min and max-width media-query breakpoints).
276
+ // : - one optional boolean or string to trigger fallback support for IE.
277
+ // $font-size : [optional] The base font-size of your layout, if you are using ems.
278
+ // : - defaults to $base-font-size
279
+ @function medialayout(
280
+ $media-layout,
281
+ $font-size: $base-font-size
282
+ ) {
283
+ $media : false;
284
+ $min : false;
285
+ $layout : false;
286
+ $max : false;
287
+ $ie : false;
288
+ $has-layout : false;
289
+
290
+ @each $val in $media-layout {
291
+ @if (type-of($val) == "number") {
292
+ @if unitless($val) {
293
+ $layout : $val;
294
+ $has-layout : true;
295
+ } @else {
296
+ @if ($has-layout) and not($media) {
297
+ $max: $val;
298
+ } @else {
299
+ @if $media {
300
+ $media: join($media,$val);
301
+ } @else {
302
+ $media: $val;
303
+ }
304
+ }
305
+ }
306
+ } @else {
307
+ $ie: $val;
308
+ }
309
+ }
310
+ @if (length($media) > 0) {
311
+ @if (length($media) == 1) {
312
+ $min: nth($media,1);
313
+ } @else {
314
+ $min: nth($media,1);
315
+ $max: nth($media,2);
316
+ @if comparable($min, $max) {
317
+ @if ($min > $max) {
318
+ $max: nth($media,1);
319
+ $min: nth($media,2);
320
+ }
321
+ } @else {
322
+ @warn "Can't compare incompatible units." +
323
+ "Using #{$min} for min-width, and #{$max} for max-width";
324
+ }
325
+ @if (length($media) > 2) {
326
+ @warn "You can only send two lengths: a min-width and an (optional) max-width." +
327
+ "You sent #{length($media)}: #{$media}";
328
+ }
329
+ }
330
+ }
331
+
332
+ // media-queries must be set in ems relative to the browser default
333
+ // rather than the font-size set in CSS.
334
+ $min: fix-ems($min,$font-size);
335
+ $max: fix-ems($max,$font-size);
336
+
337
+ @return $min $layout $max $ie;
338
+ }
339
+
340
+ // Return the nearest layout (column-count) above a given breakpoint.
341
+ //
342
+ // $min : The min-width media-query breakpoint above which to establish a new layout.
343
+ @function get-layout(
344
+ $min
345
+ ) {
346
+ $min : fix-ems($min);
347
+ $return : false;
348
+
349
+ @if comparable($min, $column-width) {
350
+ $return : ceil(($min + $gutter-width) / ($column-width + $gutter-width));
351
+ } @else {
352
+ @warn "Can't determine a layout, becuse #{$min} and #{$column-width} are not comparable.";
353
+ }
354
+
355
+ @return $return;
356
+ }
357
+
358
+ // Check to see if a given $media-layout list is simply the default.
359
+ //
360
+ // $media-layout : a list of values including -
361
+ // : One unitless number (columns in a layout)
362
+ // : Two optional lengths (min and max-width media-query breakpoints).
363
+ // : One optional boolean or string to trigger fallback support for IE.
364
+ @function is-default-layout(
365
+ $media-layout
366
+ ) {
367
+ $media-layout : medialayout($media-layout);
368
+ $min : nth($media-layout,1);
369
+ $layout-cols : nth($media-layout,2);
370
+ $max : nth($media-layout,3);
371
+
372
+ @if $min or $max {
373
+ @return false;
374
+ } @else {
375
+ @return if($layout-cols == $total-columns,true,false);
376
+ }
377
+ }
@@ -0,0 +1,312 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Imports
3
+
4
+ @import "compass/utilities/general/clearfix";
5
+ @import "compass/css3/box-sizing";
6
+
7
+ // ---------------------------------------------------------------------------
8
+ // Border-Box Sizing
9
+
10
+ // Apply the border-box sizing model to all elements
11
+ // and adjust the grid math appropriately.
12
+ @mixin border-box-sizing {
13
+ $border-box-sizing: true !global;
14
+ * { @include box-sizing(border-box); }
15
+ }
16
+
17
+ // ---------------------------------------------------------------------------
18
+ // Container
19
+
20
+ // Set the width of a container
21
+ //
22
+ // $columns : The number of columns in the Grid Layout.
23
+ @mixin set-container-width(
24
+ $columns : $total-columns,
25
+ $style : $container-style,
26
+ $px-vals : $pixel-values-only
27
+ ){
28
+ $width: container-outer-width($columns);
29
+
30
+ @if $style == 'static' {
31
+ @if $px-vals == true {
32
+ width: round(convert-length($width, px));
33
+ } @else {
34
+ @include rem(width, $width);
35
+ }
36
+ } @else {
37
+ @if $style == 'fluid' {
38
+ @if unit($width) == '%' {
39
+ @if $px-vals == true {
40
+ width: round(convert-length($width, px));
41
+ } @else {
42
+ @include rem(width, $width);
43
+ }
44
+ }
45
+ } @else {
46
+ @if $px-vals == true {
47
+ max-width: round(convert-length($width, px));
48
+ } @else {
49
+ @include rem(max-width, $width);
50
+ }
51
+
52
+ @include for-legacy-browser(ie,"6") {
53
+ @if unit($width) == 'rem' {
54
+ _width: round(convert-length($width, px));
55
+ } @else {
56
+ _width: $width;
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+
63
+ // Set the outer grid-containing element(s).
64
+ //
65
+ // $columns : The number of columns in the container.
66
+ @mixin apply-container(
67
+ $columns : $total-columns,
68
+ $px-vals : $pixel-values-only
69
+ ){
70
+ @include pie-clearfix;
71
+ @include set-container-width($columns);
72
+ @if $px-vals == true {
73
+ padding-left: round(convert-length($grid-padding, px));
74
+ padding-right: round(convert-length($grid-padding, px));
75
+ } @else {
76
+ @include rem(padding-left, $grid-padding);
77
+ @include rem(padding-right, $grid-padding);
78
+ }
79
+ margin: { left: auto; right: auto; }
80
+ }
81
+
82
+ // Set one or more layouts on a grid-containing element at any number of media-query breakpoints.
83
+ //
84
+ // $media-layout-1 : [default:$total-columns] A list of values including -
85
+ // : One unitless number (representing columns in a layout)
86
+ // : Two optional lengths (representing min and max-width media-query breakpoints).
87
+ // $media-layout-2 ...-10 : [optional] Same as $media-layout-1
88
+ @mixin container(
89
+ $media-layouts...
90
+ ){
91
+ $media-layouts: if(length($media-layouts) > 0, $media-layouts, $total-columns);
92
+
93
+ @each $ml in $media-layouts {
94
+ @if is-default-layout($ml) {
95
+ @include apply-container;
96
+ } @else {
97
+ @include at-breakpoint($ml) {
98
+ @include apply-container;
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
+ // ---------------------------------------------------------------------------
105
+ // Columns
106
+
107
+ // Create a grid element spanning any number of 'columns' in a grid 'context'.
108
+ // $columns : The number of columns to span.
109
+ // $context : [optional] The context (columns spanned by parent).
110
+ // : Context is required on any nested elements.
111
+ // : Context MUST NOT be declared on a root element.
112
+ // $padding : [optional] Padding applied to the inside of individual grid columns.
113
+ // : Padding is only output if one or two values are specified (e.g. 1em or 10px 20px)
114
+ // : Padding values are applied only on the horizontal axis in from-to order
115
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
116
+ // $style : The container style to use.
117
+ @mixin span-columns(
118
+ $columns,
119
+ $context : $total-columns,
120
+ $padding : false,
121
+ $from : $from-direction,
122
+ $style : fix-static-misalignment()
123
+ ) {
124
+ $from : unquote($from);
125
+ $to : opposite-position($from);
126
+ $pos : split-columns-value($columns,position);
127
+ $cols : split-columns-value($columns,columns);
128
+ $pad-from : if($style == static, 0 * $gutter-width, relative-width(0 * $gutter-width, $context));
129
+ $pad-to : if($style == static, 0 * $gutter-width, relative-width(0 * $gutter-width, $context));
130
+
131
+ @if $padding != false {
132
+ $pad-from : nth($padding, 1);
133
+
134
+ @if length($padding) > 1 {
135
+ $pad-to: nth($padding, 2);
136
+ } @else {
137
+ $pad-to: $pad-from;
138
+ }
139
+
140
+ $pad-from : if($style == static, $pad-from, relative-width($pad-from, $context));
141
+ $pad-to : if($style == static, $pad-to, relative-width($pad-to, $context));
142
+
143
+ padding-#{$from}: $pad-from;
144
+ padding-#{$to}: $pad-to;
145
+ }
146
+
147
+ width: columns($cols, $context, $style) - if($border-box-sizing, 0, $pad-to + $pad-from);
148
+
149
+ @if ($pos == 'omega') {
150
+ @include omega($from);
151
+ } @else {
152
+ float: $from;
153
+ margin-#{$to}: gutter($context, $style);
154
+ @include for-legacy-browser(ie, "6") {
155
+ display: inline;
156
+ }
157
+ }
158
+ }
159
+
160
+ // Apply to elements spanning the last column, to account for the page edge.
161
+ // Only needed as an override. Normally 'omega' can just be called by `columns`.
162
+ //
163
+ // $from : The start-direction for your document.
164
+ @mixin omega(
165
+ $from : $from-direction
166
+ ) {
167
+ $from : unquote($from);
168
+ $to : opposite-position($from);
169
+ $hack : opposite-position($omega-float);
170
+
171
+ float: $omega-float;
172
+ margin-#{$to}: 0;
173
+
174
+ @include for-legacy-browser(ie, "6", "7") {
175
+ *margin-#{$hack}: - $gutter-width;
176
+ @include for-legacy-browser(ie, "6") {
177
+ display: inline;
178
+ }
179
+ }
180
+ }
181
+
182
+ // Shortcut to apply omega to a specific subset of elements.
183
+ //
184
+ // $n : [first | only | last | <equation>]
185
+ // $selector : [child | last-child | of-type | last-of-type ]
186
+ // $from : The start-direction for your document.
187
+ @mixin nth-omega(
188
+ $n : last,
189
+ $selector : child,
190
+ $from : $from-direction
191
+ ) {
192
+ $from : unquote($from);
193
+
194
+ &:#{format-nth($n,$selector)} {
195
+ @if $n == "first" {
196
+ @include omega($from);
197
+ } @else {
198
+ @include with-browser-ranges(css-sel3) {
199
+ @include omega($from);
200
+ }
201
+ }
202
+ }
203
+ }
204
+
205
+
206
+
207
+ // ---------------------------------------------------------------------------
208
+ // Resets
209
+
210
+ // Reset a '+columns' grid element to default block behavior
211
+ //
212
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
213
+ @mixin reset-columns(
214
+ $from: $from-direction
215
+ ) {
216
+ $from : unquote($from);
217
+ $to : opposite-position($from);
218
+ $hack : opposite-position($omega-float);
219
+
220
+ float: none;
221
+ width: auto;
222
+ margin-#{$to}: auto;
223
+
224
+ @include for-legacy-browser(ie, "6", "7") {
225
+ *margin-#{$hack}: auto;
226
+ @include for-legacy-browser(ie, "6") {
227
+ display: block;
228
+ }
229
+ }
230
+ }
231
+
232
+ // Apply to elements previously set as omega.
233
+ // This will return floats and margins back to non-omega settigns.
234
+ //
235
+ // $context : [optional] The context (columns spanned by parent).
236
+ // $from : The start-direction for your document.
237
+ // $style : The container style to use.
238
+ @mixin remove-omega(
239
+ $context : $total-columns,
240
+ $from : $from-direction,
241
+ $style : fix-static-misalignment()
242
+ ) {
243
+ $from : unquote($from);
244
+ $to : opposite-position($from);
245
+ $hack : opposite-position($omega-float);
246
+
247
+ float: $from;
248
+ margin-#{$to}: gutter($context, $style);
249
+
250
+ @include for-legacy-browser(ie, "6", "7") {
251
+ *margin-#{$hack}: auto;
252
+ }
253
+ }
254
+
255
+ // Shortcut to apply remove-omega to a specific subset of elements.
256
+ //
257
+ // $n : [first | only | last | <equation>]
258
+ // $selector : [child | last-child | of-type | last-of-type ]
259
+ // $context : [optional] The context (columns spanned by parent).
260
+ // $from : The start-direction for your document.
261
+ // $style : The container style to use.
262
+ @mixin remove-nth-omega(
263
+ $n : last,
264
+ $selector : child,
265
+ $context : $total-columns,
266
+ $from : $from-direction,
267
+ $style : fix-static-misalignment()
268
+ ) {
269
+ $from : unquote($from);
270
+
271
+ &:#{format-nth($n,$selector)} {
272
+ @if $n == "first" {
273
+ @include remove-omega($context, $from, $style);
274
+ } @else {
275
+ @include with-browser-ranges(css-sel3) {
276
+ @include remove-omega($context, $from, $style);
277
+ }
278
+ }
279
+ }
280
+ }
281
+
282
+
283
+ // ---------------------------------------------------------------------------
284
+ // Change Settings
285
+
286
+ @mixin with-grid-settings(
287
+ $columns: $total-columns,
288
+ $width: $column-width,
289
+ $gutter: $gutter-width,
290
+ $padding: $grid-padding
291
+ ) {
292
+ // keep the defaults around
293
+ $default-columns: $total-columns;
294
+ $default-width: $column-width;
295
+ $default-gutter: $gutter-width;
296
+ $default-padding: $grid-padding;
297
+
298
+ // use the new settings
299
+ $total-columns: $columns !global;
300
+ $column-width: $width !global;
301
+ $gutter-width: $gutter !global;
302
+ $grid-padding: $padding !global;
303
+
304
+ // apply to contents
305
+ @content;
306
+
307
+ // re-instate the defaults
308
+ $total-columns: $default-columns !global;
309
+ $column-width: $default-width !global;
310
+ $gutter-width: $default-gutter !global;
311
+ $grid-padding: $default-padding !global;
312
+ }