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/_api.scss
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
@mixin grid-span($span, $location, $context: false, $gutter: false, $output-style: $output) {
|
2
|
+
|
3
|
+
@if $output-style == 'float' {
|
4
|
+
@include output-float($span, $location, $context, $gutter);
|
5
|
+
}
|
6
|
+
@else if $output-style == 'isolation' {
|
7
|
+
@include output-isolation($span, $location, $context, $gutter);
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin push($span, $location, $context: false, $gutter: false, $output-style: $output) {
|
12
|
+
|
13
|
+
@if $output-style == 'float' {
|
14
|
+
@include push-float($span, $location, $context, $gutter);
|
15
|
+
}
|
16
|
+
@else if $output-style == 'isolation' {
|
17
|
+
@include push-isolation($span, $location, $context, $gutter);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
@mixin pull($span, $location, $context: false, $gutter: false, $output-style: $output) {
|
22
|
+
|
23
|
+
@if $output-style == 'float' {
|
24
|
+
@include pull-float($span, $location, $context, $gutter);
|
25
|
+
}
|
26
|
+
@else if $output-style == 'isolation' {
|
27
|
+
@include pull-isolation($span, $location, $context, $gutter);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
@mixin isolate($span, $location, $context: false, $gutter: false, $output-style: $output) {
|
32
|
+
|
33
|
+
@if $output-style == 'float' {
|
34
|
+
@include isolate-float($span, $location, $context, $gutter);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
@import "api/float";
|
39
|
+
@import "api/isolation";
|
@@ -0,0 +1,14 @@
|
|
1
|
+
//////////////////////////////
|
2
|
+
// Code Helpers
|
3
|
+
//////////////////////////////
|
4
|
+
@import "helpers/find";
|
5
|
+
@import "helpers/sass-lists";
|
6
|
+
@import "helpers/columns";
|
7
|
+
@import "helpers/clearfix";
|
8
|
+
@import "helpers/box-sizing";
|
9
|
+
@import "helpers/span-shared";
|
10
|
+
|
11
|
+
//////////////////////////////
|
12
|
+
// UI Helpers
|
13
|
+
//////////////////////////////
|
14
|
+
@import "helpers/background-grid";
|
@@ -0,0 +1,72 @@
|
|
1
|
+
@mixin output-float($span, $location, $columns, $gutter) {
|
2
|
+
|
3
|
+
$location-holder: $location;
|
4
|
+
|
5
|
+
@if type-of($location) == string {
|
6
|
+
@if end-row($span, $location, $columns) {
|
7
|
+
$grid-length: length(find-grid($columns));
|
8
|
+
$location-holder: $grid-length - $span;
|
9
|
+
}
|
10
|
+
@else {
|
11
|
+
$location-holder: 1;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
$gutter: find-gutter($gutter);
|
16
|
+
|
17
|
+
width: column-span($span, $location-holder, $columns, $gutter);
|
18
|
+
clear: right;
|
19
|
+
// @include clearfix;
|
20
|
+
|
21
|
+
@if end-row($span, $location, $columns) {
|
22
|
+
float: right;
|
23
|
+
}
|
24
|
+
@else {
|
25
|
+
float: left;
|
26
|
+
margin-right: gutter-span($gutter, $columns);
|
27
|
+
}
|
28
|
+
|
29
|
+
@include span-shared;
|
30
|
+
}
|
31
|
+
|
32
|
+
@mixin push-float($span, $location, $columns: false, $gutter: false) {
|
33
|
+
|
34
|
+
@if type-of($location) == string {
|
35
|
+
$location: 1;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Find the columns and gutters
|
39
|
+
$columns: find-grid($columns);
|
40
|
+
$gutter: find-gutter($gutter);
|
41
|
+
|
42
|
+
// Combine the columns and gutters
|
43
|
+
$gutter: column-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns);
|
44
|
+
|
45
|
+
margin-left: $gutter;
|
46
|
+
}
|
47
|
+
|
48
|
+
@mixin pull-float($span, $location, $columns: false, $gutter: false) {
|
49
|
+
|
50
|
+
@if type-of($location) == string {
|
51
|
+
$location: 1;
|
52
|
+
}
|
53
|
+
|
54
|
+
// Find the columns and gutters
|
55
|
+
$columns: find-grid($columns);
|
56
|
+
$gutter: find-gutter($gutter);
|
57
|
+
|
58
|
+
// Combine the columns and gutters
|
59
|
+
$gutter: (column-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns)) * -1;
|
60
|
+
|
61
|
+
margin-left: $gutter;
|
62
|
+
}
|
63
|
+
|
64
|
+
@mixin isolate-float($span, $location, $columns: false, $gutter: false) {
|
65
|
+
|
66
|
+
// Find the columns and gutters
|
67
|
+
$columns: find-grid($columns);
|
68
|
+
$gutter: find-gutter($gutter);
|
69
|
+
|
70
|
+
@include push-float($span, $location, $columns, $gutter);
|
71
|
+
margin-right: -100%;
|
72
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@mixin output-isolation($span, $location, $columns, $gutter) {
|
2
|
+
@include output-float($span, $location, $columns, $gutter);
|
3
|
+
|
4
|
+
@if not end-row($span, $location, $columns) {
|
5
|
+
@include isolate-float($location - 1, 1, $columns, $gutter);
|
6
|
+
}
|
7
|
+
|
8
|
+
}
|
9
|
+
|
10
|
+
@mixin push-isolation($span, $location, $columns: false, $gutter: false) {
|
11
|
+
@include push-float($span, $location, $columns, $gutter);
|
12
|
+
}
|
13
|
+
|
14
|
+
@mixin pull-isolation($span, $location, $columns: false, $gutter: false) {
|
15
|
+
@include pull-float($span, $location, $columns, $gutter);
|
16
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
//////////////////////////////
|
2
|
+
// Find Grid
|
3
|
+
//
|
4
|
+
// Finds the grid that you are on.
|
5
|
+
// From Singularity
|
6
|
+
// Must be using Breakpoint to work properly
|
7
|
+
//////////////////////////////
|
8
|
+
@function find-grid($user-columns: false) {
|
9
|
+
@return find-object($grids, $user-columns);
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
@function add-gutter($gutter-definition) {
|
2
|
+
$parsed: parse-add($gutter-definition);
|
3
|
+
|
4
|
+
@if nth($parsed, 2) == false and length($gutters) == 0 {
|
5
|
+
@return nth($parsed, 1);
|
6
|
+
}
|
7
|
+
@else {
|
8
|
+
@return append($gutters, (nth($parsed, 1) nth($parsed, 2)), 'comma');
|
9
|
+
}
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
//////////////////////////////
|
2
|
+
// Find gutter
|
3
|
+
//
|
4
|
+
// Finds the gutter that you are on.
|
5
|
+
// From Singularity
|
6
|
+
// Must be using Breakpoint to work properly
|
7
|
+
//////////////////////////////
|
8
|
+
@function find-gutter($user-gutter: false) {
|
9
|
+
@return find-object($gutters, $user-gutter);
|
10
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
@import "compass/css3/images";
|
2
|
+
|
3
|
+
@mixin background-grid($columns: false, $gutter: false, $color: rgba(#69aedb, .5)) {
|
4
|
+
|
5
|
+
$background-length: length($grids);
|
6
|
+
|
7
|
+
@if not ($columns) {
|
8
|
+
@for $i from 1 through $background-length {
|
9
|
+
@if $i == 1 {
|
10
|
+
@include background-build($columns, $gutter, $color);
|
11
|
+
}
|
12
|
+
@else {
|
13
|
+
$mq: nth(nth($grids, $i), 2);
|
14
|
+
|
15
|
+
$grid: nth(nth($grids, $i), 1);
|
16
|
+
@include breakpoint($mq) {
|
17
|
+
@include background-build($grid, $gutter, $color);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
@mixin background-build($columns, $gutter, $color) {
|
25
|
+
$columns: find-grid($columns);
|
26
|
+
$gutter: find-gutter($gutter);
|
27
|
+
|
28
|
+
$stops: background-gradient-stops($columns, $gutter, $color);
|
29
|
+
|
30
|
+
@include background(
|
31
|
+
linear-gradient(
|
32
|
+
left, $stops
|
33
|
+
)
|
34
|
+
);
|
35
|
+
}
|
36
|
+
|
37
|
+
//////////////////////////////
|
38
|
+
// Get the stops of the gradient
|
39
|
+
//////////////////////////////
|
40
|
+
@function background-gradient-stops($columns, $gutter, $color) {
|
41
|
+
$bkg: ();
|
42
|
+
$count: column-count($columns);
|
43
|
+
|
44
|
+
@for $i from 1 through column-count($columns) {
|
45
|
+
$bkg: join($bkg, background-column-gradient($i, $columns, $gutter, $color), comma);
|
46
|
+
}
|
47
|
+
|
48
|
+
@return $bkg;
|
49
|
+
}
|
50
|
+
|
51
|
+
//////////////////////////////
|
52
|
+
// Get the columns
|
53
|
+
//////////////////////////////
|
54
|
+
@function background-column-gradient($location, $columns, $gutter, $color) {
|
55
|
+
|
56
|
+
@if $location == 1 {
|
57
|
+
@return $color 0%, $color column-span(1, 1, $columns), transparentize($color, 1) column-span(1, 1, $columns);
|
58
|
+
}
|
59
|
+
@if $location == column-count($columns) {
|
60
|
+
@return transparentize($color, 1) column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color 100%;
|
61
|
+
}
|
62
|
+
@if $location > 1 {
|
63
|
+
@return transparentize($color, 1) column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location, 1, $columns), transparentize($color, 1) column-span($location, 1, $columns);
|
64
|
+
}
|
65
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
@import "compass/css3/shared";
|
2
|
+
|
3
|
+
@mixin box-sizing($bs) {
|
4
|
+
$bs: unquote($bs);
|
5
|
+
@include experimental(box-sizing, $bs,
|
6
|
+
-moz, -webkit, not -o, not -ms, not -khtml, official
|
7
|
+
);
|
8
|
+
|
9
|
+
@if $bs == 'border-box' {
|
10
|
+
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
11
|
+
*behavior: url("../behaviors/box-sizing/boxsizing.php");
|
12
|
+
}
|
13
|
+
}
|
14
|
+
@else {
|
15
|
+
*behavior: none;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
%border-box {
|
20
|
+
@include box-sizing('border-box');
|
21
|
+
}
|
22
|
+
|
23
|
+
%content-box {
|
24
|
+
@include box-sizing('content-box');
|
25
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
$legacy-support-for-ie6: false !default;
|
2
|
+
$legacy-support-for-ie7: false !default;
|
3
|
+
$legacy-support-for-mozilla: false !default;
|
4
|
+
|
5
|
+
@mixin clearfix {
|
6
|
+
@if $legacy-support-for-ie6 and $legacy-support-for-ie7 and not $legacy-support-for-mozilla {
|
7
|
+
/* for IE 6/7 */
|
8
|
+
*zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif");
|
9
|
+
/* non-JS fallback */
|
10
|
+
*zoom: 1;
|
11
|
+
|
12
|
+
&:before,
|
13
|
+
&:after {
|
14
|
+
content: "";
|
15
|
+
display: table;
|
16
|
+
}
|
17
|
+
|
18
|
+
&:after {
|
19
|
+
clear: both;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
@else if $legacy-support-for-ie6 and $legacy-support-for-ie7 and $legacy-support-for-mozilla {
|
23
|
+
/* for IE 6/7 */
|
24
|
+
*zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif");
|
25
|
+
/* non-JS fallback */
|
26
|
+
*zoom: 1;
|
27
|
+
|
28
|
+
&:before,
|
29
|
+
&:after {
|
30
|
+
content: ".";
|
31
|
+
display: block;
|
32
|
+
height: 0;
|
33
|
+
overflow: hidden;
|
34
|
+
}
|
35
|
+
|
36
|
+
&:after {
|
37
|
+
clear: both;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
@else {
|
41
|
+
&:after {
|
42
|
+
content: "";
|
43
|
+
display: table;
|
44
|
+
clear: both;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
%clearfix {
|
50
|
+
@include clearfix;
|
51
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
@function end-row($span, $location, $columns) {
|
2
|
+
$columns: find-grid($columns);
|
3
|
+
|
4
|
+
@if $location == 'last' or $location == 'omega' {
|
5
|
+
@return true;
|
6
|
+
}
|
7
|
+
@else {
|
8
|
+
@if $location + ($span - 1) == column-count($columns) {
|
9
|
+
@return true;
|
10
|
+
}
|
11
|
+
@else {
|
12
|
+
@return false;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
//////////////////////////////
|
2
|
+
// Find Object
|
3
|
+
//
|
4
|
+
// Finds relevant object
|
5
|
+
// From Singularity
|
6
|
+
// Must be using Breakpoint to work properly
|
7
|
+
//////////////////////////////
|
8
|
+
@function find-object($haystack, $user-object: false) {
|
9
|
+
$length: length($haystack);
|
10
|
+
|
11
|
+
@if $user-object != false {
|
12
|
+
@return $user-object;
|
13
|
+
}
|
14
|
+
@else if $length > 1 {
|
15
|
+
$query-min: breakpoint-get-context('min-width');
|
16
|
+
$query-max: breakpoint-get-context('max-width');
|
17
|
+
|
18
|
+
// If we've got a min-width or max-width
|
19
|
+
@if $query-min or $query-max {
|
20
|
+
// Reverse the grid so we can step through it
|
21
|
+
$reverse-haystack: ();
|
22
|
+
@for $i from 2 through $length {
|
23
|
+
$reverse-haystack: append($reverse-haystack, nth($haystack, $i), comma);
|
24
|
+
}
|
25
|
+
$reverse-haystack: reverse($reverse-haystack);
|
26
|
+
$rg-length: $length - 1;
|
27
|
+
|
28
|
+
// Grab the largest and smallest MQs
|
29
|
+
$smallest: nth(nth($haystack, 2), 2);
|
30
|
+
$largest: nth(nth($reverse-haystack, 1), 2);
|
31
|
+
$context: $query-min;
|
32
|
+
|
33
|
+
// @if not ($mobile-first) {
|
34
|
+
// $context: $query-max;
|
35
|
+
// }
|
36
|
+
|
37
|
+
// If it's smallest than the smallest MQ, use the 1st grid
|
38
|
+
@if $context < $smallest {
|
39
|
+
@return nth($haystack, 1);
|
40
|
+
}
|
41
|
+
// If it's larger than or equal to the largest MQ, use the last grid
|
42
|
+
@else if $context >= $largest {
|
43
|
+
@return nth(nth($reverse-haystack, 1), 1);
|
44
|
+
}
|
45
|
+
@else {
|
46
|
+
// Loop through each MQ. If the MQ is greather than or equal to the the MQ in question, use it!
|
47
|
+
@for $j from 1 through $rg-length {
|
48
|
+
$query: nth(nth($reverse-haystack, $j), 2);
|
49
|
+
@if $context >= $query {
|
50
|
+
@return nth(nth($reverse-haystack, $j), 1);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
}
|
56
|
+
@else {
|
57
|
+
@return nth($haystack, 1);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
@else {
|
61
|
+
@return nth($haystack, 1);
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// Sass List Helpers
|
3
|
+
//
|
4
|
+
// - list-sum()
|
5
|
+
// - query-list()
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// Functions
|
9
|
+
|
10
|
+
// Return the sum of all items in a list.
|
11
|
+
//
|
12
|
+
// list-sum($list)
|
13
|
+
// - $list : <list>
|
14
|
+
@function list-sum($list) {
|
15
|
+
$sum: 0;
|
16
|
+
@each $item in $list {
|
17
|
+
$sum: $sum + $item;
|
18
|
+
}
|
19
|
+
@return $sum;
|
20
|
+
}
|
21
|
+
|
22
|
+
// Return list of index locations where a query appears in a list,
|
23
|
+
// including unit queries.
|
24
|
+
//
|
25
|
+
// query-list($list, $query [, $mode])
|
26
|
+
// - $list : <list>
|
27
|
+
// - $query : <anything>
|
28
|
+
// - $mode : none | unit
|
29
|
+
// - "none" (default) runs a standard query.
|
30
|
+
// - "unit" finds all items with the same unit.
|
31
|
+
@function query-list(
|
32
|
+
$list,
|
33
|
+
$query,
|
34
|
+
$mode: none
|
35
|
+
) {
|
36
|
+
$return: ();
|
37
|
+
|
38
|
+
// loop through $list
|
39
|
+
@for $i from 1 through length($list) {
|
40
|
+
@if $mode == unit {
|
41
|
+
// if the list item matches the query, write where it is to the list.
|
42
|
+
@if unit(nth($list, $i)) == $query {
|
43
|
+
$return: append($return, $i);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
@else {
|
47
|
+
// if the list item matches the query, write where it is to the list.
|
48
|
+
@if nth(nth($list, $i), 1) == $query {
|
49
|
+
$return: append($return, $i);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
// if nothing matches then return false.
|
55
|
+
@if $return == () {
|
56
|
+
$return: false;
|
57
|
+
}
|
58
|
+
|
59
|
+
// return list.
|
60
|
+
@return $return;
|
61
|
+
}
|
62
|
+
|
63
|
+
// Reverses direction of a list
|
64
|
+
@function reverse($list) {
|
65
|
+
$length: length($list);
|
66
|
+
$return: ();
|
67
|
+
@for $i from 0 to $length {
|
68
|
+
$return: append($return, nth($list, $length - $i), comma);
|
69
|
+
}
|
70
|
+
@return $return;
|
71
|
+
}
|