jekyll-theme-basically-basic 1.1.3 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -12
- data/LICENSE.md +33 -21
- data/README.md +33 -17
- data/_includes/contact-list.html +1 -1
- data/_includes/head.html +2 -2
- data/_includes/navigation.html +2 -2
- data/_layouts/default.html +2 -2
- data/_layouts/home.html +1 -1
- data/_sass/basically-basic.scss +7 -9
- data/_sass/basically-basic/_entries.scss +152 -155
- data/_sass/basically-basic/_functions.scss +2 -0
- data/_sass/basically-basic/_layout.scss +7 -15
- data/_sass/basically-basic/_mixins.scss +5 -7
- data/_sass/basically-basic/_sidebar.scss +3 -2
- data/_sass/basically-basic/_syntax-highlighting.scss +314 -127
- data/_sass/basically-basic/_variables.scss +104 -84
- data/_sass/basically-basic/{mixins → functions}/_color.scss +0 -0
- data/_sass/basically-basic/{mixins → functions}/_fluid-type.scss +0 -0
- data/_sass/basically-basic/themes/_soft.scss +30 -12
- data/_sass/basically-basic/themes/_steel.scss +30 -12
- data/_sass/basically-basic/vendor/{_breakpoint.scss → breakpoint/_breakpoint.scss} +7 -7
- data/_sass/basically-basic/vendor/susy/_su.scss +1 -4
- data/_sass/basically-basic/vendor/susy/_susy-prefix.scss +13 -0
- data/_sass/basically-basic/vendor/susy/_susy.scss +5 -0
- data/_sass/basically-basic/vendor/susy/plugins/_svg-grid.scss +5 -0
- data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_prefix.scss +7 -0
- data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-api.scss +114 -0
- data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-grid-math.scss +67 -0
- data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-settings.scss +14 -0
- data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-unprefix.scss +18 -0
- data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-utilities.scss +133 -0
- data/_sass/basically-basic/vendor/susy/susy/_api.scss +318 -0
- data/_sass/basically-basic/vendor/susy/susy/_normalize.scss +261 -0
- data/_sass/basically-basic/vendor/susy/susy/_parse.scss +163 -0
- data/_sass/basically-basic/vendor/susy/susy/_settings.scss +329 -0
- data/_sass/basically-basic/vendor/susy/susy/_su-math.scss +441 -0
- data/_sass/basically-basic/vendor/susy/susy/_su-validate.scss +213 -0
- data/_sass/basically-basic/vendor/susy/susy/_syntax-helpers.scss +191 -0
- data/_sass/basically-basic/vendor/susy/susy/_unprefix.scss +56 -0
- data/_sass/basically-basic/vendor/susy/susy/_utilities.scss +167 -0
- data/assets/javascripts/main.js +2 -2
- metadata +25 -59
- data/_sass/basically-basic/vendor/_su.scss +0 -4
- data/_sass/basically-basic/vendor/_susy.scss +0 -4
- data/_sass/basically-basic/vendor/_susyone.scss +0 -4
- data/_sass/basically-basic/vendor/susy/language/_susy.scss +0 -24
- data/_sass/basically-basic/vendor/susy/language/_susyone.scss +0 -13
- data/_sass/basically-basic/vendor/susy/language/susy/_background.scss +0 -385
- data/_sass/basically-basic/vendor/susy/language/susy/_bleed.scss +0 -200
- data/_sass/basically-basic/vendor/susy/language/susy/_box-sizing.scss +0 -47
- data/_sass/basically-basic/vendor/susy/language/susy/_breakpoint-plugin.scss +0 -185
- data/_sass/basically-basic/vendor/susy/language/susy/_container.scss +0 -81
- data/_sass/basically-basic/vendor/susy/language/susy/_context.scss +0 -36
- data/_sass/basically-basic/vendor/susy/language/susy/_gallery.scss +0 -94
- data/_sass/basically-basic/vendor/susy/language/susy/_grids.scss +0 -64
- data/_sass/basically-basic/vendor/susy/language/susy/_gutters.scss +0 -154
- data/_sass/basically-basic/vendor/susy/language/susy/_isolate.scss +0 -77
- data/_sass/basically-basic/vendor/susy/language/susy/_margins.scss +0 -94
- data/_sass/basically-basic/vendor/susy/language/susy/_padding.scss +0 -74
- data/_sass/basically-basic/vendor/susy/language/susy/_rows.scss +0 -138
- data/_sass/basically-basic/vendor/susy/language/susy/_settings.scss +0 -216
- data/_sass/basically-basic/vendor/susy/language/susy/_span.scss +0 -163
- data/_sass/basically-basic/vendor/susy/language/susy/_validation.scss +0 -16
- data/_sass/basically-basic/vendor/susy/language/susyone/_background.scss +0 -18
- data/_sass/basically-basic/vendor/susy/language/susyone/_functions.scss +0 -377
- data/_sass/basically-basic/vendor/susy/language/susyone/_grid.scss +0 -312
- data/_sass/basically-basic/vendor/susy/language/susyone/_isolation.scss +0 -51
- data/_sass/basically-basic/vendor/susy/language/susyone/_margin.scss +0 -93
- data/_sass/basically-basic/vendor/susy/language/susyone/_media.scss +0 -105
- data/_sass/basically-basic/vendor/susy/language/susyone/_padding.scss +0 -92
- data/_sass/basically-basic/vendor/susy/language/susyone/_settings.scss +0 -60
- data/_sass/basically-basic/vendor/susy/output/_float.scss +0 -9
- data/_sass/basically-basic/vendor/susy/output/_shared.scss +0 -15
- data/_sass/basically-basic/vendor/susy/output/_support.scss +0 -9
- data/_sass/basically-basic/vendor/susy/output/float/_container.scss +0 -16
- data/_sass/basically-basic/vendor/susy/output/float/_end.scss +0 -40
- data/_sass/basically-basic/vendor/susy/output/float/_isolate.scss +0 -22
- data/_sass/basically-basic/vendor/susy/output/float/_span.scss +0 -35
- data/_sass/basically-basic/vendor/susy/output/shared/_background.scss +0 -26
- data/_sass/basically-basic/vendor/susy/output/shared/_container.scss +0 -21
- data/_sass/basically-basic/vendor/susy/output/shared/_direction.scss +0 -42
- data/_sass/basically-basic/vendor/susy/output/shared/_inspect.scss +0 -25
- data/_sass/basically-basic/vendor/susy/output/shared/_margins.scss +0 -23
- data/_sass/basically-basic/vendor/susy/output/shared/_output.scss +0 -14
- data/_sass/basically-basic/vendor/susy/output/shared/_padding.scss +0 -23
- data/_sass/basically-basic/vendor/susy/output/support/_background.scss +0 -58
- data/_sass/basically-basic/vendor/susy/output/support/_box-sizing.scss +0 -19
- data/_sass/basically-basic/vendor/susy/output/support/_clearfix.scss +0 -18
- data/_sass/basically-basic/vendor/susy/output/support/_prefix.scss +0 -19
- data/_sass/basically-basic/vendor/susy/output/support/_rem.scss +0 -22
- data/_sass/basically-basic/vendor/susy/output/support/_support.scss +0 -85
- data/_sass/basically-basic/vendor/susy/su/_grid.scss +0 -103
- data/_sass/basically-basic/vendor/susy/su/_settings.scss +0 -73
- data/_sass/basically-basic/vendor/susy/su/_utilities.scss +0 -111
- data/_sass/basically-basic/vendor/susy/su/_validation.scss +0 -57
@@ -1,16 +0,0 @@
|
|
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
|
-
}
|
@@ -1,18 +0,0 @@
|
|
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
|
-
}
|
@@ -1,377 +0,0 @@
|
|
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
|
-
}
|
@@ -1,312 +0,0 @@
|
|
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
|
-
}
|