skeletor_backbone 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +43 -0
- data/Rakefile +1 -0
- data/app/assets/stylesheets/skeletor.sass +21 -0
- data/app/assets/stylesheets/skeletor/_all.sass +5 -0
- data/app/assets/stylesheets/skeletor/_css3.sass +26 -0
- data/app/assets/stylesheets/skeletor/_functions.sass +13 -0
- data/app/assets/stylesheets/skeletor/_mixins.sass +23 -0
- data/app/assets/stylesheets/skeletor/_settings.sass +153 -0
- data/app/assets/stylesheets/skeletor/base/debug.sass +132 -0
- data/app/assets/stylesheets/skeletor/base/foundation.sass +537 -0
- data/app/assets/stylesheets/skeletor/base/helpers.sass +203 -0
- data/app/assets/stylesheets/skeletor/base/print.sass +46 -0
- data/app/assets/stylesheets/skeletor/base/reset.sass +125 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_animation.sass +34 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_appearance.sass +39 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_backface_visibility.sass +36 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_border_radius.sass +75 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_box_shadow.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_box_sizing.sass +40 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_flexbox.sass +179 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_gradients.sass +54 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_hyphens.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_perspective.sass +50 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_prefixer.sass +76 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_tab_size.sass +39 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_text_shadow.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_transform.sass +112 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_transition.sass +35 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_user_select.sass +39 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_calculate_em.sass +43 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_calculate_modular_scale.sass +85 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_calculate_percent.sass +42 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_calculate_rem.sass +42 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_strip_units.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_accessibility.sass +49 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_grid_pull.sass +311 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_grid_push.sass +313 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_grid_widths.sass +275 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_hidpi.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_media_query.sass +71 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_opacity.sass +36 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_position.sass +65 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_rem.sass +102 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_retina_image.sass +53 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_rgba.sass +37 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_silent_relative.sass +41 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_size.sass +71 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_triangle.sass +69 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_truncate_text.sass +41 -0
- data/app/assets/stylesheets/skeletor/globals/settings/_easing.sass +47 -0
- data/app/assets/stylesheets/skeletor/globals/settings/_font_stacks.sass +65 -0
- data/app/assets/stylesheets/skeletor/globals/settings/_html5_input_types.sass +51 -0
- data/app/assets/stylesheets/skeletor/layout/_grid.sass +147 -0
- data/app/assets/stylesheets/skeletor/layout/skeleton.sass +58 -0
- data/lib/generators/skeletor/install_generator.rb +26 -0
- data/lib/sass/sass_extend.rb +107 -0
- data/lib/skeletor_backbone.rb +23 -0
- data/lib/skeletor_backbone/version.rb +3 -0
- data/skeletor_backbone.gemspec +26 -0
- data/vendor/assets/stylesheets/normalize.css +406 -0
- metadata +163 -0
@@ -0,0 +1,71 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// SIZE
|
3
|
+
//
|
4
|
+
// The size mixin is 'shorthand' for setting the width and height of elements.
|
5
|
+
// Size mixin can accept a single or double value. A single value will assign
|
6
|
+
// that size to the height and width and two values will asign as width &
|
7
|
+
// height accordingly.
|
8
|
+
//
|
9
|
+
// Available As:
|
10
|
+
// +skeletor-size(wh)
|
11
|
+
// +s-size(wh)
|
12
|
+
// +s-wh(w,h)
|
13
|
+
//
|
14
|
+
// =============================================================================
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
// -----------------------------------------------------------------------------
|
19
|
+
// Size
|
20
|
+
// -----------------------------------------------------------------------------
|
21
|
+
=skeletor-size($size)
|
22
|
+
@if length($size) == 1
|
23
|
+
@if $size == auto or not(unitless($size))
|
24
|
+
width: $size
|
25
|
+
height: $size
|
26
|
+
|
27
|
+
@else if unitless($size)
|
28
|
+
width: $size + px
|
29
|
+
height: $size + px
|
30
|
+
|
31
|
+
// Width x Height
|
32
|
+
@if length($size) == 2
|
33
|
+
$width: nth($size, 1)
|
34
|
+
$height: nth($size, 2)
|
35
|
+
|
36
|
+
@if $width == auto or not(unitless($width))
|
37
|
+
width: $width
|
38
|
+
|
39
|
+
@else if unitless($width)
|
40
|
+
width: $width + px
|
41
|
+
|
42
|
+
@if $height == auto or not(unitless($height))
|
43
|
+
height: $height
|
44
|
+
|
45
|
+
@else if unitless($height)
|
46
|
+
height: $height + px
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
// -----------------------------------------------------------------------------
|
51
|
+
// Alias for size mixin
|
52
|
+
// -----------------------------------------------------------------------------
|
53
|
+
=s-size($size)
|
54
|
+
=skeletor-size($size)
|
55
|
+
|
56
|
+
// Width/Height alias for size mixin
|
57
|
+
=s-wh($w, $h)
|
58
|
+
+skeletor-size($w $h)
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
// -----------------------------------------------------------------------------
|
63
|
+
// If no-conflict set to allow shorter mixin names
|
64
|
+
// -----------------------------------------------------------------------------
|
65
|
+
// @if $no-conflict
|
66
|
+
// =size($size)
|
67
|
+
// +skeletor-size($size)
|
68
|
+
|
69
|
+
// // Width/Height alias for size mixin
|
70
|
+
// =wh($w, $h)
|
71
|
+
// +skeletor-size($w $h)
|
@@ -0,0 +1,69 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// TRIANGLE
|
3
|
+
//
|
4
|
+
// The triangle mixin is for easily creating css triangles
|
5
|
+
//
|
6
|
+
// Available As:
|
7
|
+
// +skeletor-triangle()
|
8
|
+
// +s-triangle()
|
9
|
+
//
|
10
|
+
// =============================================================================
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
// -----------------------------------------------------------------------------
|
15
|
+
// Triangles
|
16
|
+
// -----------------------------------------------------------------------------
|
17
|
+
=skeletor-triangle($size, $color, $direction)
|
18
|
+
|
19
|
+
@if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left)
|
20
|
+
border-color: transparent
|
21
|
+
border-style: solid
|
22
|
+
border-width: $size / 2
|
23
|
+
|
24
|
+
@if $direction == up
|
25
|
+
border-bottom-color: $color
|
26
|
+
|
27
|
+
@else if $direction == right
|
28
|
+
border-left-color: $color
|
29
|
+
|
30
|
+
@else if $direction == down
|
31
|
+
border-top-color: $color
|
32
|
+
|
33
|
+
@else if $direction == left
|
34
|
+
border-right-color: $color
|
35
|
+
|
36
|
+
@else if ($direction == up-right) or ($direction == up-left)
|
37
|
+
border-top: $size solid $color
|
38
|
+
|
39
|
+
@if $direction == up-right
|
40
|
+
border-left: $size solid transparent
|
41
|
+
|
42
|
+
@else if $direction == up-left
|
43
|
+
border-right: $size solid transparent
|
44
|
+
|
45
|
+
@else if ($direction == down-right) or ($direction == down-left)
|
46
|
+
border-bottom: $size solid $color
|
47
|
+
|
48
|
+
@if $direction == down-right
|
49
|
+
border-left: $size solid transparent
|
50
|
+
|
51
|
+
@else if $direction == down-left
|
52
|
+
border-right: $size solid transparent
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
// -----------------------------------------------------------------------------
|
57
|
+
// Alias for triangle mixin
|
58
|
+
// -----------------------------------------------------------------------------
|
59
|
+
=s-triangle($size, $color, $direction)
|
60
|
+
+skeletor-triangle($size, $color, $direction)
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
// -----------------------------------------------------------------------------
|
65
|
+
// If no-conflict set to allow shorter mixin names
|
66
|
+
// -----------------------------------------------------------------------------
|
67
|
+
// @if $no-conflict
|
68
|
+
// =triangle($size, $color, $direction)
|
69
|
+
// +skeletor-triangle($size, $color, $direction)
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// TRUNCATE TEXT
|
3
|
+
//
|
4
|
+
// The truncate text mixin sets up an easier way to truncate text with
|
5
|
+
// an ellipsis default.
|
6
|
+
//
|
7
|
+
// Available As:
|
8
|
+
// +skeletor-truncate-text()
|
9
|
+
// +s-truncate-text()
|
10
|
+
// +s-tt()
|
11
|
+
//
|
12
|
+
// =============================================================================
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
// -----------------------------------------------------------------------------
|
17
|
+
// Truncate Text
|
18
|
+
// -----------------------------------------------------------------------------
|
19
|
+
=skeletor-truncate-text($text: ellipsis)
|
20
|
+
overflow: hidden
|
21
|
+
text-overflow: $text
|
22
|
+
white-space: nowrap
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
// -----------------------------------------------------------------------------
|
27
|
+
// Alias for truncate text mixin
|
28
|
+
// -----------------------------------------------------------------------------
|
29
|
+
=s-truncate-text($text: ellipsis)
|
30
|
+
+skeletor-truncate-text($text)
|
31
|
+
|
32
|
+
=s-tt($text: ellipsis)
|
33
|
+
+skeletor-truncate-text($text)
|
34
|
+
|
35
|
+
|
36
|
+
// -----------------------------------------------------------------------------
|
37
|
+
// If no-conflict set to allow shorter mixin names
|
38
|
+
// -----------------------------------------------------------------------------
|
39
|
+
// @if $no-conflict
|
40
|
+
// =truncate-text($text: ellipsis)
|
41
|
+
// +skeletor-truncate-text($text)
|
@@ -0,0 +1,47 @@
|
|
1
|
+
//
|
2
|
+
// Easing
|
3
|
+
//
|
4
|
+
// http://robertpenner.com/
|
5
|
+
// http://matthewlein.com/ceaser/
|
6
|
+
//
|
7
|
+
//============================================================
|
8
|
+
|
9
|
+
// Cubic
|
10
|
+
$easeInCubic : cubic-bezier(0.550, 0.055, 0.675, 0.190)
|
11
|
+
$easeOutCubic : cubic-bezier(0.215, 0.610, 0.355, 1.000)
|
12
|
+
$easeInOutCubic : cubic-bezier(0.645, 0.045, 0.355, 1.000)
|
13
|
+
|
14
|
+
// Circ
|
15
|
+
$easeInCirc : cubic-bezier(0.600, 0.040, 0.980, 0.335)
|
16
|
+
$easeOutCirc : cubic-bezier(0.075, 0.820, 0.165, 1.000)
|
17
|
+
$easeInOutCirc : cubic-bezier(0.785, 0.135, 0.150, 0.860)
|
18
|
+
|
19
|
+
// Expo
|
20
|
+
$easeInExpo : cubic-bezier(0.950, 0.050, 0.795, 0.035)
|
21
|
+
$easeOutExpo : cubic-bezier(0.190, 1.000, 0.220, 1.000)
|
22
|
+
$easeInOutExpo : cubic-bezier(1.000, 0.000, 0.000, 1.000)
|
23
|
+
|
24
|
+
// Quad
|
25
|
+
$easeInQuad : cubic-bezier(0.550, 0.085, 0.680, 0.530)
|
26
|
+
$easeOutQuad : cubic-bezier(0.250, 0.460, 0.450, 0.940)
|
27
|
+
$easeInOutQuad : cubic-bezier(0.455, 0.030, 0.515, 0.955)
|
28
|
+
|
29
|
+
// Quart
|
30
|
+
$easeInQuart : cubic-bezier(0.895, 0.030, 0.685, 0.220)
|
31
|
+
$easeOutQuart : cubic-bezier(0.165, 0.840, 0.440, 1.000)
|
32
|
+
$easeInOutQuart : cubic-bezier(0.770, 0.000, 0.175, 1.000)
|
33
|
+
|
34
|
+
// Quint
|
35
|
+
$easeInQuint : cubic-bezier(0.755, 0.050, 0.855, 0.060)
|
36
|
+
$easeOutQuint : cubic-bezier(0.230, 1.000, 0.320, 1.000)
|
37
|
+
$easeInOutQuint : cubic-bezier(0.860, 0.000, 0.070, 1.000)
|
38
|
+
|
39
|
+
// Sine
|
40
|
+
$easeInSine : cubic-bezier(0.470, 0.000, 0.745, 0.715)
|
41
|
+
$easeOutSine : cubic-bezier(0.390, 0.575, 0.565, 1.000)
|
42
|
+
$easeInOutSine : cubic-bezier(0.445, 0.050, 0.550, 0.950)
|
43
|
+
|
44
|
+
// Back
|
45
|
+
$easeInBack : cubic-bezier(0.600, -0.280, 0.735, 0.045)
|
46
|
+
$easeOutBack : cubic-bezier(0.175, 0.885, 0.320, 1.275)
|
47
|
+
$easeInOutBack : cubic-bezier(0.680, -0.550, 0.265, 1.550)
|
@@ -0,0 +1,65 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Create variables for commonly used font stacks
|
3
|
+
// =============================================================================
|
4
|
+
|
5
|
+
|
6
|
+
// -----------------------------------------------------------------------------
|
7
|
+
// Times New Roman-based stack
|
8
|
+
// -----------------------------------------------------------------------------
|
9
|
+
$times: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
// -----------------------------------------------------------------------------
|
14
|
+
// Modern Georgia-based serif stack
|
15
|
+
// -----------------------------------------------------------------------------
|
16
|
+
$georgia: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
// -----------------------------------------------------------------------------
|
21
|
+
// Traditional Garamond-based serif stack
|
22
|
+
// -----------------------------------------------------------------------------
|
23
|
+
$garamond: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
// -----------------------------------------------------------------------------
|
28
|
+
// Helvetica/Arial-based sans serif stack
|
29
|
+
// -----------------------------------------------------------------------------
|
30
|
+
$helvetica: Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
// -----------------------------------------------------------------------------
|
35
|
+
// Verdana-based sans serif stack
|
36
|
+
// -----------------------------------------------------------------------------
|
37
|
+
$verdana: Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans-serif
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
// -----------------------------------------------------------------------------
|
42
|
+
// Trebuchet-based sans serif stack
|
43
|
+
// -----------------------------------------------------------------------------
|
44
|
+
$trebuchet: "Segoe UI", Candara, "Bitstream Vera Sans", "DejaVu Sans", "Bitstream Vera Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans-serif
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
// -----------------------------------------------------------------------------
|
49
|
+
// Impact-based sans serif stack
|
50
|
+
// -----------------------------------------------------------------------------
|
51
|
+
$impact: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans-serif
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
// -----------------------------------------------------------------------------
|
56
|
+
// Monospace stack
|
57
|
+
// -----------------------------------------------------------------------------
|
58
|
+
$monospace: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
// -----------------------------------------------------------------------------
|
63
|
+
// Cursive Stack
|
64
|
+
// -----------------------------------------------------------------------------
|
65
|
+
$cursive: "Comic Sans", "Comic Sans MS", Chalkboard, ChalkboardSE-Regular, "Marker Felt", Purisa, "URW Chancery L", cursive
|
@@ -0,0 +1,51 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// HTML5 Input Types
|
3
|
+
//
|
4
|
+
// Creates a variable for 'all text inputs' with a list of html5 input
|
5
|
+
// types that have a text-based input, excluding textarea.
|
6
|
+
// http://diveintohtml5.org/forms.html
|
7
|
+
//
|
8
|
+
// You must use interpolation on these variables
|
9
|
+
// #{$all-text-inputs}
|
10
|
+
// #{$all-text-inputs-hover}
|
11
|
+
// #{$all-text-inputs-focus}
|
12
|
+
//
|
13
|
+
// =============================================================================
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
// -----------------------------------------------------------------------------
|
18
|
+
// Variable holder for html5 inputs
|
19
|
+
// -----------------------------------------------------------------------------
|
20
|
+
$inputs-list: 'input[type="email"]', 'input[type="number"]', 'input[type="password"]', 'input[type="search"]', 'input[type="tel"]', 'input[type="text"]', 'input[type="url"]', 'input[type="color"]', 'input[type="date"]', 'input[type="datetime"]', 'input[type="datetime-local"]', 'input[type="month"]', 'input[type="time"]', 'input[type="week"]'
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
// -----------------------------------------------------------------------------
|
25
|
+
// Input Pseudo-class
|
26
|
+
// -----------------------------------------------------------------------------
|
27
|
+
$unquoted-inputs-list: ()
|
28
|
+
@each $input-type in $inputs-list
|
29
|
+
$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma)
|
30
|
+
|
31
|
+
$all-text-inputs: $unquoted-inputs-list
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
// -----------------------------------------------------------------------------
|
36
|
+
// Hover Pseudo-class
|
37
|
+
// -----------------------------------------------------------------------------
|
38
|
+
$all-text-inputs-hover: ()
|
39
|
+
@each $input-type in $unquoted-inputs-list
|
40
|
+
$input-type-hover: $input-type + ":hover"
|
41
|
+
$all-text-inputs-hover: append($all-text-inputs-hover, $input-type-hover, comma)
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
// -----------------------------------------------------------------------------
|
46
|
+
// Focus Pseudo-class
|
47
|
+
// -----------------------------------------------------------------------------
|
48
|
+
$all-text-inputs-focus: ()
|
49
|
+
@each $input-type in $unquoted-inputs-list
|
50
|
+
$input-type-focus: $input-type + ":focus"
|
51
|
+
$all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma)
|
@@ -0,0 +1,147 @@
|
|
1
|
+
// Responsive Grid System
|
2
|
+
//
|
3
|
+
// =============================================================================
|
4
|
+
// Table of Contents
|
5
|
+
// =============================================================================
|
6
|
+
//
|
7
|
+
// IMPORTS...........................Sass Imports
|
8
|
+
// VARIABLES.........................Grid Specific Variables
|
9
|
+
// GRID ELEMENTS.....................Base grid classes and sass placeholders
|
10
|
+
// GRID WIDTHS.......................Widths for grids and elements
|
11
|
+
// PUSH & PULL.......................Push & Pull classes
|
12
|
+
//
|
13
|
+
|
14
|
+
|
15
|
+
// -----------------------------------------------------------------------------
|
16
|
+
// :: IMPORTS
|
17
|
+
// -----------------------------------------------------------------------------
|
18
|
+
@import "skeletor/globals/mixins/media_query"
|
19
|
+
@import "skeletor/globals/mixins/grid_widths", "skeletor/globals/mixins/grid_push", "skeletor/globals/mixins/grid_pull"
|
20
|
+
@import "skeletor/globals/css3/prefixer", "skeletor/globals/css3/box_sizing"
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
@if $grid
|
27
|
+
// -----------------------------------------------------------------------------
|
28
|
+
// :: Variables
|
29
|
+
// -----------------------------------------------------------------------------
|
30
|
+
// Set class type to either CSS classes `.` || sass placeholder classes `%`
|
31
|
+
$class-type: unquote(".")
|
32
|
+
|
33
|
+
@if $use-silent-classes
|
34
|
+
$class-type: unquote("%")
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
// -----------------------------------------------------------------------------
|
41
|
+
// :: GRID ELEMENTS
|
42
|
+
// -----------------------------------------------------------------------------
|
43
|
+
// - 1. Set font-size 0 for Inline-Block White Space Issue. As per: http://css-tricks.com/fighting-the-space-between-inline-block-elements/
|
44
|
+
// - 1.5. Alternative fix for Inline-Block White Space Issue (buggy?)
|
45
|
+
// - 2. Allow the grid system to be used on lists.
|
46
|
+
// - 3. Remove margin from grid
|
47
|
+
// - 4. Apply a negative `margin-left` to negate the columns' gutters.
|
48
|
+
|
49
|
+
#{$class-type}grid
|
50
|
+
// [1]
|
51
|
+
font-size: 0
|
52
|
+
// [1.5]
|
53
|
+
//letter-spacing: -0.31em
|
54
|
+
// [2]
|
55
|
+
list-style: none
|
56
|
+
// [3]
|
57
|
+
margin-bottom: 0
|
58
|
+
// [4]
|
59
|
+
margin-left: -$base-line-height
|
60
|
+
// [1.5]
|
61
|
+
//word-spacing: -0.43em
|
62
|
+
|
63
|
+
|
64
|
+
// Very infrequently occuring grid wrappers as children of grid wrappers.
|
65
|
+
// #{$class-type}grid > #{$class-type}grid { margin-left: 0; }
|
66
|
+
|
67
|
+
// - 1. Cause columns to stack side-by-side.
|
68
|
+
// - 2. Set font-size from reset above.
|
69
|
+
// - 2.5. Set letter and word spacing if reset above.
|
70
|
+
// - 3. Space columns apart.
|
71
|
+
// - 4. Align columns to the tops of each other.
|
72
|
+
// - 5. Full-width (mobile first) unless told to behave otherwise.
|
73
|
+
// - 6. Force box-sizing. Required to combine fluid widths and fixed gutters.
|
74
|
+
|
75
|
+
#{$class-type}grid__item
|
76
|
+
// [1]
|
77
|
+
display: inline-block
|
78
|
+
// [2]
|
79
|
+
font-size: $base-font-size
|
80
|
+
// [2.5]
|
81
|
+
//letter-spacing: normal
|
82
|
+
// [3]
|
83
|
+
padding-left: $base-line-height
|
84
|
+
// [4]
|
85
|
+
vertical-align: top
|
86
|
+
// [5]
|
87
|
+
width: 100%
|
88
|
+
// [2.5]
|
89
|
+
//word-spacing: normal
|
90
|
+
@if $global-border-box == false
|
91
|
+
// [6]
|
92
|
+
+box-sizing(border-box)
|
93
|
+
|
94
|
+
// - Gutterless grids have all the properties of regular grids, minus any spacing.
|
95
|
+
// - Extends `.grid`.
|
96
|
+
|
97
|
+
#{$class-type}grid--full
|
98
|
+
@extend #{$class-type}grid
|
99
|
+
margin-left: 0
|
100
|
+
|
101
|
+
> #{$class-type}grid__item
|
102
|
+
padding-left: 0
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
// -----------------------------------------------------------------------------
|
109
|
+
// :: GRID WIDTHS
|
110
|
+
// -----------------------------------------------------------------------------
|
111
|
+
// Generate regular, width classes
|
112
|
+
+skeletor-grid-widths($class-type)
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
// -----------------------------------------------------------------------------
|
119
|
+
// :: PUSH & PULL
|
120
|
+
// -----------------------------------------------------------------------------
|
121
|
+
@if $push
|
122
|
+
@if $use-silent-classes == false
|
123
|
+
[class*="push--"]
|
124
|
+
position: relative
|
125
|
+
+skeletor-grid-push($class-type)
|
126
|
+
|
127
|
+
@if $pull
|
128
|
+
@if $use-silent-classes == false
|
129
|
+
[class*="pull--"]
|
130
|
+
position: relative
|
131
|
+
+skeletor-grid-pull($class-type)
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
// -----------------------------------------------------------------------------
|
138
|
+
// :: RESPONSIVE GRIDS, PUSH, PULL
|
139
|
+
// -----------------------------------------------------------------------------
|
140
|
+
@if $responsive
|
141
|
+
@each $breakpoint in $breakpoints
|
142
|
+
+skeletor-media-query($breakpoint)
|
143
|
+
+skeletor-grid-widths($class-type, '#{$breakpoint}-')
|
144
|
+
@if $push
|
145
|
+
+skeletor-grid-push($class-type, '#{$breakpoint}-')
|
146
|
+
@if $pull
|
147
|
+
+skeletor-grid-pull($class-type, '#{$breakpoint}-')
|