rapido-css 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. data/README.mkdn +21 -0
  2. data/lib/rapido-css.rb +3 -0
  3. data/stylesheets/_components.scss +24 -0
  4. data/stylesheets/_default-styles.scss +480 -0
  5. data/stylesheets/_functions.scss +50 -0
  6. data/stylesheets/_normalize.scss +513 -0
  7. data/stylesheets/_rapido.scss +12 -0
  8. data/stylesheets/_settings.scss +5 -0
  9. data/stylesheets/_susy.scss +16 -0
  10. data/stylesheets/_utilities.scss +8 -0
  11. data/stylesheets/components/_alerts.scss +24 -0
  12. data/stylesheets/components/_breadcrumbs.scss +15 -0
  13. data/stylesheets/components/_button-groups.scss +65 -0
  14. data/stylesheets/components/_buttons.scss +121 -0
  15. data/stylesheets/components/_captions.scss +54 -0
  16. data/stylesheets/components/_close.scss +27 -0
  17. data/stylesheets/components/_dropdowns.scss +190 -0
  18. data/stylesheets/components/_forms.scss +579 -0
  19. data/stylesheets/components/_images.scss +0 -0
  20. data/stylesheets/components/_modals.scss +271 -0
  21. data/stylesheets/components/_navs.scss +102 -0
  22. data/stylesheets/components/_pager.scss +56 -0
  23. data/stylesheets/components/_pagination.scss +90 -0
  24. data/stylesheets/components/_pills.scss +91 -0
  25. data/stylesheets/components/_responsive-navs.scss +166 -0
  26. data/stylesheets/components/_sliders.scss +86 -0
  27. data/stylesheets/components/_tables.scss +109 -0
  28. data/stylesheets/components/_tabs.scss +55 -0
  29. data/stylesheets/components/_type.scss +266 -0
  30. data/stylesheets/settings/_base.scss +32 -0
  31. data/stylesheets/settings/_colors.scss +16 -0
  32. data/stylesheets/settings/_components.scss +45 -0
  33. data/stylesheets/settings/_dimensions.scss +103 -0
  34. data/stylesheets/settings/_effects.scss +15 -0
  35. data/stylesheets/susy/_susy_background.scss +18 -0
  36. data/stylesheets/susy/_susy_functions.scss +376 -0
  37. data/stylesheets/susy/_susy_grid.scss +286 -0
  38. data/stylesheets/susy/_susy_isolation.scss +50 -0
  39. data/stylesheets/susy/_susy_margin.scss +93 -0
  40. data/stylesheets/susy/_susy_media.scss +112 -0
  41. data/stylesheets/susy/_susy_padding.scss +92 -0
  42. data/stylesheets/susy/_susy_settings.scss +56 -0
  43. data/stylesheets/susy/_susy_support.scss +198 -0
  44. data/stylesheets/susy/_susy_units.scss +159 -0
  45. data/stylesheets/utilities/_animations.scss +672 -0
  46. data/stylesheets/utilities/_debug.scss +41 -0
  47. data/stylesheets/utilities/_helper-classes.scss +32 -0
  48. data/stylesheets/utilities/_icon-fonts.scss +111 -0
  49. data/stylesheets/utilities/_media-queries.scss +45 -0
  50. data/stylesheets/utilities/_mixins.scss +372 -0
  51. data/stylesheets/utilities/_retina-sprites.scss +70 -0
  52. data/stylesheets/utilities/_sprites.scss +26 -0
  53. data/templates/project/manifest.rb +2 -0
  54. data/templates/project/screen.scss +2 -0
  55. metadata +116 -0
@@ -0,0 +1,286 @@
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;
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
+ ){
27
+ $width: container-outer-width($columns);
28
+
29
+ @if $style == 'static' {
30
+ @include if-rem(width, $width);
31
+ } @else {
32
+ @if $style == 'fluid' {
33
+ @if unit($width) == '%' { @include if-rem(width, $width); }
34
+ } @else {
35
+ @include if-rem(max-width, $width);
36
+ @if $legacy-support-for-ie6 {
37
+ @if unit($width) == 'rem' {
38
+ _width: round(convert-length($width, px));
39
+ } @else {
40
+ _width: $width;
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ // Set the outer grid-containing element(s).
48
+ //
49
+ // $columns : The number of columns in the container.
50
+ @mixin apply-container(
51
+ $columns : $total-columns
52
+ ){
53
+ @include pie-clearfix;
54
+ @include set-container-width($columns);
55
+ @include if-rem(padding-left, $grid-padding);
56
+ @include if-rem(padding-right, $grid-padding);
57
+ margin: { left: auto; right: auto; }
58
+ }
59
+
60
+ // Set one or more layouts on a grid-containing element at any number of media-query breakpoints.
61
+ //
62
+ // $media-layout-1 : [default:$total-columns] A list of values including -
63
+ // : One unitless number (representing columns in a layout)
64
+ // : Two optional lengths (representing min and max-width media-query breakpoints).
65
+ // $media-layout-2 ...-10 : [optional] Same as $media-layout-1
66
+ @mixin container(
67
+ $media-layout-1 : $total-columns,
68
+ $media-layout-2 : false,
69
+ $media-layout-3 : false,
70
+ $media-layout-4 : false,
71
+ $media-layout-5 : false,
72
+ $media-layout-6 : false,
73
+ $media-layout-7 : false,
74
+ $media-layout-8 : false,
75
+ $media-layout-9 : false,
76
+ $media-layout-10 : false
77
+ ){
78
+ $media-layouts : compact($media-layout-2,$media-layout-3,$media-layout-4,$media-layout-5,$media-layout-6,$media-layout-7,$media-layout-8,$media-layout-9,$media-layout-10);
79
+
80
+ @if is-default-layout($media-layout-1) {
81
+ @include apply-container();
82
+ } @else {
83
+ @include at-breakpoint($media-layout-1) {
84
+ @include apply-container();
85
+ }
86
+ }
87
+
88
+ @each $ml in $media-layouts {
89
+ @if $ml {
90
+ @include at-breakpoint($ml) {
91
+ @include set-container-width;
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ // ---------------------------------------------------------------------------
98
+ // Columns
99
+
100
+ // Create a grid element spanning any number of 'columns' in a grid 'context'.
101
+ // $columns : The number of columns to span.
102
+ // $context : [optional] The context (columns spanned by parent).
103
+ // : Context is required on any nested elements.
104
+ // : Context MUST NOT be declared on a root element.
105
+ // $padding : [optional] Padding applied to the inside of individual grid columns.
106
+ // : Padding is only output if one or two values are specified (e.g. 1em or 10px 20px)
107
+ // : Padding values are applied only on the horizontal axis in from-to order
108
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
109
+ // $style : The container style to use.
110
+ @mixin span-columns(
111
+ $columns,
112
+ $context : $total-columns,
113
+ $padding : false,
114
+ $from : $from-direction,
115
+ $style : fix-static-misalignment()
116
+ ) {
117
+ $from : unquote($from);
118
+ $to : opposite-position($from);
119
+ $pos : split-columns-value($columns,position);
120
+ $cols : split-columns-value($columns,columns);
121
+ $pad-from : if($style == static, 0 * $gutter-width, relative-width(0 * $gutter-width, $context));
122
+ $pad-to : if($style == static, 0 * $gutter-width, relative-width(0 * $gutter-width, $context));
123
+
124
+ @if $padding != false {
125
+ $pad-from : nth($padding, 1);
126
+
127
+ @if length($padding) > 1 {
128
+ $pad-to: nth($padding, 2);
129
+ } @else {
130
+ $pad-to: $pad-from;
131
+ }
132
+
133
+ $pad-from : if($style == static, $pad-from, relative-width($pad-from, $context));
134
+ $pad-to : if($style == static, $pad-to, relative-width($pad-to, $context));
135
+
136
+ padding-#{$from}: $pad-from;
137
+ padding-#{$to}: $pad-to;
138
+ }
139
+
140
+ width: columns($cols, $context, $style) - if($border-box-sizing, 0, $pad-to + $pad-from);
141
+
142
+ @if ($pos == 'omega') {
143
+ @include omega($from);
144
+ } @else {
145
+ float: $from;
146
+ margin-#{$to}: gutter($context, $style);
147
+ @if $legacy-support-for-ie6 { display: inline; }
148
+ }
149
+ }
150
+
151
+ // Apply to elements spanning the last column, to account for the page edge.
152
+ // Only needed as an override. Normally 'omega' can just be called by `columns`.
153
+ //
154
+ // $from : The start-direction for your document.
155
+ @mixin omega(
156
+ $from : $from-direction
157
+ ) {
158
+ $from : unquote($from);
159
+ $to : opposite-position($from);
160
+ $hack : opposite-position($omega-float);
161
+
162
+ float: $omega-float;
163
+ margin-#{$to}: 0;
164
+
165
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
166
+ *margin-#{$hack}: - $gutter-width;
167
+ @if $legacy-support-for-ie6 { display: inline; }
168
+ }
169
+ }
170
+
171
+ // Shortcut to apply omega to a specific subset of elements.
172
+ //
173
+ // $n : [first | only | last | <equation>]
174
+ // $selector : [child | last-child | of-type | last-of-type ]
175
+ // $from : The start-direction for your document.
176
+ @mixin nth-omega(
177
+ $n : last,
178
+ $selector : child,
179
+ $from : $from-direction
180
+ ) {
181
+ $from : unquote($from);
182
+ $ie: if($n == "first", true, false);
183
+ @include adjust-support-for($ie6: $ie, $ie7: $ie, $ie8: $ie) {
184
+ &:#{format-nth($n,$selector)} { @include omega($from); }
185
+ }
186
+ }
187
+
188
+ // ---------------------------------------------------------------------------
189
+ // Resets
190
+
191
+ // Reset a '+columns' grid element to default block behavior
192
+ //
193
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
194
+ @mixin reset-columns(
195
+ $from: $from-direction
196
+ ) {
197
+ $from : unquote($from);
198
+ $to : opposite-position($from);
199
+ $hack : opposite-position($omega-float);
200
+
201
+ float: none;
202
+ width: auto;
203
+ margin-#{$to}: auto;
204
+
205
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
206
+ *margin-#{$hack}: auto;
207
+ @if $legacy-support-for-ie6 { display: block; }
208
+ }
209
+ }
210
+
211
+ // Apply to elements previously set as omega.
212
+ // This will return floats and margins back to non-omega settigns.
213
+ //
214
+ // $context : [optional] The context (columns spanned by parent).
215
+ // $from : The start-direction for your document.
216
+ // $style : The container style to use.
217
+ @mixin remove-omega(
218
+ $context : $total-columns,
219
+ $from : $from-direction,
220
+ $style : fix-static-misalignment()
221
+ ) {
222
+ $from : unquote($from);
223
+ $to : opposite-position($from);
224
+ $hack : opposite-position($omega-float);
225
+
226
+ float: $from;
227
+ margin-#{$to}: gutter($context, $style);
228
+
229
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
230
+ *margin-#{$hack}: auto;
231
+ }
232
+ }
233
+
234
+ // Shortcut to apply remove-omega to a specific subset of elements.
235
+ //
236
+ // $n : [first | only | last | <equation>]
237
+ // $selector : [child | last-child | of-type | last-of-type ]
238
+ // $context : [optional] The context (columns spanned by parent).
239
+ // $from : The start-direction for your document.
240
+ // $style : The container style to use.
241
+ @mixin remove-nth-omega(
242
+ $n : last,
243
+ $selector : child,
244
+ $context : $total-columns,
245
+ $from : $from-direction,
246
+ $style : fix-static-misalignment()
247
+ ) {
248
+ $from : unquote($from);
249
+ $ie: if($n == "first", true, false);
250
+ @include adjust-support-for($ie6: $ie, $ie7: $ie, $ie8: $ie) {
251
+ &:#{format-nth($n,$selector)} {
252
+ @include remove-omega($context, $from, $style);
253
+ }
254
+ }
255
+ }
256
+
257
+ // ---------------------------------------------------------------------------
258
+ // Change Settings
259
+
260
+ @mixin with-grid-settings(
261
+ $columns: $total-columns,
262
+ $width: $column-width,
263
+ $gutter: $gutter-width,
264
+ $padding: $grid-padding
265
+ ) {
266
+ // keep the defaults around
267
+ $default-columns: $total-columns;
268
+ $default-width: $column-width;
269
+ $default-gutter: $gutter-width;
270
+ $default-padding: $grid-padding;
271
+
272
+ // use the new settings
273
+ $total-columns: $columns;
274
+ $column-width: $width;
275
+ $gutter-width: $gutter;
276
+ $grid-padding: $padding;
277
+
278
+ // apply to contents
279
+ @content;
280
+
281
+ // re-instate the defaults
282
+ $total-columns: $default-columns;
283
+ $column-width: $default-width;
284
+ $gutter-width: $default-gutter;
285
+ $grid-padding: $default-padding;
286
+ }
@@ -0,0 +1,50 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Isolation
3
+
4
+ // Isolate the position of a grid element (use in addition to span-columns)
5
+ //
6
+ // $location : The grid column to isolate in, relative to the container;
7
+ // $context : [optional] The context (columns spanned by parent).
8
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
9
+ @mixin isolate(
10
+ $location,
11
+ $context: $total-columns,
12
+ $from: $from-direction,
13
+ $style: fix-static-misalignment()
14
+ ) {
15
+ $to: opposite-position($from);
16
+ margin-#{$to}: -100%;
17
+ margin-#{$from}: space($location - 1, $context, $style);
18
+ }
19
+
20
+ // Isolate a group of elements in a grid, using nth-child selectors
21
+ //
22
+ // $columns : The column-width of each item on the grid;
23
+ // $context : [optional] The context (columns spanned by parent).
24
+ // $selector : [child | of-type | last-of-type ] (default is 'child')
25
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
26
+ @mixin isolate-grid(
27
+ $columns,
28
+ $context: $total-columns,
29
+ $selector: 'child',
30
+ $from: $from-direction,
31
+ $style: fix-static-misalignment()
32
+ ) {
33
+ $to: opposite-position($from);
34
+ $location: 1;
35
+ $line: floor($context / $columns);
36
+
37
+ @include span-columns($columns, $context, $from: $from, $style: $style);
38
+ margin-#{$to}: -100%;
39
+
40
+ @for $item from 1 through $line {
41
+ $nth: '#{$line}n + #{$item}';
42
+ &:#{format-nth($nth,$selector)} {
43
+ margin-#{$from}: space($location - 1, $context, $style);
44
+ @if $location == 1 { clear: $from; }
45
+
46
+ $location: $location + $columns;
47
+ @if $location > $context { $location: 1; }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,93 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Margin Mixins
3
+
4
+ // Apply 'columns' margin before an element to push it along the grid.
5
+ //
6
+ // $columns : The number of columns to span.
7
+ // $context : [optional] The context (columns spanned by parent).
8
+ // : Context is required on any nested elements.
9
+ // : Context MUST NOT be declared on a root element.
10
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
11
+ // $style : The container style to use.
12
+ @mixin pre(
13
+ $columns,
14
+ $context : $total-columns,
15
+ $from : $from-direction,
16
+ $style : fix-static-misalignment()
17
+ ) {
18
+ $from : unquote($from);
19
+ margin-#{$from}: space($columns, $context, $style);
20
+ }
21
+
22
+ // 'push' is a synonymn for 'pre'
23
+ @mixin push(
24
+ $columns,
25
+ $context : $total-columns,
26
+ $from : $from-direction,
27
+ $style : fix-static-misalignment()
28
+ ) {
29
+ $from : unquote($from);
30
+ @include pre($columns, $context, $from, $style);
31
+ }
32
+
33
+ // Apply negative 'columns' margin before an element to pull it along the grid.
34
+ //
35
+ // $columns : The number of columns to span.
36
+ // $context : [optional] The context (columns spanned by parent).
37
+ // : Context is required on any nested elements.
38
+ // : Context MUST NOT be declared on a root element.
39
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
40
+ // $style : The container style to use.
41
+ @mixin pull(
42
+ $columns,
43
+ $context : $total-columns,
44
+ $from : $from-direction,
45
+ $style : fix-static-misalignment()
46
+ ) {
47
+ $from : unquote($from);
48
+ margin-#{$from}: 0 - space($columns, $context, $style);
49
+ }
50
+
51
+ // Apply 'columns' margin after an element to contain it in a grid.
52
+ //
53
+ // $columns : The number of columns to span.
54
+ // $context : [optional] The context (columns spanned by parent).
55
+ // : Context is required on any nested elements.
56
+ // : Context MUST NOT be declared on a root element.
57
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
58
+ // $style : The container style to use.
59
+ @mixin post(
60
+ $columns,
61
+ $context : $total-columns,
62
+ $from : $from-direction,
63
+ $style : fix-static-misalignment()
64
+ ) {
65
+ $from : unquote($from);
66
+ $to : opposite-position($from);
67
+ margin-#{$to}: space($columns, $context, $style);
68
+ }
69
+
70
+ // Apply 'columns' before and/or after an element to contain it on a grid.
71
+ //
72
+ // $pre : The number of columns to add as margin before.
73
+ // $post : The number of columns to add as margin after.
74
+ // $context : [optional] The context (columns spanned by parent).
75
+ // : Context is required on any nested elements.
76
+ // : Context MUST NOT be declared on a root element.
77
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
78
+ // $style : The container style to use.
79
+ @mixin squish(
80
+ $pre : false,
81
+ $post : false,
82
+ $context : $total-columns,
83
+ $from : $from-direction,
84
+ $style : fix-static-misalignment()
85
+ ) {
86
+ $from : unquote($from);
87
+ @if $pre {
88
+ @include pre($pre, $context, $from, $style)
89
+ }
90
+ @if $post {
91
+ @include post($post, $context, $from, $style)
92
+ }
93
+ }
@@ -0,0 +1,112 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Media Mixins
3
+
4
+ // Create a new layout context for (@content) descendants.
5
+ //
6
+ // $layout-cols : a (unitless) number of columns to use for this layout.
7
+ @mixin layout(
8
+ $layout-cols
9
+ ) {
10
+ // store default $total-columns setting for later, then change it.
11
+ $default-layout : $total-columns;
12
+ $total-columns : $layout-cols;
13
+
14
+ // apply children in this new layout context.
15
+ @content;
16
+
17
+ // return to default $total-columns setting.
18
+ $total-columns : $default-layout;
19
+ }
20
+
21
+ // Nest a block of code inside a new media-query and layout context.
22
+ //
23
+ // $media-layout : a list of values [$min $layout $max $ie] including...
24
+ // : - one unitless number (columns in a layout)
25
+ // : - two optional lengths (min and max-width media-query breakpoints).
26
+ // : - one optional boolean or string to trigger fallback support for IE.
27
+ // $font-size : [optional] The base font-size of your layout, if you are using ems.
28
+ // : - defaults to $base-font-size
29
+ @mixin at-breakpoint(
30
+ $media-layout,
31
+ $font-size: $base-font-size
32
+ ) {
33
+ $media-layout : medialayout($media-layout,$font-size);
34
+ $min : nth($media-layout,1);
35
+ $layout : nth($media-layout,2);
36
+ $max : nth($media-layout,3);
37
+ $ie : nth($media-layout,4);
38
+
39
+ @if (not $breakpoint-media-output) and (not $breakpoint-ie-output) and (not $breakpoint-raw-output) {
40
+ @warn "Either $breakpoint-media-output, $breakpoint-ie-output, or $breakpoint-raw-output must be true for at-breakpoint to work.";
41
+ }
42
+
43
+ // We need to have either a min-width breakpoint or a layout in order to proceed.
44
+ @if $min or $layout or $max {
45
+
46
+ // If we don't have a layout, we create one based on the min-width.
47
+ @if not $layout {
48
+ $layout: get-layout($min);
49
+ }
50
+
51
+ // If we still don't have a layout, we have a problem.
52
+ @if $layout {
53
+ // Set our new layout context.
54
+ @include layout($layout) {
55
+ @if $breakpoint-media-output {
56
+ // Capture current state of ie support and set new
57
+ $atbreak-legacy-ie-matrix: capture-legacy-ie-matrix();
58
+ @include set-legacy-ie-support;
59
+
60
+ @if $min and $max {
61
+ // Both $min and $max
62
+ @media (min-width: $min) and (max-width: $max) {
63
+ @content;
64
+ }
65
+ } @else {
66
+ @if (not $min) and (not $max) {
67
+ // Neither $min nor $max:
68
+ // We can create a breakpoint based on the number of columns in the layout.
69
+ $min: fix-ems(container-outer-width($width: false));
70
+ }
71
+ @if $min {
72
+ // Min only:
73
+ @media (min-width: $min) {
74
+ @content;
75
+ }
76
+ } @else {
77
+ // Max only:
78
+ @media (max-width: $max) {
79
+ @content;
80
+ }
81
+ }
82
+ }
83
+ // Return legacy-ie support to original
84
+ @include set-legacy-ie-support($atbreak-legacy-ie-matrix...);
85
+ }
86
+ // Set an IE fallback
87
+ @if $ie and $breakpoint-ie-output {
88
+ @if (type-of($ie) == 'bool') {
89
+ $ie: 'lt-ie9';
90
+ }
91
+ .#{$ie} & {
92
+ $atbreak-experimental-matrix: capture-experimental-matrix();
93
+ @include set-experimental-support($ms: true);
94
+ @content;
95
+ @include set-experimental-support($atbreak-experimental-matrix...);
96
+ }
97
+ }
98
+
99
+ @if $breakpoint-raw-output {
100
+ @content;
101
+ }
102
+ }
103
+ } @else {
104
+ @warn "Something went horribly wrong here. Try adjusting your variables.";
105
+ }
106
+
107
+ } @else {
108
+ @warn "You need to provide either a valid layout (number of columns)
109
+ or a valid media-query min-width breakpoint (length).";
110
+ }
111
+
112
+ }
@@ -0,0 +1,92 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Padding Mixins
3
+
4
+ // add empty colums as padding before an element.
5
+ // $columns : The number of columns to prefix.
6
+ // $context : [optional] The context (columns spanned by parent).
7
+ // : Context is required on any nested elements.
8
+ // : Context MUST NOT be declared on a root element.
9
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
10
+ // $style : The container style to use.
11
+ @mixin prefix(
12
+ $columns,
13
+ $context : $total-columns,
14
+ $from : $from-direction,
15
+ $style : fix-static-misalignment()
16
+ ) {
17
+ $from : unquote($from);
18
+ padding-#{$from}: space($columns, $context, $style);
19
+ }
20
+
21
+ // add empty colums as padding after an element.
22
+ // $columns : The number of columns to suffix.
23
+ // $context : [optional] The context (columns spanned by parent).
24
+ // : Context is required on any nested elements.
25
+ // : Context MUST NOT be declared on a root element.
26
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
27
+ // $style : The container style to use.
28
+ @mixin suffix(
29
+ $columns,
30
+ $context : $total-columns,
31
+ $from : $from-direction,
32
+ $style : fix-static-misalignment()
33
+ ) {
34
+ $from : unquote($from);
35
+ $to : opposite-position($from);
36
+ padding-#{$to}: space($columns, $context, $style);
37
+ }
38
+
39
+ // add empty colums as padding before and after an element.
40
+ // $columns : The number of columns to pad.
41
+ // $context : [optional] The context (columns spanned by parent).
42
+ // : Context is required on any nested elements.
43
+ // : Context MUST NOT be declared on a root element.
44
+ // $from : The start direction of your layout (e.g. 'left' for ltr languages)
45
+ // $style : The container style to use.
46
+ @mixin pad(
47
+ $prefix : false,
48
+ $suffix : false,
49
+ $context : $total-columns,
50
+ $from : $from-direction,
51
+ $style : fix-static-misalignment()
52
+ ) {
53
+ $from : unquote($from);
54
+ @if $prefix {
55
+ @include prefix($prefix, $context, $from, $style);
56
+ }
57
+ @if $suffix {
58
+ @include suffix($suffix, $context, $from, $style);
59
+ }
60
+ }
61
+
62
+ // Bleed into colums with margin/padding on any side of an element.
63
+ // $width : The side of the bleed.
64
+ // : Any unit-length will be used directly.
65
+ // : Any unitless number will be used as a column-count.
66
+ // : Use "2 of 6" format to represent 2 cals in a 6-col nested context.
67
+ // $sides : One or more sides to bleed [ top | right | bottom | left | all ].
68
+ // $style : The container style to use.
69
+ @mixin bleed(
70
+ $width: $grid-padding,
71
+ $sides: left right,
72
+ $style: fix-static-misalignment()
73
+ ) {
74
+ @if $border-box-sizing { @include box-sizing(content-box) }
75
+
76
+ @if type-of($width) == 'list' {
77
+ $width: filter($width, of);
78
+ $width: space(nth($width,1), nth($width,2), $style);
79
+ } @else if unitless($width) {
80
+ $width: space($width, $style: $style);
81
+ }
82
+
83
+ @if $sides == 'all' {
84
+ margin: - $width;
85
+ padding: $width;
86
+ } @else {
87
+ @each $side in $sides {
88
+ margin-#{$side}: - $width;
89
+ padding-#{$side}: $width;
90
+ }
91
+ }
92
+ }
@@ -0,0 +1,56 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Susy Settings
3
+
4
+ // The total number of columns in the grid
5
+ $total-columns : 12 !default;
6
+
7
+ // The width of columns and gutters.
8
+ // These must all be set with the comparable units.
9
+ $column-width : 4em !default;
10
+ $gutter-width : 1em !default;
11
+
12
+ // Padding on the left and right of a Grid Container.
13
+ $grid-padding : $gutter-width !default;
14
+
15
+ // ---------------------------------------------------------------------------
16
+ // Advanced Settings
17
+
18
+ // From Direction:
19
+ // Controls for right-to-left or bi-directional sites.
20
+ $from-direction : left !default;
21
+
22
+ // Omega Float Direction:
23
+ // The direction that +omega elements are floated by deafult.
24
+ $omega-float : opposite-position($from-direction) !default;
25
+
26
+ // Container Width:
27
+ // Override the total width of your grid, using any length (50em, 75%, etc.)
28
+ $container-width : false !default;
29
+
30
+ // Container Style:
31
+ // 'magic' - Static (fixed or elastic) when there's enough space,
32
+ // fluid when there isn't. This is the SUSY MAGIC SAUCE(TM).
33
+ // 'static' - Forces the grid container to remain static at all times.
34
+ // 'fluid' - Forces the grid to remain fluid at all times.
35
+ // (this will overrule any static $container-width settings)
36
+ $container-style : magic !default;
37
+
38
+ // Border-Box Sizing
39
+ // Adjust the grid math appropriately for box-sizing: border-box;
40
+ // Warning: This does not actually apply the new box model!
41
+ // In most cases you can ignore this setting,
42
+ // and simply apply the border-box-sizing mixin.
43
+ $border-box-sizing : false !default;
44
+
45
+ // ---------------------------------------------------------------------------
46
+ // IE Settings
47
+
48
+ // When you are using a seperate IE stylesheet,
49
+ // you can use these settings to control the output of at-breakpoint.
50
+ // By default, at-breakpoint will output media-queries as well as
51
+ // any defined ie-fallback classes.
52
+ $breakpoint-media-output : true !default;
53
+ $breakpoint-ie-output : true !default;
54
+
55
+ // Danger Zone! Only set as 'true' in IE-specific style sheets.
56
+ $breakpoint-raw-output : false !default;