susy 1.0.9 → 2.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.mkdn +0 -27
- data/README.md +4 -87
- data/docs/BUGS.md +2 -0
- data/docs/Gemfile.lock +142 -0
- data/docs/README.md +54 -0
- data/docs/config.rb +120 -0
- data/docs/lib/guide_helpers.rb +19 -0
- data/docs/source/apple-touch-icon-114x114-precomposed.png +0 -0
- data/docs/source/apple-touch-icon-144x144-precomposed.png +0 -0
- data/docs/source/apple-touch-icon-72x72-precomposed.png +0 -0
- data/docs/source/apple-touch-icon-precomposed.png +0 -0
- data/docs/source/demos/grid-types.html.md +263 -0
- data/docs/source/demos/index.html.md +23 -0
- data/docs/source/demos/magic.html.md +320 -0
- data/docs/source/favicon.ico +0 -0
- data/docs/source/fonts/@Font-Face License.txt +18 -0
- data/docs/source/fonts/Baskerville-amp-webfont.eot +0 -0
- data/docs/source/fonts/Baskerville-amp-webfont.svg +241 -0
- data/docs/source/fonts/Baskerville-amp-webfont.ttf +0 -0
- data/docs/source/fonts/Baskerville-amp-webfont.woff +0 -0
- data/docs/source/fonts/CenturyOldStyle-Bold-webfont.eot +0 -0
- data/docs/source/fonts/CenturyOldStyle-Bold-webfont.svg +240 -0
- data/docs/source/fonts/CenturyOldStyle-Bold-webfont.ttf +0 -0
- data/docs/source/fonts/CenturyOldStyle-Bold-webfont.woff +0 -0
- data/docs/source/fonts/CenturyOldStyle-Italic-webfont.eot +0 -0
- data/docs/source/fonts/CenturyOldStyle-Italic-webfont.svg +240 -0
- data/docs/source/fonts/CenturyOldStyle-Italic-webfont.ttf +0 -0
- data/docs/source/fonts/CenturyOldStyle-Italic-webfont.woff +0 -0
- data/docs/source/fonts/CenturyOldStyle-Regular-webfont.eot +0 -0
- data/docs/source/fonts/CenturyOldStyle-Regular-webfont.svg +240 -0
- data/docs/source/fonts/CenturyOldStyle-Regular-webfont.ttf +0 -0
- data/docs/source/fonts/CenturyOldStyle-Regular-webfont.woff +0 -0
- data/docs/source/fonts/CenturyOldStyleCaps-Regular-webfont.eot +0 -0
- data/docs/source/fonts/CenturyOldStyleCaps-Regular-webfont.svg +240 -0
- data/docs/source/fonts/CenturyOldStyleCaps-Regular-webfont.ttf +0 -0
- data/docs/source/fonts/CenturyOldStyleCaps-Regular-webfont.woff +0 -0
- data/docs/source/fonts/FranklinGothic-Book-webfont.eot +0 -0
- data/docs/source/fonts/FranklinGothic-Book-webfont.svg +240 -0
- data/docs/source/fonts/FranklinGothic-Book-webfont.ttf +0 -0
- data/docs/source/fonts/FranklinGothic-Book-webfont.woff +0 -0
- data/docs/source/fonts/FranklinGothic-BookIt-webfont.eot +0 -0
- data/docs/source/fonts/FranklinGothic-BookIt-webfont.svg +240 -0
- data/docs/source/fonts/FranklinGothic-BookIt-webfont.ttf +0 -0
- data/docs/source/fonts/FranklinGothic-BookIt-webfont.woff +0 -0
- data/docs/source/fonts/FranklinGothic-Cd-webfont.eot +0 -0
- data/docs/source/fonts/FranklinGothic-Cd-webfont.svg +240 -0
- data/docs/source/fonts/FranklinGothic-Cd-webfont.ttf +0 -0
- data/docs/source/fonts/FranklinGothic-Cd-webfont.woff +0 -0
- data/docs/source/fonts/FranklinGothic-CdIt-webfont.eot +0 -0
- data/docs/source/fonts/FranklinGothic-CdIt-webfont.svg +240 -0
- data/docs/source/fonts/FranklinGothic-CdIt-webfont.ttf +0 -0
- data/docs/source/fonts/FranklinGothic-CdIt-webfont.woff +0 -0
- data/docs/source/fonts/FranklinGothic-Med-webfont.eot +0 -0
- data/docs/source/fonts/FranklinGothic-Med-webfont.svg +240 -0
- data/docs/source/fonts/FranklinGothic-Med-webfont.ttf +0 -0
- data/docs/source/fonts/FranklinGothic-Med-webfont.woff +0 -0
- data/docs/source/fonts/FranklinGothic-MedCd-webfont.eot +0 -0
- data/docs/source/fonts/FranklinGothic-MedCd-webfont.svg +240 -0
- data/docs/source/fonts/FranklinGothic-MedCd-webfont.ttf +0 -0
- data/docs/source/fonts/FranklinGothic-MedCd-webfont.woff +0 -0
- data/docs/source/fonts/FranklinGothic-MedCdIt-webfont.eot +0 -0
- data/docs/source/fonts/FranklinGothic-MedCdIt-webfont.svg +240 -0
- data/docs/source/fonts/FranklinGothic-MedCdIt-webfont.ttf +0 -0
- data/docs/source/fonts/FranklinGothic-MedCdIt-webfont.woff +0 -0
- data/docs/source/fonts/FranklinGothic-MedIt-webfont.eot +0 -0
- data/docs/source/fonts/FranklinGothic-MedIt-webfont.svg +240 -0
- data/docs/source/fonts/FranklinGothic-MedIt-webfont.ttf +0 -0
- data/docs/source/fonts/FranklinGothic-MedIt-webfont.woff +0 -0
- data/docs/source/fonts/License.txt +77 -0
- data/docs/source/fonts/susy.eot +0 -0
- data/docs/source/fonts/susy.svg +69 -0
- data/docs/source/fonts/susy.ttf +0 -0
- data/docs/source/fonts/susy.woff +0 -0
- data/docs/source/guides/getting-started.html.md +277 -0
- data/docs/source/guides/reference.html.md +658 -0
- data/docs/source/guides/upgrade-1-0.html.md +286 -0
- data/docs/source/humans.txt +45 -0
- data/docs/source/images/splash-iphone.png +0 -0
- data/docs/source/images/splash-iphone4.png +0 -0
- data/docs/source/images/splash-landscape.png +0 -0
- data/docs/source/images/splash-portrait.png +0 -0
- data/docs/source/index.html.md +87 -0
- data/docs/source/javascripts/jquery-1.7.1.min.js +4 -0
- data/docs/source/javascripts/jqwidont.js +5 -0
- data/docs/source/javascripts/modernizr-2.5.3.min.js +4 -0
- data/docs/source/javascripts/modernizr.selectors.js +55 -0
- data/docs/source/javascripts/viewport.js +9 -0
- data/docs/source/layouts/grid-types.haml +22 -0
- data/docs/source/layouts/layout.haml +34 -0
- data/docs/source/layouts/magic.haml +28 -0
- data/docs/source/partials/_contentinfo.haml +47 -0
- data/docs/source/partials/_demonav.haml +2 -0
- data/docs/source/partials/_google_analytics.haml +5 -0
- data/docs/source/partials/_head.haml +22 -0
- data/docs/source/partials/_javascripts.haml +4 -0
- data/docs/source/partials/_navigation.haml +15 -0
- data/docs/source/sites-using-susy.html.md +29 -0
- data/docs/source/stylesheets/_base/_base.scss +23 -0
- data/docs/source/stylesheets/_base/_colors.scss +47 -0
- data/docs/source/stylesheets/_base/_size.scss +49 -0
- data/docs/source/stylesheets/_base/_type.scss +19 -0
- data/docs/source/stylesheets/_demos/_demo.scss +28 -0
- data/docs/source/stylesheets/_demos/magic/_layout.scss +39 -0
- data/docs/source/stylesheets/_demos/magic/_style.scss +104 -0
- data/docs/source/stylesheets/_demos/types/_layouts.scss +88 -0
- data/docs/source/stylesheets/_demos/types/_template.scss +57 -0
- data/docs/source/stylesheets/_general/_century-oldstyle.scss +70 -0
- data/docs/source/stylesheets/_general/_font-license.scss +23 -0
- data/docs/source/stylesheets/_general/_fonts.scss +26 -0
- data/docs/source/stylesheets/_general/_franklin-gothic.scss +112 -0
- data/docs/source/stylesheets/_general/_icons.scss +86 -0
- data/docs/source/stylesheets/_general/_root.scss +79 -0
- data/docs/source/stylesheets/_general/_type.scss +114 -0
- data/docs/source/stylesheets/_layout.scss +48 -0
- data/docs/source/stylesheets/_modules/_ag-test.scss +59 -0
- data/docs/source/stylesheets/_modules/_banner.scss +61 -0
- data/docs/source/stylesheets/_modules/_contentinfo.scss +41 -0
- data/docs/source/stylesheets/_modules/_intro.scss +53 -0
- data/docs/source/stylesheets/_modules/_nav.scss +44 -0
- data/docs/source/stylesheets/_modules/_pages.scss +5 -0
- data/docs/source/stylesheets/_modules/_secondary.scss +22 -0
- data/docs/source/stylesheets/_modules/_toggle.scss +40 -0
- data/docs/source/stylesheets/_vendor/pygments/solarized.scss +65 -0
- data/docs/source/stylesheets/grid-types.css.scss +6 -0
- data/docs/source/stylesheets/magic.css.scss +6 -0
- data/docs/source/stylesheets/site.css.scss +27 -0
- data/lib/susy.rb +12 -1
- data/sass/README.md +33 -0
- data/sass/_susy.scss +55 -16
- data/sass/susy/_api.scss +39 -0
- data/sass/susy/_grids.scss +2 -0
- data/sass/susy/_gutters.scss +2 -0
- data/sass/susy/_helpers.scss +14 -0
- data/sass/susy/_language.scss +3 -0
- data/sass/susy/_math.scss +3 -0
- data/sass/susy/api/_float.scss +72 -0
- data/sass/susy/api/_isolation.scss +16 -0
- data/sass/susy/grids/_add.scss +10 -0
- data/sass/susy/grids/_find.scss +10 -0
- data/sass/susy/gutters/_add.scss +10 -0
- data/sass/susy/gutters/_find.scss +10 -0
- data/sass/susy/helpers/_background-grid.scss +65 -0
- data/sass/susy/helpers/_box-sizing.scss +25 -0
- data/sass/susy/helpers/_clearfix.scss +51 -0
- data/sass/susy/helpers/_columns.scss +15 -0
- data/sass/susy/helpers/_find.scss +63 -0
- data/sass/susy/helpers/_sass-lists.scss +71 -0
- data/sass/susy/helpers/_span-shared.scss +9 -0
- data/sass/susy/language/_parse-add.scss +19 -0
- data/sass/susy/language/_parse-list.scss +53 -0
- data/sass/susy/language/_span.scss +20 -0
- data/sass/susy/math/_columns.scss +70 -0
- data/sass/susy/math/_context.scss +3 -0
- data/sass/susy/math/_gutters.scss +11 -0
- data/templates/box-sizing/behaviors/box-sizing/boxsizing.htc +399 -0
- data/templates/box-sizing/behaviors/box-sizing/boxsizing.php +23 -0
- data/templates/box-sizing/manifest.rb +4 -0
- data/templates/project/README.md +59 -0
- data/templates/project/_base.scss +0 -10
- data/templates/project/behaviors/box-sizing/boxsizing.htc +399 -0
- data/templates/project/behaviors/box-sizing/boxsizing.php +23 -0
- data/templates/project/manifest.rb +3 -0
- data/templates/project/screen.scss +0 -8
- metadata +200 -43
- data/Manifest +0 -39
- data/Rakefile +0 -19
- data/VERSION +0 -1
- data/sass/susy/_background.scss +0 -18
- data/sass/susy/_functions.scss +0 -376
- data/sass/susy/_grid.scss +0 -286
- data/sass/susy/_isolation.scss +0 -51
- data/sass/susy/_margin.scss +0 -93
- data/sass/susy/_media.scss +0 -112
- data/sass/susy/_padding.scss +0 -92
- data/sass/susy/_settings.scss +0 -56
- data/sass/susy/_support.scss +0 -198
- data/sass/susy/_units.scss +0 -159
- data/susy.gemspec +0 -35
- data/test/config.rb +0 -10
- data/test/css/background.css +0 -16
- data/test/css/bleed.css +0 -20
- data/test/css/functions.css +0 -7
- data/test/css/grid.css +0 -134
- data/test/css/isolation.css +0 -46
- data/test/css/margin.css +0 -20
- data/test/css/media.css +0 -101
- data/test/css/padding.css +0 -12
- data/test/scss/background.scss +0 -11
- data/test/scss/bleed.scss +0 -19
- data/test/scss/functions.scss +0 -15
- data/test/scss/grid.scss +0 -77
- data/test/scss/isolation.scss +0 -19
- data/test/scss/margin.scss +0 -27
- data/test/scss/media.scss +0 -50
- data/test/scss/padding.scss +0 -19
data/sass/susy/_grid.scss
DELETED
@@ -1,286 +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;
|
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
|
-
}
|
data/sass/susy/_isolation.scss
DELETED
@@ -1,51 +0,0 @@
|
|
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
|
-
@else { clear: none; }
|
46
|
-
|
47
|
-
$location: $location + $columns;
|
48
|
-
@if $location > $context { $location: 1; }
|
49
|
-
}
|
50
|
-
}
|
51
|
-
}
|
data/sass/susy/_margin.scss
DELETED
@@ -1,93 +0,0 @@
|
|
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
|
-
}
|
data/sass/susy/_media.scss
DELETED
@@ -1,112 +0,0 @@
|
|
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
|
-
}
|