compass 0.13.alpha.4 → 0.13.alpha.5
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.
- checksums.yaml +7 -0
- data/README.markdown +2 -3
- data/Rakefile +91 -5
- data/VERSION.yml +1 -1
- data/examples/compass/images/emblem-a043c4f148.png +0 -0
- data/examples/compass/images/flag-03c3b29b35.png +0 -0
- data/examples/compass/images/flag-21cfbfbfc8.png +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/Prociono.otf +0 -0
- data/features/command_line.feature +2 -6
- data/features/step_definitions/command_line_steps.rb +1 -0
- data/frameworks/compass/stylesheets/compass/_css3.scss +0 -1
- data/frameworks/compass/stylesheets/compass/_support.scss +353 -35
- data/frameworks/compass/stylesheets/compass/css3/_animation.scss +49 -48
- data/frameworks/compass/stylesheets/compass/css3/_appearance.scss +4 -8
- data/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +15 -19
- data/frameworks/compass/stylesheets/compass/css3/_background-origin.scss +17 -19
- data/frameworks/compass/stylesheets/compass/css3/_background-size.scss +4 -8
- data/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +37 -39
- data/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +45 -20
- data/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss +6 -8
- data/frameworks/compass/stylesheets/compass/css3/_box.scss +12 -13
- data/frameworks/compass/stylesheets/compass/css3/_columns.scss +46 -26
- data/frameworks/compass/stylesheets/compass/css3/_deprecated-support.scss +272 -0
- data/frameworks/compass/stylesheets/compass/css3/_filter.scss +17 -10
- data/frameworks/compass/stylesheets/compass/css3/_flexbox.scss +134 -281
- data/frameworks/compass/stylesheets/compass/css3/_font-face.scss +5 -5
- data/frameworks/compass/stylesheets/compass/css3/_hyphenation.scss +14 -11
- data/frameworks/compass/stylesheets/compass/css3/_images.scss +77 -67
- data/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +15 -6
- data/frameworks/compass/stylesheets/compass/css3/_opacity.scss +6 -2
- data/frameworks/compass/stylesheets/compass/css3/_pie.scss +1 -73
- data/frameworks/compass/stylesheets/compass/css3/_regions.scss +7 -6
- data/frameworks/compass/stylesheets/compass/css3/_selection.scss +45 -17
- data/frameworks/compass/stylesheets/compass/css3/_shared.scss +4 -261
- data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +1 -1
- data/frameworks/compass/stylesheets/compass/css3/_transform.scss +24 -32
- data/frameworks/compass/stylesheets/compass/css3/_transition.scss +102 -152
- data/frameworks/compass/stylesheets/compass/css3/_user-interface.scss +42 -27
- data/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +2 -1
- data/frameworks/compass/stylesheets/compass/typography/links/_hover-link.scss +1 -1
- data/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss +2 -2
- data/frameworks/compass/stylesheets/compass/typography/lists/_inline-list.scss +1 -1
- data/frameworks/compass/stylesheets/compass/typography/text/_ellipsis.scss +1 -1
- data/frameworks/compass/stylesheets/compass/utilities/_sass.scss +2 -0
- data/frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss +12 -0
- data/frameworks/compass/stylesheets/compass/utilities/color/_contrast.scss +36 -12
- data/frameworks/compass/stylesheets/compass/utilities/general/_float.scss +6 -2
- data/frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss +23 -4
- data/frameworks/compass/stylesheets/compass/utilities/general/_min.scss +1 -1
- data/frameworks/compass/stylesheets/compass/utilities/sass/_lists.scss +16 -0
- data/frameworks/compass/stylesheets/compass/utilities/sass/_maps.scss +19 -0
- data/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +25 -18
- data/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss +3 -1
- data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.scss +3 -3
- data/lib/compass.rb +1 -1
- data/lib/compass/browser_support.rb +1 -1
- data/lib/compass/caniuse.rb +247 -0
- data/lib/compass/configuration/adapters.rb +7 -1
- data/lib/compass/sass_extensions/functions.rb +5 -0
- data/lib/compass/sass_extensions/functions/constants.rb +2 -2
- data/lib/compass/sass_extensions/functions/cross_browser_support.rb +176 -1
- data/lib/compass/sass_extensions/functions/display.rb +24 -19
- data/lib/compass/sass_extensions/functions/env.rb +37 -8
- data/lib/compass/sass_extensions/functions/gradient_support.rb +10 -13
- data/lib/compass/sass_extensions/functions/math.rb +31 -13
- data/lib/compass/sass_extensions/functions/sprites.rb +48 -25
- data/lib/compass/sass_extensions/monkey_patches/browser_support.rb +42 -13
- data/lib/compass/sass_extensions/sprites/image.rb +14 -4
- data/lib/compass/sass_extensions/sprites/image_methods.rb +19 -3
- data/lib/compass/sprite_importer/content.erb +8 -7
- data/lib/compass/watcher/project_watcher.rb +75 -42
- data/lib/compass/watcher/watch.rb +35 -17
- data/test/fixtures/sprites/public/images/focus/ten-by-ten.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_active.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_focus.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_hover.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_target.png +0 -0
- data/test/fixtures/stylesheets/compass/config.rb +1 -0
- data/test/fixtures/stylesheets/compass/css/animation-with-legacy-ie.css +1 -9
- data/test/fixtures/stylesheets/compass/css/animation.css +1 -9
- data/test/fixtures/stylesheets/compass/css/appearance.css +3 -0
- data/test/fixtures/stylesheets/compass/css/background-clip.css +4 -8
- data/test/fixtures/stylesheets/compass/css/background-origin.css +4 -8
- data/test/fixtures/stylesheets/compass/css/background-size.css +3 -10
- data/test/fixtures/stylesheets/compass/css/border_radius.css +3 -3
- data/test/fixtures/stylesheets/compass/css/{box-sizeing.css → box-sizing.css} +2 -2
- data/test/fixtures/stylesheets/compass/css/box_shadow.css +15 -5
- data/test/fixtures/stylesheets/compass/css/brightness.css +14 -0
- data/test/fixtures/stylesheets/compass/css/browser-support.css +306 -0
- data/test/fixtures/stylesheets/compass/css/color.css +18 -0
- data/test/fixtures/stylesheets/compass/css/columns.css +27 -18
- data/test/fixtures/stylesheets/compass/css/filters.css +6 -6
- data/test/fixtures/stylesheets/compass/css/flexbox.css +84 -111
- data/test/fixtures/stylesheets/compass/css/fonts.css +1 -1
- data/test/fixtures/stylesheets/compass/css/gradients.css +53 -53
- data/test/fixtures/stylesheets/compass/css/grid_background.css +11 -11
- data/test/fixtures/stylesheets/compass/css/hyphenation.css +2 -4
- data/test/fixtures/stylesheets/compass/css/lists.css +6 -12
- data/test/fixtures/stylesheets/compass/css/regions.css +2 -2
- data/test/fixtures/stylesheets/compass/css/selection.css +41 -4
- data/test/fixtures/stylesheets/compass/css/sprites_with_explicit_separator.css +16 -0
- data/test/fixtures/stylesheets/compass/css/support.css +62 -0
- data/test/fixtures/stylesheets/compass/css/transform.css +64 -136
- data/test/fixtures/stylesheets/compass/css/transition.css +27 -45
- data/test/fixtures/stylesheets/compass/css/typography/links/hover-link.css +4 -0
- data/test/fixtures/stylesheets/compass/css/user-interface.css +34 -7
- data/test/fixtures/stylesheets/compass/css/utilities.css +7 -7
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +6 -9
- data/test/fixtures/stylesheets/compass/images/flag_states-sc42d7bf926.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_active.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_focus.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_hover.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_target.png +0 -0
- data/test/fixtures/stylesheets/compass/sass/animation-with-legacy-ie.scss +1 -3
- data/test/fixtures/stylesheets/compass/sass/appearance.scss +5 -0
- data/test/fixtures/stylesheets/compass/sass/background-clip.scss +0 -5
- data/test/fixtures/stylesheets/compass/sass/background-origin.scss +0 -5
- data/test/fixtures/stylesheets/compass/sass/background-size.scss +0 -5
- data/test/fixtures/stylesheets/compass/sass/{box-sizeing.scss → box-sizing.scss} +1 -1
- data/test/fixtures/stylesheets/compass/sass/box_shadow.scss +2 -0
- data/test/fixtures/stylesheets/compass/sass/brightness.scss +12 -0
- data/test/fixtures/stylesheets/compass/sass/browser-support.scss +30 -0
- data/test/fixtures/stylesheets/compass/sass/color.scss +22 -0
- data/test/fixtures/stylesheets/compass/sass/filters.scss +1 -0
- data/test/fixtures/stylesheets/compass/sass/flexbox.scss +84 -40
- data/test/fixtures/stylesheets/compass/sass/gradients.sass +3 -2
- data/test/fixtures/stylesheets/compass/sass/selection.scss +29 -4
- data/test/fixtures/stylesheets/compass/sass/sprites_with_explicit_separator.scss +7 -0
- data/test/fixtures/stylesheets/compass/sass/support.scss +137 -0
- data/test/fixtures/stylesheets/compass/sass/transition.scss +0 -3
- data/test/fixtures/stylesheets/compass/sass/typography/links/hover-link.scss +3 -0
- data/test/fixtures/stylesheets/compass/sass/user-interface.scss +16 -5
- data/test/fixtures/stylesheets/compass/sass/utilities.scss +4 -4
- data/test/fixtures/stylesheets/envtest/css/env.css +4 -4
- data/test/fixtures/stylesheets/envtest/tmp/env.css +4 -4
- data/test/integrations/sprites_test.rb +30 -1
- data/test/test_helper.rb +2 -2
- data/test/units/caniuse_test.rb +115 -0
- data/test/units/command_line_test.rb +1 -0
- data/test/units/sass_extensions_test.rb +5 -0
- data/test/units/sprites/image_test.rb +12 -0
- data/test/units/sprites/sprite_map_test.rb +11 -0
- data/test/units/watcher/project_watcher_test.rb +26 -18
- metadata +96 -42
- data/examples/compass/src/pie.scss +0 -110
- data/frameworks/compass/stylesheets/compass/css3/_transform-legacy.scss +0 -87
- data/frameworks/compass/templates/pie/LICENSE +0 -12
- data/frameworks/compass/templates/pie/LICENSE-APACHE2.txt +0 -13
- data/frameworks/compass/templates/pie/LICENSE-GPL2.txt +0 -278
- data/frameworks/compass/templates/pie/PIE.htc +0 -96
- data/frameworks/compass/templates/pie/manifest.rb +0 -39
- data/frameworks/compass/templates/pie/pie.scss +0 -74
- data/lib/compass/sass_extensions/functions/utility.rb +0 -10
- data/test/fixtures/stylesheets/compass/css/pie.css +0 -23
- data/test/fixtures/stylesheets/compass/sass/pie.scss +0 -47
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
// Box Sizing
|
|
2
2
|
|
|
3
|
-
@import "
|
|
4
|
-
|
|
5
|
-
// @private css3-feature-support variables must always include a list of five boolean values
|
|
6
|
-
// representing in order: -moz, -webkit, -ms, -o, -khtml
|
|
7
|
-
$box-sizing-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
3
|
+
@import "compass/support";
|
|
8
4
|
|
|
5
|
+
// The prefixed support threshold for box-sizing.
|
|
6
|
+
// Defaults to the $graceful-usage-threshold.
|
|
7
|
+
$box-sizing-support-threshold: $critical-usage-threshold !default;
|
|
9
8
|
|
|
10
9
|
// Change the box model for Mozilla, Webkit, IE8 and the future
|
|
11
10
|
//
|
|
12
|
-
//
|
|
13
|
-
// [ content-box | border-box | padding-box ]
|
|
11
|
+
// $box-model: [ content-box | border-box | padding-box ]
|
|
14
12
|
@mixin box-sizing($box-model) {
|
|
15
13
|
$box-model: unquote($box-model);
|
|
16
|
-
@include
|
|
14
|
+
@include prefixed-properties(css3-boxsizing, $box-sizing-support-threshold, (box-sizing: $box-model));
|
|
17
15
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// Flexible Box
|
|
2
|
+
@import "deprecated-support";
|
|
2
3
|
|
|
3
|
-
@
|
|
4
|
+
@warn "The compass/css3/box module is DEPRECATED and will be removed in the next release. Please use compass/css3/flexbox instead.";
|
|
4
5
|
|
|
5
6
|
// @private css3-feature-support variables must always include a list of five boolean values
|
|
6
|
-
|
|
7
|
-
$flexbox-support: -moz, -webkit, -ms, not -o, not -khtml;
|
|
8
|
-
|
|
7
|
+
$legacy-box-support: -moz, -webkit, not -o, -ms, not -khtml;
|
|
9
8
|
|
|
10
9
|
// Default box orientation, assuming that the user wants something less block-like
|
|
11
10
|
$default-box-orient : horizontal !default;
|
|
@@ -35,52 +34,52 @@ $default-box-pack : start !default;
|
|
|
35
34
|
// Apply 'display:box;' to an element.
|
|
36
35
|
// - must be used for any of the other flexbox mixins to work properly
|
|
37
36
|
@mixin display-box {
|
|
38
|
-
@include experimental-value(display, box, $
|
|
37
|
+
@include experimental-value(display, box, $legacy-box-support...);
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
// Box orientation [ horizontal | vertical | inline-axis | block-axis | inherit ]
|
|
42
41
|
@mixin box-orient($orientation: $default-box-orient) {
|
|
43
42
|
$orientation : unquote($orientation);
|
|
44
|
-
@include experimental(box-orient, $orientation, $
|
|
43
|
+
@include experimental(box-orient, $orientation, $legacy-box-support...);
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
// Box align [ start | end | center | baseline | stretch ]
|
|
48
47
|
@mixin box-align($alignment: $default-box-align) {
|
|
49
48
|
$alignment : unquote($alignment);
|
|
50
|
-
@include experimental(box-align, $alignment, $
|
|
49
|
+
@include experimental(box-align, $alignment, $legacy-box-support...);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
// Takes an int argument for box flex. Apply this to the children inside the box.
|
|
54
53
|
//
|
|
55
54
|
// For example: "div.display-box > div.child-box" would get the box flex mixin.
|
|
56
55
|
@mixin box-flex($flex: $default-box-flex) {
|
|
57
|
-
@include experimental(box-flex, $flex, $
|
|
56
|
+
@include experimental(box-flex, $flex, $legacy-box-support...);
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
// Takes an int argument for flexible grouping
|
|
61
60
|
@mixin box-flex-group($group: $default-box-flex-group) {
|
|
62
|
-
@include experimental(box-flex-group, $group, $
|
|
61
|
+
@include experimental(box-flex-group, $group, $legacy-box-support...);
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
// Takes an int argument for ordinal grouping and rearranging the order
|
|
66
65
|
@mixin box-ordinal-group($group: $default-box-ordinal-group) {
|
|
67
|
-
@include experimental(box-ordinal-group, $group, $
|
|
66
|
+
@include experimental(box-ordinal-group, $group, $legacy-box-support...);
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
// Box direction [ normal | reverse | inherit ]
|
|
71
70
|
@mixin box-direction($direction: $default-box-direction) {
|
|
72
71
|
$direction: unquote($direction);
|
|
73
|
-
@include experimental(box-direction, $direction, $
|
|
72
|
+
@include experimental(box-direction, $direction, $legacy-box-support...);
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
// Box lines [ single | multiple ]
|
|
77
76
|
@mixin box-lines($lines: $default-box-lines) {
|
|
78
77
|
$lines: unquote($lines);
|
|
79
|
-
@include experimental(box-lines, $lines, $
|
|
78
|
+
@include experimental(box-lines, $lines, $legacy-box-support...);
|
|
80
79
|
}
|
|
81
80
|
|
|
82
81
|
// Box pack [ start | end | center | justify ]
|
|
83
82
|
@mixin box-pack($pack: $default-box-pack) {
|
|
84
83
|
$pack: unquote($pack);
|
|
85
|
-
@include experimental(box-pack, $pack, $
|
|
84
|
+
@include experimental(box-pack, $pack, $legacy-box-support...);
|
|
86
85
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// Columns
|
|
2
|
+
@import "compass/support";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// representing in order: -moz, -webkit, -ms, -o, -khtml
|
|
7
|
-
$multicolumn-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
4
|
+
// The prefixed support threshold for columns.
|
|
5
|
+
// Defaults to the $critical-usage-threshold.
|
|
6
|
+
$multicolumn-support-threshold: $critical-usage-threshold !default;
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
// Specify the shorthand `columns` property.
|
|
@@ -13,48 +12,62 @@ $multicolumn-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
|
13
12
|
//
|
|
14
13
|
// @include columns(20em 2);
|
|
15
14
|
@mixin columns($width-and-count) {
|
|
16
|
-
@include
|
|
15
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
16
|
+
columns: $width-and-count
|
|
17
|
+
));
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
// Specify the number of columns
|
|
20
21
|
@mixin column-count($count) {
|
|
21
|
-
@include
|
|
22
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
23
|
+
column-count: $count
|
|
24
|
+
));
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
// Specify the gap between columns e.g. `20px`
|
|
25
28
|
@mixin column-gap($width) {
|
|
26
|
-
@include
|
|
29
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
30
|
+
column-gap: $width
|
|
31
|
+
));
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
// Specify the width of columns e.g. `100px`
|
|
30
35
|
@mixin column-width($width) {
|
|
31
|
-
@include
|
|
36
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
37
|
+
column-width: $width
|
|
38
|
+
));
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
// Specify how many columns an element should span across.
|
|
35
42
|
//
|
|
36
43
|
// * legal values are 1, all
|
|
37
44
|
@mixin column-span($columns) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
46
|
+
column-span: $columns
|
|
47
|
+
));
|
|
41
48
|
}
|
|
42
49
|
|
|
43
50
|
// Specify the width of the rule between columns e.g. `1px`
|
|
44
51
|
@mixin column-rule-width($width) {
|
|
45
|
-
@include
|
|
52
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
53
|
+
rule-width: $width
|
|
54
|
+
));
|
|
46
55
|
}
|
|
47
56
|
|
|
48
57
|
// Specify the style of the rule between columns e.g. `dotted`.
|
|
49
58
|
// This works like border-style.
|
|
50
59
|
@mixin column-rule-style($style) {
|
|
51
|
-
@include
|
|
60
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
61
|
+
rule-style: $style
|
|
62
|
+
));
|
|
52
63
|
}
|
|
53
64
|
|
|
54
65
|
// Specify the color of the rule between columns e.g. `blue`.
|
|
55
66
|
// This works like border-color.
|
|
56
67
|
@mixin column-rule-color($color) {
|
|
57
|
-
@include
|
|
68
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
69
|
+
rule-color: $color
|
|
70
|
+
));
|
|
58
71
|
}
|
|
59
72
|
|
|
60
73
|
// Mixin encompassing all column rule properties
|
|
@@ -65,9 +78,10 @@ $multicolumn-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
|
65
78
|
// Or the values can be space separated:
|
|
66
79
|
//
|
|
67
80
|
// @include column-rule(1px solid #c00)
|
|
68
|
-
@mixin column-rule($width, $style:
|
|
69
|
-
|
|
70
|
-
|
|
81
|
+
@mixin column-rule($width, $style: null, $color: null) {
|
|
82
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
83
|
+
column-rule: $width $style $color
|
|
84
|
+
));
|
|
71
85
|
}
|
|
72
86
|
|
|
73
87
|
// All-purpose mixin for setting column breaks.
|
|
@@ -97,13 +111,15 @@ $multicolumn-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
|
97
111
|
// break-inside: auto;}
|
|
98
112
|
|
|
99
113
|
@mixin column-break($type: before, $value: auto){
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
@include with-each-prefix(multicolumn, $multicolumn-support-threshold) {
|
|
115
|
+
@if $current-prefix == -webkit {
|
|
116
|
+
// Webkit uses non-standard syntax
|
|
117
|
+
-webkit-column-break-#{$type}: $value;
|
|
118
|
+
} @else {
|
|
119
|
+
// Official syntax
|
|
120
|
+
break-#{$type}: $value;
|
|
121
|
+
}
|
|
103
122
|
}
|
|
104
|
-
|
|
105
|
-
// Official syntax
|
|
106
|
-
break-#{$type}: $value;
|
|
107
123
|
}
|
|
108
124
|
|
|
109
125
|
// Mixin for setting break-before
|
|
@@ -176,7 +192,9 @@ $multicolumn-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
|
176
192
|
// Example:
|
|
177
193
|
// h2.span {@include column-span();}
|
|
178
194
|
@mixin column-span($span: all){
|
|
179
|
-
@include
|
|
195
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
196
|
+
column-span: $span
|
|
197
|
+
));
|
|
180
198
|
}
|
|
181
199
|
|
|
182
200
|
// Mixin for setting column-fill
|
|
@@ -186,5 +204,7 @@ $multicolumn-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
|
186
204
|
// Example:
|
|
187
205
|
// h2.fill {@include column-fill();}
|
|
188
206
|
@mixin column-fill($fill: balance){
|
|
189
|
-
@include
|
|
207
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
|
208
|
+
column-fill: $fill
|
|
209
|
+
));
|
|
190
210
|
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
@import "compass/support";
|
|
2
|
+
|
|
3
|
+
// XXX Remove these
|
|
4
|
+
$experimental-support-for-mozilla: true !default;
|
|
5
|
+
$experimental-support-for-webkit: true !default;
|
|
6
|
+
$experimental-support-for-opera: true !default;
|
|
7
|
+
$experimental-support-for-microsoft: true !default;
|
|
8
|
+
$experimental-support-for-khtml: false !default;
|
|
9
|
+
$experimental-support-for-svg: false !default;
|
|
10
|
+
$legacy-support-for-ie6: true !default;
|
|
11
|
+
$legacy-support-for-ie7: true !default;
|
|
12
|
+
$legacy-support-for-ie8: true !default;
|
|
13
|
+
$legacy-support-for-mozilla: true !default;
|
|
14
|
+
$legacy-support-for-webkit: true !default;
|
|
15
|
+
|
|
16
|
+
// This mixin provides basic support for CSS3 properties and
|
|
17
|
+
// their corresponding experimental CSS2 properties when
|
|
18
|
+
// the implementations are identical except for the property
|
|
19
|
+
// prefix.
|
|
20
|
+
@mixin experimental($property, $value,
|
|
21
|
+
$moz : $experimental-support-for-mozilla,
|
|
22
|
+
$webkit : $experimental-support-for-webkit,
|
|
23
|
+
$o : $experimental-support-for-opera,
|
|
24
|
+
$ms : $experimental-support-for-microsoft,
|
|
25
|
+
$khtml : $experimental-support-for-khtml,
|
|
26
|
+
$official : true
|
|
27
|
+
) {
|
|
28
|
+
@if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
|
|
29
|
+
@if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
|
|
30
|
+
@if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
|
|
31
|
+
@if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
|
|
32
|
+
@if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
|
|
33
|
+
@if $official { #{$property} : $value; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// This mixin is a shortcut for applying only a single experimental value
|
|
37
|
+
@mixin experimental-only-for($property, $value,
|
|
38
|
+
$moz : false,
|
|
39
|
+
$webkit : false,
|
|
40
|
+
$o : false,
|
|
41
|
+
$ms : false,
|
|
42
|
+
$khtml : false,
|
|
43
|
+
$official : false
|
|
44
|
+
) {
|
|
45
|
+
@include experimental($property, $value, $moz, $webkit, $o, $ms, $khtml, $official);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Same as experimental(), but for cases when the property is the same and the value is vendorized
|
|
49
|
+
@mixin experimental-value($property, $value,
|
|
50
|
+
$moz : $experimental-support-for-mozilla,
|
|
51
|
+
$webkit : $experimental-support-for-webkit,
|
|
52
|
+
$o : $experimental-support-for-opera,
|
|
53
|
+
$ms : $experimental-support-for-microsoft,
|
|
54
|
+
$khtml : $experimental-support-for-khtml,
|
|
55
|
+
$official : true
|
|
56
|
+
) {
|
|
57
|
+
@if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
|
|
58
|
+
@if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
|
|
59
|
+
@if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
|
|
60
|
+
@if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
|
|
61
|
+
@if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
|
|
62
|
+
@if $official { #{$property} : #{$value}; }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// @private
|
|
66
|
+
// Check a given support list for support of a particular browser
|
|
67
|
+
@function supported(
|
|
68
|
+
$prefix,
|
|
69
|
+
$support-list
|
|
70
|
+
) {
|
|
71
|
+
$keys: moz, webkit, o, ms, khtml, official;
|
|
72
|
+
$index: index($keys, $prefix);
|
|
73
|
+
|
|
74
|
+
@if $index {
|
|
75
|
+
@if $index == 6 and length($support-list) == 5 {
|
|
76
|
+
@return official;
|
|
77
|
+
} @else {
|
|
78
|
+
@return nth($support-list, $index);
|
|
79
|
+
}
|
|
80
|
+
} @else {
|
|
81
|
+
@warn 'Please pass a valid browser for $prefix: moz, webkit, o, ms, khtml, or official.';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// A debug tool for checking browser support
|
|
86
|
+
@mixin debug-support-matrix($experimental: true, $ie: true) {
|
|
87
|
+
@debug #{'$moz-'}$experimental-support-for-mozilla
|
|
88
|
+
#{'$webkit-'}$experimental-support-for-webkit
|
|
89
|
+
#{'$opera-'}$experimental-support-for-opera
|
|
90
|
+
#{'$microsoft-'}$experimental-support-for-microsoft
|
|
91
|
+
#{'$khtml-'}$experimental-support-for-khtml;
|
|
92
|
+
@debug #{'$ie6-'}$legacy-support-for-ie6
|
|
93
|
+
#{'$ie7-'}$legacy-support-for-ie7
|
|
94
|
+
#{'$ie8-'}$legacy-support-for-ie8;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Capture the current exerimental support settings
|
|
98
|
+
@function capture-experimental-matrix() {
|
|
99
|
+
@return $experimental-support-for-mozilla
|
|
100
|
+
$experimental-support-for-webkit
|
|
101
|
+
$experimental-support-for-opera
|
|
102
|
+
$experimental-support-for-microsoft
|
|
103
|
+
$experimental-support-for-khtml;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Capture the current legacy-ie support settings
|
|
107
|
+
@function capture-legacy-ie-matrix() {
|
|
108
|
+
@return $legacy-support-for-ie6
|
|
109
|
+
$legacy-support-for-ie7
|
|
110
|
+
$legacy-support-for-ie8;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Capture and store support
|
|
114
|
+
$experimental-matrix: capture-experimental-matrix();
|
|
115
|
+
$legacy-ie-matrix: capture-legacy-ie-matrix();
|
|
116
|
+
|
|
117
|
+
@mixin capture-experimental-matrix {
|
|
118
|
+
$experimental-matrix: capture-experimental-matrix();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@mixin capture-legacy-ie-matrix {
|
|
122
|
+
$legacy-ie-matrix: capture-legacy-ie-matrix();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@mixin capture-support-matrix {
|
|
126
|
+
@include capture-experimental-matrix;
|
|
127
|
+
@include capture-legacy-ie-matrix;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Change the experimental-support settings in specific contexts.
|
|
131
|
+
@mixin set-experimental-support(
|
|
132
|
+
$moz : false,
|
|
133
|
+
$webkit : false,
|
|
134
|
+
$o : false,
|
|
135
|
+
$ms : false,
|
|
136
|
+
$khtml : false
|
|
137
|
+
) {
|
|
138
|
+
$experimental-support-for-mozilla : $moz;
|
|
139
|
+
$experimental-support-for-webkit : $webkit;
|
|
140
|
+
$experimental-support-for-opera : $o;
|
|
141
|
+
$experimental-support-for-microsoft : $ms;
|
|
142
|
+
$experimental-support-for-khtml : $khtml;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@mixin capture-and-set-experimental(
|
|
146
|
+
$moz : false,
|
|
147
|
+
$webkit : false,
|
|
148
|
+
$o : false,
|
|
149
|
+
$ms : false,
|
|
150
|
+
$khtml : false
|
|
151
|
+
) {
|
|
152
|
+
@include capture-experimental-matrix;
|
|
153
|
+
@include set-experimental-support($moz, $webkit, $o, $ms, $khtml);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@mixin capture-and-adjust-experimental(
|
|
157
|
+
$moz : $experimental-support-for-mozilla,
|
|
158
|
+
$webkit : $experimental-support-for-webkit,
|
|
159
|
+
$o : $experimental-support-for-opera,
|
|
160
|
+
$ms : $experimental-support-for-microsoft,
|
|
161
|
+
$khtml : $experimental-support-for-khtml
|
|
162
|
+
) {
|
|
163
|
+
@include capture-experimental-matrix;
|
|
164
|
+
@include set-experimental-support($moz, $webkit, $o, $ms, $khtml);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Change the legacy-support-for-ie* settings in specific contexts.
|
|
168
|
+
@mixin set-legacy-ie-support(
|
|
169
|
+
$ie6: false,
|
|
170
|
+
$ie7: false,
|
|
171
|
+
$ie8: false
|
|
172
|
+
) {
|
|
173
|
+
$legacy-support-for-ie6: $ie6;
|
|
174
|
+
$legacy-support-for-ie7: $ie7;
|
|
175
|
+
$legacy-support-for-ie8: $ie8;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@mixin capture-and-set-legacy-ie(
|
|
179
|
+
$ie6: false,
|
|
180
|
+
$ie7: false,
|
|
181
|
+
$ie8: false
|
|
182
|
+
) {
|
|
183
|
+
@include capture-legacy-ie-matrix;
|
|
184
|
+
@include set-legacy-ie-support($ie6, $ie7, $ie8);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@mixin capture-and-adjust-legacy-ie(
|
|
188
|
+
$ie6: $legacy-support-for-ie6,
|
|
189
|
+
$ie7: $legacy-support-for-ie7,
|
|
190
|
+
$ie8: $legacy-support-for-ie8
|
|
191
|
+
) {
|
|
192
|
+
@include capture-and-set-legacy-ie($ie6, $ie7, $ie8);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Capture current browser support matrix, and set a new matrix of support.
|
|
196
|
+
@mixin capture-and-set-support(
|
|
197
|
+
$moz : false,
|
|
198
|
+
$webkit : false,
|
|
199
|
+
$o : false,
|
|
200
|
+
$ms : false,
|
|
201
|
+
$khtml : false,
|
|
202
|
+
$ie6 : false,
|
|
203
|
+
$ie7 : false,
|
|
204
|
+
$ie8 : false
|
|
205
|
+
) {
|
|
206
|
+
// Capture the current state
|
|
207
|
+
@include capture-support-matrix;
|
|
208
|
+
|
|
209
|
+
// Change support settings
|
|
210
|
+
@include set-experimental-support($moz, $webkit, $o, $ms, $khtml);
|
|
211
|
+
@include set-legacy-ie-support($ie6, $ie7, $ie8);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Capture current browser support matrix, and set a new matrix of support.
|
|
215
|
+
@mixin capture-and-adjust-support(
|
|
216
|
+
$moz : $experimental-support-for-mozilla,
|
|
217
|
+
$webkit : $experimental-support-for-webkit,
|
|
218
|
+
$o : $experimental-support-for-opera,
|
|
219
|
+
$ms : $experimental-support-for-microsoft,
|
|
220
|
+
$khtml : $experimental-support-for-khtml,
|
|
221
|
+
$ie6 : $legacy-support-for-ie6,
|
|
222
|
+
$ie7 : $legacy-support-for-ie7,
|
|
223
|
+
$ie8 : $legacy-support-for-ie8
|
|
224
|
+
) {
|
|
225
|
+
@include capture-and-set-support($moz, $webkit, $o, $ms, $khtml, $ie6, $ie7, $ie8);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
// This mixin allows you to change the experimental support settings for
|
|
230
|
+
// child (@content) styles.
|
|
231
|
+
@mixin with-only-support-for(
|
|
232
|
+
$moz : false,
|
|
233
|
+
$webkit : false,
|
|
234
|
+
$o : false,
|
|
235
|
+
$ms : false,
|
|
236
|
+
$khtml : false,
|
|
237
|
+
$ie6 : false,
|
|
238
|
+
$ie7 : false,
|
|
239
|
+
$ie8 : false
|
|
240
|
+
) {
|
|
241
|
+
// Capture current state
|
|
242
|
+
$wo-experimental-matrix : capture-experimental-matrix();
|
|
243
|
+
$wo-legacy-ie-matrix : capture-legacy-ie-matrix();
|
|
244
|
+
|
|
245
|
+
// Set new states
|
|
246
|
+
@include set-experimental-support($moz, $webkit, $o, $ms, $khtml);
|
|
247
|
+
@include set-legacy-ie-support($ie6, $ie7, $ie8);
|
|
248
|
+
|
|
249
|
+
// Apply styles
|
|
250
|
+
@content;
|
|
251
|
+
|
|
252
|
+
// Return to original support settings
|
|
253
|
+
@include set-experimental-support($wo-experimental-matrix...);
|
|
254
|
+
@include set-legacy-ie-support($wo-legacy-ie-matrix...);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// This mixin is a shortcut for making slight adjustments to browser support
|
|
258
|
+
// for child (@content) styles
|
|
259
|
+
@mixin adjust-support-for(
|
|
260
|
+
$moz : $experimental-support-for-mozilla,
|
|
261
|
+
$webkit : $experimental-support-for-webkit,
|
|
262
|
+
$o : $experimental-support-for-opera,
|
|
263
|
+
$ms : $experimental-support-for-microsoft,
|
|
264
|
+
$khtml : $experimental-support-for-khtml,
|
|
265
|
+
$ie6 : $legacy-support-for-ie6,
|
|
266
|
+
$ie7 : $legacy-support-for-ie7,
|
|
267
|
+
$ie8 : $legacy-support-for-ie8
|
|
268
|
+
) {
|
|
269
|
+
@include with-only-support-for($moz, $webkit, $o, $ms, $khtml, $ie6, $ie7, $ie8) {
|
|
270
|
+
@content;
|
|
271
|
+
}
|
|
272
|
+
}
|