zurb-foundation 4.1.2 → 4.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTING.md +2 -2
- data/Gemfile.lock +1 -1
- data/README.md +11 -7
- data/docs/CHANGELOG.md +22 -3
- data/docs/_sidebar-components.html.erb +3 -1
- data/docs/_sidebar.html.erb +3 -1
- data/docs/components/breadcrumbs.html.erb +9 -1
- data/docs/components/forms.html.erb +12 -6
- data/docs/components/grid.html.erb +3 -3
- data/docs/components/kitchen-sink.html.erb +7 -1
- data/docs/components/labels.html.erb +3 -1
- data/docs/components/section.html.erb +99 -10
- data/docs/components/top-bar.html.erb +2 -2
- data/docs/components/type.html.erb +31 -2
- data/docs/css/docs.scss +0 -5
- data/docs/index.html.erb +2 -0
- data/docs/javascript.html.erb +8 -5
- data/docs/sass.html.erb +1005 -127
- data/js/foundation/foundation.clearing.js +8 -4
- data/js/foundation/foundation.dropdown.js +43 -23
- data/js/foundation/foundation.forms.js +5 -3
- data/js/foundation/foundation.joyride.js +2 -6
- data/js/foundation/foundation.js +70 -47
- data/js/foundation/foundation.orbit.js +10 -4
- data/js/foundation/foundation.reveal.js +8 -3
- data/js/foundation/foundation.section.js +188 -72
- data/js/foundation/foundation.tooltips.js +4 -3
- data/js/foundation/foundation.topbar.js +4 -1
- data/lib/foundation/generators/install_generator.rb +2 -2
- data/lib/foundation/version.rb +1 -1
- data/scss/foundation.scss +1 -1
- data/{templates/project/scss/_settings.scss → scss/foundation/_variables.scss} +347 -173
- data/scss/foundation/components/_alert-boxes.scss +1 -1
- data/scss/foundation/components/_block-grid.scss +6 -2
- data/scss/foundation/components/_breadcrumbs.scss +20 -13
- data/scss/foundation/components/_button-groups.scss +18 -6
- data/scss/foundation/components/_buttons.scss +18 -11
- data/scss/foundation/components/_clearing.scss +6 -0
- data/scss/foundation/components/_custom-forms.scss +29 -23
- data/scss/foundation/components/_dropdown-buttons.scss +1 -1
- data/scss/foundation/components/_dropdown.scss +7 -3
- data/scss/foundation/components/_flex-video.scss +1 -1
- data/scss/foundation/components/_forms.scss +49 -25
- data/scss/foundation/components/_global.scss +222 -3
- data/scss/foundation/components/_grid.scss +40 -24
- data/scss/foundation/components/_inline-lists.scss +1 -1
- data/scss/foundation/components/_joyride.scss +4 -6
- data/scss/foundation/components/_keystrokes.scss +1 -1
- data/scss/foundation/components/_labels.scss +5 -3
- data/scss/foundation/components/_magellan.scss +1 -1
- data/scss/foundation/components/_orbit.scss +13 -8
- data/scss/foundation/components/_pagination.scss +1 -1
- data/scss/foundation/components/_panels.scss +1 -1
- data/scss/foundation/components/_pricing-tables.scss +1 -1
- data/scss/foundation/components/_progress-bars.scss +1 -1
- data/scss/foundation/components/_reveal.scss +7 -7
- data/scss/foundation/components/_section.scss +75 -21
- data/scss/foundation/components/_side-nav.scss +1 -1
- data/scss/foundation/components/_split-buttons.scss +10 -3
- data/scss/foundation/components/_sub-nav.scss +1 -1
- data/scss/foundation/components/_switch.scss +1 -1
- data/scss/foundation/components/_thumbs.scss +3 -1
- data/scss/foundation/components/_top-bar.scss +8 -6
- data/scss/foundation/components/_visibility.scss +1 -1
- data/scss/normalize.scss +13 -7
- data/templates/project/manifest.rb +2 -11
- data/templates/project/scss/app.scss +0 -1
- metadata +5 -7
- data/scss/foundation/_foundation-global.scss +0 -198
- data/templates/project/scss/normalize.scss +0 -396
@@ -6,11 +6,11 @@
|
|
6
6
|
$form-spacing: emCalc(16px) !default;
|
7
7
|
|
8
8
|
// We use these to style the labels in different ways
|
9
|
-
$label-pointer:
|
10
|
-
$label-font-size:
|
11
|
-
$label-font-weight:
|
12
|
-
$label-font-color:
|
13
|
-
$label-bottom-margin:
|
9
|
+
$form-label-pointer: pointer !default;
|
10
|
+
$form-label-font-size: emCalc(14px) !default;
|
11
|
+
$form-label-font-weight: 500 !default;
|
12
|
+
$form-label-font-color: lighten(#000, 30%) !default;
|
13
|
+
$form-label-bottom-margin: emCalc(3px) !default;
|
14
14
|
$input-font-family: inherit !default;
|
15
15
|
$input-font-color: rgba(0,0,0,0.75) !default;
|
16
16
|
$input-font-size: emCalc(14px) !default;
|
@@ -22,6 +22,7 @@ $input-border-style: solid !default;
|
|
22
22
|
$input-border-width: 1px !default;
|
23
23
|
$input-disabled-bg: #ddd !default;
|
24
24
|
$input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1) !default;
|
25
|
+
$input-include-glowing-effect: true !default;
|
25
26
|
|
26
27
|
// We use these to style the fieldset border and spacing.
|
27
28
|
$fieldset-border-style: solid !default;
|
@@ -52,6 +53,9 @@ $input-error-message-font-weight: bold !default;
|
|
52
53
|
$input-error-message-font-color: #fff !default;
|
53
54
|
$input-error-message-font-color-alt: #333 !default;
|
54
55
|
|
56
|
+
//We use this to style the glowing effect of inputs when focused
|
57
|
+
$glowing-effect-fade-time: 0.45s !default;
|
58
|
+
$glowing-effect-color: $input-focus-border-color !default;
|
55
59
|
|
56
60
|
//
|
57
61
|
// Form Mixins
|
@@ -59,7 +63,7 @@ $input-error-message-font-color-alt: #333 !default;
|
|
59
63
|
|
60
64
|
// We use this mixin to give us form styles for rows inside of forms
|
61
65
|
@mixin form-row-base {
|
62
|
-
.row { margin: 0 -$form-spacing / 2;
|
66
|
+
.row { margin: 0 ((-$form-spacing) / 2);
|
63
67
|
|
64
68
|
.column,
|
65
69
|
.columns { padding: 0 $form-spacing / 2; }
|
@@ -73,7 +77,9 @@ $input-error-message-font-color-alt: #333 !default;
|
|
73
77
|
}
|
74
78
|
}
|
75
79
|
input.column,
|
76
|
-
input.columns
|
80
|
+
input.columns,
|
81
|
+
textarea.column,
|
82
|
+
textarea.columns { padding-#{$default-float}: $form-spacing / 2; }
|
77
83
|
}
|
78
84
|
|
79
85
|
// We use this mixin to give all basic form elements their style
|
@@ -91,7 +97,9 @@ $input-error-message-font-color-alt: #333 !default;
|
|
91
97
|
height: emCalc(13px) + ($form-spacing * 1.5);
|
92
98
|
width: 100%;
|
93
99
|
@include box-sizing(border-box);
|
94
|
-
|
100
|
+
@if $input-include-glowing-effect {
|
101
|
+
@include block-glowing-effect(focus, $glowing-effect-fade-time, $glowing-effect-color);
|
102
|
+
}
|
95
103
|
// Basic focus styles
|
96
104
|
&:focus {
|
97
105
|
background: $input-focus-bg-color;
|
@@ -108,12 +116,12 @@ $input-error-message-font-color-alt: #333 !default;
|
|
108
116
|
|
109
117
|
// Control whether or not the base styles come through.
|
110
118
|
@if $base-style {
|
111
|
-
font-size: $label-font-size;
|
112
|
-
color: $label-font-color;
|
113
|
-
cursor: $label-pointer;
|
119
|
+
font-size: $form-label-font-size;
|
120
|
+
color: $form-label-font-color;
|
121
|
+
cursor: $form-label-pointer;
|
114
122
|
display: block;
|
115
|
-
font-weight: $label-font-weight;
|
116
|
-
margin-bottom: $label-bottom-margin;
|
123
|
+
font-weight: $form-label-font-weight;
|
124
|
+
margin-bottom: $form-label-bottom-margin;
|
117
125
|
}
|
118
126
|
|
119
127
|
// Alignment options
|
@@ -139,9 +147,9 @@ $input-error-message-font-color-alt: #333 !default;
|
|
139
147
|
border-style: $input-prefix-border-type;
|
140
148
|
border-width: $input-prefix-border-size;
|
141
149
|
overflow: $input-prefix-overflow;
|
142
|
-
font-size: $label-font-size;
|
143
|
-
height: ($label-font-size + ($form-spacing * 1.5) - emCalc(1px));
|
144
|
-
line-height: ($label-font-size + ($form-spacing * 1.5) - emCalc(1px));
|
150
|
+
font-size: $form-label-font-size;
|
151
|
+
height: ($form-label-font-size + ($form-spacing * 1.5) - emCalc(1px));
|
152
|
+
line-height: ($form-label-font-size + ($form-spacing * 1.5) - emCalc(1px));
|
145
153
|
}
|
146
154
|
|
147
155
|
// We use this mixin to create prefix label styles
|
@@ -242,7 +250,7 @@ $input-error-message-font-color-alt: #333 !default;
|
|
242
250
|
}
|
243
251
|
|
244
252
|
// Only include these classes if the variable is true, otherwise they'll be left out.
|
245
|
-
@if $include-html-form-classes {
|
253
|
+
@if $include-html-form-classes != false {
|
246
254
|
/* Standard Forms */
|
247
255
|
form { margin: 0 0 $form-spacing; }
|
248
256
|
|
@@ -262,17 +270,18 @@ $input-error-message-font-color-alt: #333 !default;
|
|
262
270
|
/* Adjust padding, alignment and radius if pre/post element is a button */
|
263
271
|
.postfix.button { @include button-size(false,false,false); @include postfix(false,true); }
|
264
272
|
.prefix.button { @include button-size(false,false,false); @include prefix(false,true); }
|
265
|
-
|
266
|
-
.
|
267
|
-
.
|
268
|
-
.
|
273
|
+
|
274
|
+
.prefix.button.radius { @include radius(0); @include side-radius(left, $button-radius); }
|
275
|
+
.postfix.button.radius { @include radius(0); @include side-radius(right, $button-radius); }
|
276
|
+
.prefix.button.round { @include radius(0); @include side-radius(left, $button-round); }
|
277
|
+
.postfix.button.round { @include radius(0); @include side-radius(right, $button-round); }
|
269
278
|
|
270
279
|
/* Separate prefix and postfix styles when on span so buttons keep their own */
|
271
280
|
span.prefix { @include prefix();
|
272
|
-
&.radius { @include side-radius(
|
281
|
+
&.radius { @include radius(0); @include side-radius(left, $global-radius); }
|
273
282
|
}
|
274
283
|
span.postfix { @include postfix();
|
275
|
-
&.radius { @include side-radius(
|
284
|
+
&.radius { @include radius(0); @include side-radius(right, $global-radius); }
|
276
285
|
}
|
277
286
|
|
278
287
|
/* Input groups will automatically style first and last elements of the group */
|
@@ -311,7 +320,22 @@ $input-error-message-font-color-alt: #333 !default;
|
|
311
320
|
input[type="url"],
|
312
321
|
textarea {
|
313
322
|
@include form-element;
|
314
|
-
@
|
323
|
+
@if not $input-include-glowing-effect {
|
324
|
+
@include single-transition(all, 0.15s, linear);
|
325
|
+
}
|
326
|
+
}
|
327
|
+
|
328
|
+
/* Adjust margin for form elements below */
|
329
|
+
input[type="file"],
|
330
|
+
input[type="checkbox"],
|
331
|
+
input[type="radio"],
|
332
|
+
select {
|
333
|
+
margin: 0 0 $form-spacing 0;
|
334
|
+
}
|
335
|
+
|
336
|
+
/* Normalize file input width */
|
337
|
+
input[type="file"] {
|
338
|
+
width:100%;
|
315
339
|
}
|
316
340
|
|
317
341
|
/* We add basic fieldset styling */
|
@@ -334,4 +358,4 @@ $input-error-message-font-color-alt: #333 !default;
|
|
334
358
|
small.error {
|
335
359
|
@include form-error-message;
|
336
360
|
}
|
337
|
-
}
|
361
|
+
}
|
@@ -1,3 +1,219 @@
|
|
1
|
+
//
|
2
|
+
// Global Foundation Mixins
|
3
|
+
//
|
4
|
+
|
5
|
+
// We use this to control border radius.
|
6
|
+
@mixin radius($radius:$global-radius) {
|
7
|
+
@if $radius {
|
8
|
+
-webkit-border-radius: $radius;
|
9
|
+
border-radius: $radius;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
// We use this to create equal side border radius on elements.
|
14
|
+
@mixin side-radius($side, $radius) {
|
15
|
+
@if $side == left {
|
16
|
+
-moz-border-radius-bottomleft: $radius;
|
17
|
+
-moz-border-radius-topleft: $radius;
|
18
|
+
-webkit-border-bottom-left-radius: $radius;
|
19
|
+
-webkit-border-top-left-radius: $radius;
|
20
|
+
border-bottom-left-radius: $radius;
|
21
|
+
border-top-left-radius: $radius;
|
22
|
+
}
|
23
|
+
@else if $side == right {
|
24
|
+
-moz-border-radius-topright: $radius;
|
25
|
+
-moz-border-radius-bottomright: $radius;
|
26
|
+
-webkit-border-top-right-radius: $radius;
|
27
|
+
-webkit-border-bottom-right-radius: $radius;
|
28
|
+
border-top-right-radius: $radius;
|
29
|
+
border-bottom-right-radius: $radius;
|
30
|
+
}
|
31
|
+
@else if $side == top {
|
32
|
+
-moz-border-radius-topright: $radius;
|
33
|
+
-moz-border-radius-topleft: $radius;
|
34
|
+
-webkit-border-top-right-radius: $radius;
|
35
|
+
-webkit-border-top-left-radius: $radius;
|
36
|
+
border-top-right-radius: $radius;
|
37
|
+
border-top-left-radius: $radius;
|
38
|
+
}
|
39
|
+
@else if $side == bottom {
|
40
|
+
-moz-border-radius-bottomright: $radius;
|
41
|
+
-moz-border-radius-bottomleft: $radius;
|
42
|
+
-webkit-border-bottom-right-radius: $radius;
|
43
|
+
-webkit-border-bottom-left-radius: $radius;
|
44
|
+
border-bottom-right-radius: $radius;
|
45
|
+
border-bottom-left-radius: $radius;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
// We can control whether or not we have inset shadows edges.
|
50
|
+
@mixin inset-shadow($active:true) {
|
51
|
+
-webkit-box-shadow: $shiny-edge-size $shiny-edge-color inset;
|
52
|
+
box-shadow: $shiny-edge-size $shiny-edge-color inset;
|
53
|
+
|
54
|
+
@if $active { &:active {
|
55
|
+
-webkit-box-shadow: $shiny-edge-size $shiny-edge-active-color inset;
|
56
|
+
box-shadow: $shiny-edge-size $shiny-edge-active-color inset; } }
|
57
|
+
}
|
58
|
+
|
59
|
+
// We use this to add transitions to elements
|
60
|
+
@mixin single-transition($property:all, $speed:300ms, $ease:ease-out) {
|
61
|
+
-webkit-transition: $property $speed $ease;
|
62
|
+
-moz-transition: $property $speed $ease;
|
63
|
+
transition: $property $speed $ease;
|
64
|
+
}
|
65
|
+
|
66
|
+
// We use this to add box-sizing across browser prefixes
|
67
|
+
@mixin box-sizing($type:border-box) {
|
68
|
+
-moz-box-sizing: $type;
|
69
|
+
-webkit-box-sizing: $type;
|
70
|
+
box-sizing: $type;
|
71
|
+
}
|
72
|
+
|
73
|
+
// We use this to create equilateral triangles
|
74
|
+
@mixin css-triangle($triangle-size, $triangle-color, $triangle-direction) {
|
75
|
+
content: "";
|
76
|
+
display: block;
|
77
|
+
width: 0;
|
78
|
+
height: 0;
|
79
|
+
border: inset $triangle-size;
|
80
|
+
@if ($triangle-direction == top) {
|
81
|
+
border-color: $triangle-color transparent transparent transparent;
|
82
|
+
border-top-style: solid;
|
83
|
+
}
|
84
|
+
@if ($triangle-direction == bottom) {
|
85
|
+
border-color: transparent transparent $triangle-color transparent;
|
86
|
+
border-bottom-style: solid;
|
87
|
+
}
|
88
|
+
@if ($triangle-direction == left) {
|
89
|
+
border-color: transparent transparent transparent $triangle-color;
|
90
|
+
border-left-style: solid;
|
91
|
+
}
|
92
|
+
@if ($triangle-direction == right) {
|
93
|
+
border-color: transparent $triangle-color transparent transparent;
|
94
|
+
border-right-style: solid;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
// We use this to do clear floats
|
99
|
+
@mixin clearfix() {
|
100
|
+
*zoom:1;
|
101
|
+
&:before, &:after { content: " "; display: table; }
|
102
|
+
&:after { clear: both; }
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
// We use this to add a glowing effect to block elements
|
107
|
+
@mixin block-glowing-effect($selector:focus, $fade-time:300ms, $glowing-effect-color:fade-out($primary-color, .25)) {
|
108
|
+
-webkit-transition: box-shadow, $fade-time, -moz-box-shadow, $fade-time, -webkit-box-shadow, $fade-time, border-color, $fade-time, ease-in-out;
|
109
|
+
-moz-transition: box-shadow, $fade-time, -moz-box-shadow, $fade-time, -webkit-box-shadow, $fade-time, border-color, $fade-time, ease-in-out;
|
110
|
+
transition: box-shadow, $fade-time, -moz-box-shadow, $fade-time, -webkit-box-shadow, $fade-time, border-color, $fade-time, ease-in-out;
|
111
|
+
|
112
|
+
&:#{$selector} {
|
113
|
+
-webkit-box-shadow: 0 0 5px $glowing-effect-color;
|
114
|
+
-moz-box-shadow: 0 0 5px $glowing-effect-color;
|
115
|
+
box-shadow: 0 0 5px $glowing-effect-color;
|
116
|
+
border-color: $glowing-effect-color;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
//
|
121
|
+
// Foundation Variables
|
122
|
+
//
|
123
|
+
|
124
|
+
// The default font-size is set to 100% of the browser style sheet (usually 16px)
|
125
|
+
// for compatibility with brower-based text zoom or user-set defaults.
|
126
|
+
|
127
|
+
// Since the typical default browser font-size is 16px, that makes the calculation for grid size.
|
128
|
+
// If you want your base font-size to be different and not have it effect the grid breakpoints,
|
129
|
+
// set $em-base to $base-font-size and make sure $base-font-size is a px value.
|
130
|
+
$base-font-size: 100% !default;
|
131
|
+
|
132
|
+
// $base-line-height is 24px while $base-font-size is 16px
|
133
|
+
$base-line-height: 150% !default;
|
134
|
+
|
135
|
+
// This is the default html and body font-size for the base em value.
|
136
|
+
$em-base: 16px !default;
|
137
|
+
|
138
|
+
// Working in ems is annoying. Think in pixels by using this handy function, emCalc(#px)
|
139
|
+
@function emCalc($pxWidth) {
|
140
|
+
@return $pxWidth / $em-base * 1em;
|
141
|
+
}
|
142
|
+
|
143
|
+
// Maybe you want to create rems and pixels
|
144
|
+
// @function remCalc($pxWidth) {
|
145
|
+
// @return $pxWidth / $em-base * 1rem;
|
146
|
+
// }
|
147
|
+
|
148
|
+
// We use these to control various global styles
|
149
|
+
$body-bg: #fff !default;
|
150
|
+
$body-font-color: #222 !default;
|
151
|
+
$body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default;
|
152
|
+
$body-font-weight: normal !default;
|
153
|
+
$body-font-style: normal !default;
|
154
|
+
|
155
|
+
// We use this to control font-smoothing
|
156
|
+
$font-smoothing: antialiased !default;
|
157
|
+
|
158
|
+
// We use these to control text direction settings
|
159
|
+
$text-direction: ltr !default;
|
160
|
+
|
161
|
+
// NOTE: No need to change this conditional statement, $text-direction variable controls it all.
|
162
|
+
$default-float: left !default;
|
163
|
+
$opposite-direction: right !default;
|
164
|
+
@if $text-direction == ltr {
|
165
|
+
$default-float: left;
|
166
|
+
$opposite-direction: right;
|
167
|
+
} @else {
|
168
|
+
$default-float: right;
|
169
|
+
$opposite-direction: left;
|
170
|
+
}
|
171
|
+
|
172
|
+
// We use these as default colors throughout
|
173
|
+
$primary-color: #2ba6cb !default;
|
174
|
+
$secondary-color: #e9e9e9 !default;
|
175
|
+
$alert-color: #c60f13 !default;
|
176
|
+
$success-color: #5da423 !default;
|
177
|
+
|
178
|
+
// We use these to make sure border radius matches unless we want it different.
|
179
|
+
$global-radius: 3px !default;
|
180
|
+
$global-rounded: 1000px !default;
|
181
|
+
|
182
|
+
// We use these to control inset shadow shiny edges and depressions.
|
183
|
+
$shiny-edge-size: 0 1px 0 !default;
|
184
|
+
$shiny-edge-color: rgba(#fff, .5) !default;
|
185
|
+
$shiny-edge-active-color: rgba(#000, .2) !default;
|
186
|
+
|
187
|
+
// We use this to control whether or not CSS classes come through in the gem files.
|
188
|
+
$include-html-classes: true !default;
|
189
|
+
$include-print-styles: true !default;
|
190
|
+
$include-html-grid-classes: $include-html-classes !default;
|
191
|
+
$include-html-visibility-classes: $include-html-classes !default;
|
192
|
+
$include-html-button-classes: $include-html-classes !default;
|
193
|
+
$include-html-form-classes: $include-html-classes !default;
|
194
|
+
$include-html-media-classes: $include-html-classes !default;
|
195
|
+
$include-html-section-classes: $include-html-classes !default;
|
196
|
+
$include-html-reveal-classes: $include-html-classes !default;
|
197
|
+
$include-html-alert-classes: $include-html-classes !default;
|
198
|
+
$include-html-nav-classes: $include-html-classes !default;
|
199
|
+
$include-html-label-classes: $include-html-classes !default;
|
200
|
+
$include-html-panel-classes: $include-html-classes !default;
|
201
|
+
$include-html-pricing-classes: $include-html-classes !default;
|
202
|
+
$include-html-progress-classes: $include-html-classes !default;
|
203
|
+
$include-html-magellan-classes: $include-html-classes !default;
|
204
|
+
|
205
|
+
// Media Queries
|
206
|
+
$small-screen: emCalc(768px) !default;
|
207
|
+
$medium-screen: emCalc(1280px) !default;
|
208
|
+
$large-screen: emCalc(1440px) !default;
|
209
|
+
|
210
|
+
$screen: "only screen" !default;
|
211
|
+
$small: "only screen and (min-width:"#{$small-screen}")" !default;
|
212
|
+
$medium: "only screen and (min-width:"#{$medium-screen}")" !default;
|
213
|
+
$large: "only screen and (min-width:"#{$large-screen}")" !default;
|
214
|
+
$landscape: "only screen and (orientation: landscape)" !default;
|
215
|
+
$portrait: "only screen and (orientation: portrait)" !default;
|
216
|
+
|
1
217
|
// Set box-sizing globally to handle padding and border widths
|
2
218
|
*,
|
3
219
|
*:before,
|
@@ -17,7 +233,7 @@ body {
|
|
17
233
|
font-family: $body-font-family;
|
18
234
|
font-weight: $body-font-weight;
|
19
235
|
font-style: $body-font-style;
|
20
|
-
line-height: 1;
|
236
|
+
line-height: 1; // Set to $base-line-height to take on browser default of 150%
|
21
237
|
position: relative;
|
22
238
|
}
|
23
239
|
|
@@ -57,7 +273,10 @@ img { -ms-interpolation-mode: bicubic; }
|
|
57
273
|
.antialiased { -webkit-font-smoothing: antialiased; }
|
58
274
|
|
59
275
|
// Get rid of gap under images by making them display: inline-block; by default
|
60
|
-
img {
|
276
|
+
img {
|
277
|
+
display: inline-block;
|
278
|
+
vertical-align: middle;
|
279
|
+
}
|
61
280
|
|
62
281
|
//
|
63
282
|
// Global resets for forms
|
@@ -67,4 +286,4 @@ img { display: inline-block; }
|
|
67
286
|
textarea { height: auto; min-height: 50px; }
|
68
287
|
|
69
288
|
// Make select elements 100% width by default
|
70
|
-
select { width: 100%; }
|
289
|
+
select { width: 100%; }
|
@@ -5,6 +5,14 @@ $row-width: emCalc(1000px) !default;
|
|
5
5
|
$column-gutter: emCalc(30px) !default;
|
6
6
|
$total-columns: 12 !default;
|
7
7
|
|
8
|
+
//
|
9
|
+
// Grid Function
|
10
|
+
//
|
11
|
+
|
12
|
+
@function gridCalc($colNumber, $totalColumns) {
|
13
|
+
@return percentage(($colNumber / $totalColumns));
|
14
|
+
}
|
15
|
+
|
8
16
|
//
|
9
17
|
// Grid Mixins
|
10
18
|
//
|
@@ -53,14 +61,21 @@ $total-columns: 12 !default;
|
|
53
61
|
|
54
62
|
|
55
63
|
// For creating columns - @include these inside a media query to control small vs. large grid layouts
|
56
|
-
@mixin grid-column($columns:false, $last-column:false, $center:false, $offset:false, $push:false, $pull:false, $collapse:false, $float
|
64
|
+
@mixin grid-column($columns:false, $last-column:false, $center:false, $offset:false, $push:false, $pull:false, $collapse:false, $float:true) {
|
57
65
|
|
58
66
|
position: relative;
|
59
67
|
|
68
|
+
// If collapsed, get rid of gutter padding
|
69
|
+
@if $collapse {
|
70
|
+
padding-left: 0;
|
71
|
+
padding-right: 0;
|
72
|
+
}
|
73
|
+
|
60
74
|
// Gutter padding whenever a column isn't set to collapse
|
61
|
-
|
62
|
-
|
63
|
-
padding
|
75
|
+
// (use $collapse:null to do nothing)
|
76
|
+
@else if $collapse == false {
|
77
|
+
padding-left: $column-gutter / 2;
|
78
|
+
padding-right: $column-gutter / 2;
|
64
79
|
}
|
65
80
|
|
66
81
|
// If a column number is given, calculate width
|
@@ -69,14 +84,8 @@ $total-columns: 12 !default;
|
|
69
84
|
|
70
85
|
// If last column, float naturally instead of to the right
|
71
86
|
@if $last-column { float: $opposite-direction; }
|
72
|
-
|
73
|
-
// if collapsed, get rid of gutter padding
|
74
|
-
@else if $collapse { padding-#{$default-float}: 0; padding-#{$opposite-direction}: 0; }
|
75
|
-
|
76
87
|
}
|
77
88
|
|
78
|
-
@if $collapse { padding-#{$default-float}: 0; padding-#{$opposite-direction}: 0; }
|
79
|
-
|
80
89
|
// If offset, calculate appropriate margins
|
81
90
|
@if $offset { margin-#{$default-float}: gridCalc($offset, $total-columns); }
|
82
91
|
|
@@ -92,7 +101,7 @@ $total-columns: 12 !default;
|
|
92
101
|
}
|
93
102
|
|
94
103
|
@if $float {
|
95
|
-
@if $float == left or true { float: $default-float; }
|
104
|
+
@if $float == left or $float == true { float: $default-float; }
|
96
105
|
@else if $float == right { float: $opposite-direction; }
|
97
106
|
@else { float: none; }
|
98
107
|
}
|
@@ -101,14 +110,11 @@ $total-columns: 12 !default;
|
|
101
110
|
|
102
111
|
|
103
112
|
/* Grid HTML Classes */
|
104
|
-
@if $include-html-grid-classes {
|
113
|
+
@if $include-html-grid-classes != false {
|
105
114
|
|
106
115
|
.row {
|
107
116
|
@include grid-row;
|
108
117
|
|
109
|
-
.column,
|
110
|
-
.columns { @include grid-column($columns:$total-columns); }
|
111
|
-
|
112
118
|
&.collapse {
|
113
119
|
.column,
|
114
120
|
.columns { @include grid-column($collapse:true); }
|
@@ -119,17 +125,20 @@ $total-columns: 12 !default;
|
|
119
125
|
}
|
120
126
|
}
|
121
127
|
|
128
|
+
.column,
|
129
|
+
.columns { @include grid-column($columns:$total-columns); }
|
130
|
+
|
122
131
|
@media only screen {
|
123
132
|
|
124
|
-
.
|
125
|
-
.
|
133
|
+
.column,
|
134
|
+
.columns { @include grid-column($columns:false); }
|
126
135
|
|
127
136
|
@for $i from 1 through $total-columns {
|
128
|
-
.
|
137
|
+
.small#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
|
129
138
|
}
|
130
139
|
|
131
140
|
@for $i from 1 through $total-columns - 2 {
|
132
|
-
.
|
141
|
+
.small-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
|
133
142
|
}
|
134
143
|
|
135
144
|
[class*="column"] + [class*="column"]:last-child { float: $opposite-direction; }
|
@@ -143,26 +152,33 @@ $total-columns: 12 !default;
|
|
143
152
|
@media #{$small} {
|
144
153
|
|
145
154
|
@for $i from 1 through $total-columns {
|
146
|
-
.
|
155
|
+
.large#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
|
147
156
|
}
|
148
157
|
|
149
|
-
@for $i from 1 through $total-columns -
|
158
|
+
@for $i from 1 through $total-columns - 1 {
|
150
159
|
.row .large-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
|
151
160
|
}
|
152
161
|
|
153
|
-
@for $i from
|
162
|
+
@for $i from 1 through $total-columns - 1 {
|
154
163
|
.push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
|
155
164
|
.pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
|
156
165
|
}
|
157
166
|
|
158
|
-
@for $i from
|
167
|
+
@for $i from 1 through $total-columns - 1 {
|
159
168
|
.small-push#{-$i} { #{$default-float}: inherit; }
|
160
169
|
.small-pull#{-$i} { #{$opposite-direction}: inherit; }
|
161
170
|
}
|
162
171
|
|
172
|
+
.column.small-centered,
|
173
|
+
.columns.small-centered {
|
174
|
+
margin-#{$default-float}: 0;
|
175
|
+
margin-#{$opposite-direction}: 0;
|
176
|
+
float: $default-float !important;
|
177
|
+
}
|
178
|
+
|
163
179
|
.column.large-centered,
|
164
180
|
.columns.large-centered { @include grid-column($center:true, $collapse:null, $float:false); }
|
165
181
|
|
166
182
|
}
|
167
183
|
|
168
|
-
}
|
184
|
+
}
|