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/_padding.scss
DELETED
@@ -1,92 +0,0 @@
|
|
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
|
-
}
|
data/sass/susy/_settings.scss
DELETED
@@ -1,56 +0,0 @@
|
|
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;
|
data/sass/susy/_support.scss
DELETED
@@ -1,198 +0,0 @@
|
|
1
|
-
// @@@ These helpers only live here until they land in Compass.
|
2
|
-
|
3
|
-
// ---------------------------------------------------------------------------
|
4
|
-
// Imports
|
5
|
-
|
6
|
-
@import "compass/support";
|
7
|
-
|
8
|
-
// ---------------------------------------------------------------------------
|
9
|
-
// Helpers
|
10
|
-
|
11
|
-
// A debug tool for checking browser support
|
12
|
-
@mixin debug-support-matrix($experimental: true, $ie: true) {
|
13
|
-
@debug #{'$moz-'}$experimental-support-for-mozilla
|
14
|
-
#{'$webkit-'}$experimental-support-for-webkit
|
15
|
-
#{'$microsoft-'}$experimental-support-for-microsoft
|
16
|
-
#{'$opera-'}$experimental-support-for-opera
|
17
|
-
#{'$khtml-'}$experimental-support-for-khtml;
|
18
|
-
@debug #{'$ie6-'}$legacy-support-for-ie6
|
19
|
-
#{'$ie7-'}$legacy-support-for-ie7
|
20
|
-
#{'$ie8-'}$legacy-support-for-ie8;
|
21
|
-
}
|
22
|
-
|
23
|
-
// Capture the current exerimental support settings
|
24
|
-
@function capture-experimental-matrix() {
|
25
|
-
@return $experimental-support-for-mozilla
|
26
|
-
$experimental-support-for-webkit
|
27
|
-
$experimental-support-for-microsoft
|
28
|
-
$experimental-support-for-opera
|
29
|
-
$experimental-support-for-khtml;
|
30
|
-
}
|
31
|
-
|
32
|
-
// Capture the current legacy-ie support settings
|
33
|
-
@function capture-legacy-ie-matrix() {
|
34
|
-
@return $legacy-support-for-ie6
|
35
|
-
$legacy-support-for-ie7
|
36
|
-
$legacy-support-for-ie8;
|
37
|
-
}
|
38
|
-
|
39
|
-
// Capture and store support
|
40
|
-
$experimental-matrix: capture-experimental-matrix();
|
41
|
-
$legacy-ie-matrix: capture-legacy-ie-matrix();
|
42
|
-
|
43
|
-
@mixin capture-experimental-matrix {
|
44
|
-
$experimental-matrix: capture-experimental-matrix();
|
45
|
-
}
|
46
|
-
|
47
|
-
@mixin capture-legacy-ie-matrix {
|
48
|
-
$legacy-ie-matrix: capture-legacy-ie-matrix();
|
49
|
-
}
|
50
|
-
|
51
|
-
@mixin capture-support-matrix {
|
52
|
-
@include capture-experimental-matrix;
|
53
|
-
@include capture-legacy-ie-matrix;
|
54
|
-
}
|
55
|
-
|
56
|
-
// Change the experimental-support settings in specific contexts.
|
57
|
-
@mixin set-experimental-support(
|
58
|
-
$moz : false,
|
59
|
-
$webkit : false,
|
60
|
-
$ms : false,
|
61
|
-
$o : false,
|
62
|
-
$khtml : false
|
63
|
-
) {
|
64
|
-
$experimental-support-for-mozilla : $moz;
|
65
|
-
$experimental-support-for-webkit : $webkit;
|
66
|
-
$experimental-support-for-microsoft : $ms;
|
67
|
-
$experimental-support-for-opera : $o;
|
68
|
-
$experimental-support-for-khtml : $khtml;
|
69
|
-
}
|
70
|
-
|
71
|
-
@mixin capture-and-set-experimental(
|
72
|
-
$moz : false,
|
73
|
-
$webkit : false,
|
74
|
-
$ms : false,
|
75
|
-
$o : false,
|
76
|
-
$khtml : false
|
77
|
-
) {
|
78
|
-
@include capture-experimental-matrix;
|
79
|
-
@include set-experimental-support($moz, $webkit, $ms, $o, $khtml);
|
80
|
-
}
|
81
|
-
|
82
|
-
@mixin capture-and-adjust-experimental(
|
83
|
-
$moz : $experimental-support-for-mozilla,
|
84
|
-
$webkit : $experimental-support-for-webkit,
|
85
|
-
$ms : $experimental-support-for-microsoft,
|
86
|
-
$o : $experimental-support-for-opera,
|
87
|
-
$khtml : $experimental-support-for-khtml
|
88
|
-
) {
|
89
|
-
@include capture-experimental-matrix;
|
90
|
-
@include set-experimental-support($moz, $webkit, $ms, $o, $khtml);
|
91
|
-
}
|
92
|
-
|
93
|
-
// Change the legacy-support-for-ie* settings in specific contexts.
|
94
|
-
@mixin set-legacy-ie-support(
|
95
|
-
$ie6: false,
|
96
|
-
$ie7: false,
|
97
|
-
$ie8: false
|
98
|
-
) {
|
99
|
-
$legacy-support-for-ie6: $ie6;
|
100
|
-
$legacy-support-for-ie7: $ie7;
|
101
|
-
$legacy-support-for-ie8: $ie8;
|
102
|
-
}
|
103
|
-
|
104
|
-
@mixin capture-and-set-legacy-ie(
|
105
|
-
$ie6: false,
|
106
|
-
$ie7: false,
|
107
|
-
$ie8: false
|
108
|
-
) {
|
109
|
-
@include capture-legacy-ie-matrix;
|
110
|
-
@include set-legacy-ie-support($ie6, $ie7, $ie8);
|
111
|
-
}
|
112
|
-
|
113
|
-
@mixin capture-and-adjust-legacy-ie(
|
114
|
-
$ie6: $legacy-support-for-ie6,
|
115
|
-
$ie7: $legacy-support-for-ie7,
|
116
|
-
$ie8: $legacy-support-for-ie8
|
117
|
-
) {
|
118
|
-
@include capture-and-set-legacy-ie($ie6, $ie7, $ie8);
|
119
|
-
}
|
120
|
-
|
121
|
-
// Capture current browser support matrix, and set a new matrix of support.
|
122
|
-
@mixin capture-and-set-support(
|
123
|
-
$moz : false,
|
124
|
-
$webkit : false,
|
125
|
-
$ms : false,
|
126
|
-
$o : false,
|
127
|
-
$khtml : false,
|
128
|
-
$ie6 : false,
|
129
|
-
$ie7 : false,
|
130
|
-
$ie8 : false
|
131
|
-
) {
|
132
|
-
// Capture the current state
|
133
|
-
@include capture-support-matrix;
|
134
|
-
|
135
|
-
// Change support settings
|
136
|
-
@include set-experimental-support($moz, $webkit, $ms, $o, $khtml);
|
137
|
-
@include set-legacy-ie-support($ie6, $ie7, $ie8);
|
138
|
-
}
|
139
|
-
|
140
|
-
// Capture current browser support matrix, and set a new matrix of support.
|
141
|
-
@mixin capture-and-adjust-support(
|
142
|
-
$moz : $experimental-support-for-mozilla,
|
143
|
-
$webkit : $experimental-support-for-webkit,
|
144
|
-
$ms : $experimental-support-for-microsoft,
|
145
|
-
$o : $experimental-support-for-opera,
|
146
|
-
$khtml : $experimental-support-for-khtml,
|
147
|
-
$ie6 : $legacy-support-for-ie6,
|
148
|
-
$ie7 : $legacy-support-for-ie7,
|
149
|
-
$ie8 : $legacy-support-for-ie8
|
150
|
-
) {
|
151
|
-
@include capture-and-set-support($moz, $webkit, $ms, $o, $khtml, $ie6, $ie7, $ie8);
|
152
|
-
}
|
153
|
-
|
154
|
-
|
155
|
-
// This mixin allows you to change the experimental support settings for
|
156
|
-
// child (@content) styles.
|
157
|
-
@mixin with-only-support-for(
|
158
|
-
$moz : false,
|
159
|
-
$webkit : false,
|
160
|
-
$ms : false,
|
161
|
-
$o : false,
|
162
|
-
$khtml : false,
|
163
|
-
$ie6 : false,
|
164
|
-
$ie7 : false,
|
165
|
-
$ie8 : false
|
166
|
-
) {
|
167
|
-
// Capture current state
|
168
|
-
$wo-experimental-matrix : capture-experimental-matrix();
|
169
|
-
$wo-legacy-ie-matrix : capture-legacy-ie-matrix();
|
170
|
-
|
171
|
-
// Set new states
|
172
|
-
@include set-experimental-support($moz, $webkit, $ms, $o, $khtml);
|
173
|
-
@include set-legacy-ie-support($ie6, $ie7, $ie8);
|
174
|
-
|
175
|
-
// Apply styles
|
176
|
-
@content;
|
177
|
-
|
178
|
-
// Return to original support settings
|
179
|
-
@include set-experimental-support($wo-experimental-matrix...);
|
180
|
-
@include set-legacy-ie-support($wo-legacy-ie-matrix...);
|
181
|
-
}
|
182
|
-
|
183
|
-
// This mixin is a shortcut for making slight adjustments to browser support
|
184
|
-
// for child (@content) styles
|
185
|
-
@mixin adjust-support-for(
|
186
|
-
$moz : $experimental-support-for-mozilla,
|
187
|
-
$webkit : $experimental-support-for-webkit,
|
188
|
-
$ms : $experimental-support-for-microsoft,
|
189
|
-
$o : $experimental-support-for-opera,
|
190
|
-
$khtml : $experimental-support-for-khtml,
|
191
|
-
$ie6 : $legacy-support-for-ie6,
|
192
|
-
$ie7 : $legacy-support-for-ie7,
|
193
|
-
$ie8 : $legacy-support-for-ie8
|
194
|
-
) {
|
195
|
-
@include with-only-support-for($moz, $webkit, $ms, $o, $khtml, $ie6, $ie7, $ie8) {
|
196
|
-
@content;
|
197
|
-
}
|
198
|
-
}
|
data/sass/susy/_units.scss
DELETED
@@ -1,159 +0,0 @@
|
|
1
|
-
// @private Default font-size for all browsers
|
2
|
-
$browser-default-font-size: 16px;
|
3
|
-
|
4
|
-
// Base font size in pixels, if not already defined.
|
5
|
-
// Should be the same as the font-size of the html element.
|
6
|
-
$base-font-size: 16px !default;
|
7
|
-
|
8
|
-
// Whether to output fallback values in px when outputting rems.
|
9
|
-
$rem-with-px-fallback: true !default;
|
10
|
-
|
11
|
-
// Convert any CSS <length> or <percentage> value to any another.
|
12
|
-
//
|
13
|
-
// @param $length
|
14
|
-
// A css <length> or <percentage> value
|
15
|
-
//
|
16
|
-
// @param $to-unit
|
17
|
-
// String matching a css unit keyword, e.g. 'em', '%', etc.
|
18
|
-
//
|
19
|
-
// @param $from-context
|
20
|
-
// When converting from relative units, the absolute length (in px) to
|
21
|
-
// which $length refers (e.g. for $lengths in em units, would normally be the
|
22
|
-
// font-size of the current element).
|
23
|
-
//
|
24
|
-
// @param $to-context
|
25
|
-
// For converting to relative units, the absolute length in px to which the
|
26
|
-
// output value will refer. Defaults to the same as $from-context, since it is
|
27
|
-
// rarely needed.
|
28
|
-
@function convert-length(
|
29
|
-
$length,
|
30
|
-
$to-unit,
|
31
|
-
$from-context: $base-font-size,
|
32
|
-
$to-context: $from-context
|
33
|
-
) {
|
34
|
-
|
35
|
-
$from-unit: unit($length);
|
36
|
-
|
37
|
-
// Optimize for cases where `from` and `to` units are accidentally the same.
|
38
|
-
@if $from-unit == $to-unit { @return $length; }
|
39
|
-
|
40
|
-
// Context values must be in px so we can determine a conversion ratio for
|
41
|
-
// relative units.
|
42
|
-
@if unit($from-context) != 'px' { @warn "Paremeter $from-context must resolve to a value in pixel units."; }
|
43
|
-
@if unit($to-context) != 'px' { @warn "Parameter $to-context must resolve to a value in pixel units."; }
|
44
|
-
|
45
|
-
// Convert input length to pixels
|
46
|
-
$px-length: $length;
|
47
|
-
|
48
|
-
@if $from-unit != 'px' {
|
49
|
-
// Convert relative units using the from-context parameter.
|
50
|
-
@if $from-unit == 'em' { $px-length: $length * $from-context / 1em }
|
51
|
-
@else if $from-unit == 'rem' { $px-length: $length * $base-font-size / 1rem }
|
52
|
-
@else if $from-unit == '%' { $px-length: $length * $from-context / 100% }
|
53
|
-
@else if $from-unit == 'ex' { $px-length: $length * $from-context / 2ex }
|
54
|
-
// Convert absolute units using Sass' conversion table.
|
55
|
-
@else if $from-unit == 'in' or
|
56
|
-
$from-unit == 'mm' or
|
57
|
-
$from-unit == 'cm' or
|
58
|
-
$from-unit == 'pt' or
|
59
|
-
$from-unit == 'pc' { $px-length: 0px + $length }
|
60
|
-
// Certain units can't be converted.
|
61
|
-
@else if $from-unit == 'ch' or
|
62
|
-
$from-unit == 'vw' or
|
63
|
-
$from-unit == 'vh' or
|
64
|
-
$from-unit == 'vmin' {
|
65
|
-
@warn "#{$from-unit} units can't be reliably converted; Returning original value.";
|
66
|
-
@return $length;
|
67
|
-
}
|
68
|
-
@else {
|
69
|
-
@warn "#{$from-unit} is an unknown length unit. Returning original value.";
|
70
|
-
@return $length;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
|
74
|
-
// Convert length in pixels to the output unit
|
75
|
-
$output-length: $px-length;
|
76
|
-
@if $to-unit != 'px' {
|
77
|
-
// Relative units
|
78
|
-
@if $to-unit == 'em' { $output-length: $px-length * 1em / $to-context }
|
79
|
-
@else if $to-unit == 'rem' { $output-length: $px-length * 1rem / $base-font-size }
|
80
|
-
@else if $to-unit == '%' { $output-length: $px-length * 100% / $to-context }
|
81
|
-
@else if $to-unit == 'ex' { $output-length: $px-length * 2ex / $to-context }
|
82
|
-
// Absolute units
|
83
|
-
@else if $to-unit == 'in' { $output-length: 0in + $px-length }
|
84
|
-
@else if $to-unit == 'mm' { $output-length: 0mm + $px-length }
|
85
|
-
@else if $to-unit == 'cm' { $output-length: 0cm + $px-length }
|
86
|
-
@else if $to-unit == 'pt' { $output-length: 0pt + $px-length }
|
87
|
-
@else if $to-unit == 'pc' { $output-length: 0pc + $px-length }
|
88
|
-
// Non-convertible units
|
89
|
-
@else if $to-unit == 'ch' or
|
90
|
-
$to-unit == 'vw' or
|
91
|
-
$to-unit == 'vh' or
|
92
|
-
$to-unit == 'vmin' {
|
93
|
-
@warn "#{$to-unit} units can't be reliably converted; Returning original value.";
|
94
|
-
@return $length;
|
95
|
-
}
|
96
|
-
@else {
|
97
|
-
@warn "#{$to-unit} is an unknown length unit. Returning original value.";
|
98
|
-
@return $length;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
@return $output-length;
|
103
|
-
}
|
104
|
-
|
105
|
-
|
106
|
-
// Output a given style rule containing rem values along with an (optional)
|
107
|
-
// fallback rule for older browsers (with rem values converted to px).
|
108
|
-
//
|
109
|
-
// @param $property
|
110
|
-
// The css property name.
|
111
|
-
//
|
112
|
-
// @param $values
|
113
|
-
// The value (or space-separated list of values) for the property.
|
114
|
-
//
|
115
|
-
// @param $use-px-fallback
|
116
|
-
// [ true | false ]
|
117
|
-
//
|
118
|
-
@mixin rem($property, $values, $use-px-fallback: $rem-with-px-fallback) {
|
119
|
-
// Create a couple of empty lists as output buffers.
|
120
|
-
$px-values: ();
|
121
|
-
$rem-values: ();
|
122
|
-
|
123
|
-
// Loop through the $values list
|
124
|
-
@each $value in $values {
|
125
|
-
// For each property value, if it's in rem or px, derive both rem and
|
126
|
-
// px values for it and add those to the end of the appropriate buffer.
|
127
|
-
// Ensure all pixel values are rounded to the nearest pixel.
|
128
|
-
@if type-of($value) == number and not unitless($value) and (unit($value) == px or unit($value) == rem) {
|
129
|
-
@if unit($value) == px {
|
130
|
-
$px-values: join($px-values, round($value));
|
131
|
-
$rem-values: join($rem-values, convert-length($value, rem));
|
132
|
-
}
|
133
|
-
@else {
|
134
|
-
$px-values: join($px-values, round(convert-length($value, px)));
|
135
|
-
$rem-values: join($rem-values, $value);
|
136
|
-
}
|
137
|
-
}
|
138
|
-
@else {
|
139
|
-
$px-values: join($px-values, $value);
|
140
|
-
$rem-values: join($rem-values, $value);
|
141
|
-
}
|
142
|
-
}
|
143
|
-
|
144
|
-
// Use pixel fallback for browsers that don't understand rem units.
|
145
|
-
@if $use-px-fallback {
|
146
|
-
#{$property}: $px-values;
|
147
|
-
}
|
148
|
-
|
149
|
-
// Use rem values for everyone else (overrides pixel values).
|
150
|
-
#{$property}: $rem-values;
|
151
|
-
}
|
152
|
-
|
153
|
-
@mixin if-rem($property, $values, $use-px-fallback: $rem-with-px-fallback) {
|
154
|
-
$has-rem: false;
|
155
|
-
@each $value in $values { $has-rem: if(unit($value) == 'rem', true, $has-rem); }
|
156
|
-
@if $has-rem { @include rem($property, $values, $use-px-fallback); }
|
157
|
-
@else { #{$property}: $values; }
|
158
|
-
}
|
159
|
-
|