compass 0.13.alpha.4 → 0.13.alpha.5
Sign up to get free protection for your applications and to get access to all the features.
- 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,8 +1,8 @@
|
|
1
|
-
@import "
|
1
|
+
@import "compass/support";
|
2
2
|
|
3
|
-
//
|
4
|
-
//
|
5
|
-
$animation-support: -
|
3
|
+
// The prefixed support threshold for animation.
|
4
|
+
// Defaults to the $graceful-usage-threshold.
|
5
|
+
$animation-support-threshold: $graceful-usage-threshold !default;
|
6
6
|
|
7
7
|
|
8
8
|
// Name of any animation as a string.
|
@@ -34,88 +34,89 @@ $default-animation-play-state : null !default;
|
|
34
34
|
//
|
35
35
|
// $name - The name of your animation.
|
36
36
|
// @content - The keyframes of the animation.
|
37
|
-
@mixin keyframes(
|
38
|
-
$
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
@
|
47
|
-
@-moz-keyframes #{$name} { @content; }
|
48
|
-
}
|
49
|
-
}
|
50
|
-
@if $webkit and nth($animation-support,2) {
|
51
|
-
@include with-only-support-for($webkit: true) {
|
52
|
-
@-webkit-keyframes #{$name} { @content; }
|
53
|
-
}
|
54
|
-
}
|
55
|
-
@if $o and nth($animation-support,4) {
|
56
|
-
@include with-only-support-for($o: true) {
|
57
|
-
@-o-keyframes #{$name} { @content; }
|
58
|
-
}
|
59
|
-
}
|
60
|
-
@if $khtml and nth($animation-support,5) {
|
61
|
-
@include with-only-support-for($khtml: true) {
|
62
|
-
@-khtml-keyframes #{$name} { @content; }
|
63
|
-
}
|
64
|
-
}
|
65
|
-
@if $official {
|
66
|
-
@include with-only-support-for {
|
67
|
-
@keyframes #{$name} { @content; }
|
68
|
-
}
|
37
|
+
@mixin keyframes($name, $deprecated-prefixes...) {
|
38
|
+
$warned: warn-about-useless-prefix-arguments($deprecated-prefixes...);
|
39
|
+
|
40
|
+
@include with-each-prefix(css-animation, $animation-support-threshold) {
|
41
|
+
// It would be nice if we could dynamically construct directive names.
|
42
|
+
@if $current-prefix == -moz { @-moz-keyframes #{$name} { @content; } }
|
43
|
+
@if $current-prefix == -webkit { @-webkit-keyframes #{$name} { @content; } }
|
44
|
+
@if $current-prefix == -o { @-o-keyframes #{$name} { @content; } }
|
45
|
+
@if $current-prefix == -ms { @-ms-keyframes #{$name} { @content; } }
|
46
|
+
@if $current-prefix == null { @keyframes #{$name} { @content; } }
|
69
47
|
}
|
70
48
|
}
|
71
49
|
|
50
|
+
// @private
|
51
|
+
@mixin animation-properties($properties) {
|
52
|
+
@include prefixed-properties(css-animation, $animation-support-threshold, $properties);
|
53
|
+
}
|
54
|
+
|
72
55
|
|
73
56
|
// Apply any number of animation names.
|
74
57
|
@mixin animation-name($name...) {
|
75
58
|
$name: set-arglist-default($name, $default-animation-name);
|
76
|
-
@include
|
59
|
+
@include animation-properties((animation-name: $name));
|
60
|
+
}
|
77
61
|
|
78
62
|
// Apply any number of animation durations.
|
79
63
|
@mixin animation-duration($duration...) {
|
80
64
|
$duration: set-arglist-default($duration, $default-animation-duration);
|
81
|
-
@include
|
65
|
+
@include animation-properties((animation-duration: $duration));
|
66
|
+
}
|
82
67
|
|
83
68
|
// Apply any number of animation delays.
|
84
69
|
@mixin animation-delay($delay...) {
|
85
70
|
$delay: set-arglist-default($delay, $default-animation-delay);
|
86
|
-
@include
|
71
|
+
@include animation-properties((animation-delay: $delay));
|
72
|
+
}
|
87
73
|
|
88
74
|
// Apply any number of animation timing functions.
|
89
75
|
@mixin animation-timing-function($function...) {
|
90
76
|
$function: set-arglist-default($function, $default-animation-timing-function);
|
91
|
-
@include
|
77
|
+
@include animation-properties((animation-timing-function: $function));
|
78
|
+
}
|
92
79
|
|
93
80
|
// Apply any number of animation iteration counts.
|
94
81
|
@mixin animation-iteration-count($count...) {
|
95
82
|
$count: set-arglist-default($count, $default-animation-iteration-count);
|
96
|
-
@include
|
83
|
+
@include animation-properties((animation-iteration-count: $count));
|
84
|
+
}
|
97
85
|
|
98
86
|
// Apply any number of animation directions.
|
99
87
|
@mixin animation-direction($direction...) {
|
100
88
|
$direction: set-arglist-default($direction, $default-animation-direction);
|
101
|
-
@include
|
89
|
+
@include animation-properties((animation-direction: $direction));
|
90
|
+
}
|
102
91
|
|
103
92
|
// Apply any number of animation fill modes.
|
104
93
|
@mixin animation-fill-mode($mode...) {
|
105
94
|
$mode: set-arglist-default($mode, $default-animation-fill-mode);
|
106
|
-
@include
|
95
|
+
@include animation-properties((animation-fill-mode: $mode));
|
96
|
+
}
|
107
97
|
|
108
98
|
// Apply any number of animation play states.
|
109
99
|
@mixin animation-play-state($state...) {
|
110
100
|
$state: set-arglist-default($state, $default-animation-play-state);
|
111
|
-
@include
|
101
|
+
@include animation-properties((animation-play-state: $state));
|
102
|
+
}
|
103
|
+
|
104
|
+
// @private
|
105
|
+
@function default-animation() {
|
106
|
+
@return compact($default-animation-name
|
107
|
+
$default-animation-duration
|
108
|
+
$default-animation-timing-function
|
109
|
+
$default-animation-delay
|
110
|
+
$default-animation-iteration-count
|
111
|
+
$default-animation-direction
|
112
|
+
$default-animation-fill-mode
|
113
|
+
$default-animation-play-state);
|
114
|
+
}
|
112
115
|
|
113
116
|
// Shortcut to apply any number of animations to an element, with all the settings.
|
114
117
|
//
|
115
118
|
// $animation... : Name and settings. [<values> | default]
|
116
119
|
@mixin animation($animation...) {
|
117
|
-
$
|
118
|
-
|
119
|
-
@include experimental(animation, $animation, $animation-support...);
|
120
|
+
$animation: if(length($animation) > 0, $animation, default-animation());
|
121
|
+
@include animation-properties((animation: $animation));
|
120
122
|
}
|
121
|
-
|
@@ -1,11 +1,5 @@
|
|
1
1
|
// Appearance
|
2
|
-
|
3
|
-
@import "shared";
|
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
|
-
$appearance-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
8
|
-
|
2
|
+
@import "compass/support";
|
9
3
|
|
10
4
|
// Change the appearance for Mozilla, Webkit and possibly the future.
|
11
5
|
// The appearance property is currently not present in any newer CSS specification.
|
@@ -16,6 +10,8 @@ $appearance-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
16
10
|
// * [Webkit](http://code.google.com/p/webkit-mirror/source/browse/Source/WebCore/css/CSSValueKeywords.in?spec=svnf1aea559dcd025a8946aa7da6e4e8306f5c1b604&r=63c7d1af44430b314233fea342c3ddb2a052e365)
|
17
11
|
// (search for 'appearance' within the page)
|
18
12
|
@mixin appearance($appearance) {
|
13
|
+
// There is no caniuse tracking for appearance.
|
19
14
|
$appearance: unquote($appearance);
|
20
|
-
@include
|
15
|
+
@include with-prefix(-moz) { -moz-appearance: $appearance; }
|
16
|
+
@include with-prefix(-webkit) { -webkit-appearance: $appearance; }
|
21
17
|
}
|
@@ -1,12 +1,8 @@
|
|
1
1
|
// Background Clip
|
2
|
+
@import "compass/support";
|
2
3
|
|
3
|
-
|
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
|
-
// - mozilla/webkit legacy support handled seperately below
|
8
|
-
$background-clip-support: not -moz, not -webkit, not -ms, not -o, -khtml;
|
9
|
-
|
4
|
+
// The the user threshold for background-clip support. Defaults to `$critical-usage-threshold`
|
5
|
+
$background-clip-support-threshold: $critical-usage-threshold !default;
|
10
6
|
|
11
7
|
// The default border-box model: [border-box | padding-box | content-box]
|
12
8
|
$default-background-clip: padding-box !default;
|
@@ -15,25 +11,25 @@ $default-background-clip: padding-box !default;
|
|
15
11
|
// Clip the background (image and color) at the edge of the padding, border, or content.
|
16
12
|
// $clip... : [padding-box | border-box | content-box]
|
17
13
|
@mixin background-clip($clip...) {
|
18
|
-
$output:
|
19
|
-
$deprecated:
|
14
|
+
$output: ();
|
15
|
+
$deprecated: ();
|
20
16
|
|
21
17
|
@if (length($clip) > 0) {
|
22
18
|
@each $layer in $clip {
|
23
|
-
$output: append($output, unquote($layer));
|
24
|
-
$deprecated: append($deprecated, legacy-box($layer));
|
19
|
+
$output: append($output, unquote($layer), comma);
|
20
|
+
$deprecated: append($deprecated, legacy-box($layer), comma);
|
25
21
|
}
|
26
22
|
} @else {
|
27
23
|
$output: $default-background-clip;
|
28
24
|
$deprecated: legacy-box($default-background-clip);
|
29
25
|
}
|
30
26
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
27
|
+
@include with-each-prefix(background-img-opts, $background-clip-support-threshold) {
|
28
|
+
@if $current-prefix == -moz or $current-prefix == -webkit {
|
29
|
+
// Legacy versions of Mozilla support a different syntax, prefixed.
|
30
|
+
@include prefix-prop(background-clip, $deprecated);
|
31
|
+
} @else {
|
32
|
+
@include prefix-prop(background-clip, $output);
|
33
|
+
}
|
34
|
+
}
|
39
35
|
}
|
@@ -1,11 +1,8 @@
|
|
1
1
|
// Background Origin
|
2
|
+
@import "compass/support";
|
2
3
|
|
3
|
-
|
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
|
-
// - mozilla/webkit legacy support handled seperately below
|
8
|
-
$background-origin-support: not -moz, not -webkit, not -ms, not -o, -khtml;
|
4
|
+
// The the user threshold for background-origin support. Defaults to `$critical-usage-threshold`
|
5
|
+
$background-origin-threshold: $critical-usage-threshold !default;
|
9
6
|
|
10
7
|
|
11
8
|
// The default background-origin: [border-box | padding-box | content-box]
|
@@ -13,27 +10,28 @@ $default-background-origin: content-box !default;
|
|
13
10
|
|
14
11
|
|
15
12
|
// Set the origin of the background (image and color) at the edge of the padding, border, or content.
|
16
|
-
//
|
13
|
+
//
|
14
|
+
// $origin... : [padding-box | border-box | content-box]
|
17
15
|
@mixin background-origin($origin...) {
|
18
|
-
$output:
|
19
|
-
$deprecated:
|
16
|
+
$output: ();
|
17
|
+
$deprecated: ();
|
20
18
|
|
21
19
|
@if (length($origin) > 0) {
|
22
20
|
@each $layer in $origin {
|
23
|
-
$output: append($output, unquote($layer));
|
24
|
-
$deprecated: append($deprecated, legacy-box($layer));
|
21
|
+
$output: append($output, unquote($layer), comma);
|
22
|
+
$deprecated: append($deprecated, legacy-box($layer), comma);
|
25
23
|
}
|
26
24
|
} @else {
|
27
25
|
$output: $default-background-origin;
|
28
26
|
$deprecated: legacy-box($default-background-origin);
|
29
27
|
}
|
30
28
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
29
|
+
@include with-each-prefix(background-img-opts, $background-origin-threshold) {
|
30
|
+
@if $current-prefix == -moz or $current-prefix == -webkit {
|
31
|
+
// Legacy versions of Mozilla support a different syntax, prefixed.
|
32
|
+
@include prefix-prop(background-origin, $deprecated)
|
33
|
+
} @else {
|
34
|
+
@include prefix-prop(background-origin, $output)
|
35
|
+
}
|
36
|
+
}
|
39
37
|
}
|
@@ -1,12 +1,8 @@
|
|
1
1
|
// Background Size
|
2
|
+
@import "compass/support";
|
2
3
|
|
3
|
-
|
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
|
-
// - mozilla/webkit legacy support handled seperately below
|
8
|
-
$background-size-support: -moz, -webkit, not -ms, -o, -khtml;
|
9
|
-
|
4
|
+
// The the user threshold for background-clip support. Defaults to `$critical-usage-threshold`
|
5
|
+
$background-size-threshold: $critical-usage-threshold !default;
|
10
6
|
|
11
7
|
// override to change the default
|
12
8
|
$default-background-size: 100% auto !default;
|
@@ -19,5 +15,5 @@ $default-background-size: 100% auto !default;
|
|
19
15
|
// * mixin defaults to: `$default-background-size`
|
20
16
|
@mixin background-size($size...) {
|
21
17
|
$size: set-arglist-default($size, $default-background-size);
|
22
|
-
@include
|
18
|
+
@include prefixed-properties(background-img-opts, $background-size-threshold, (background-size: $size));
|
23
19
|
}
|
@@ -1,11 +1,10 @@
|
|
1
1
|
// Border Radius
|
2
2
|
|
3
|
-
@import "
|
3
|
+
@import "compass/support";
|
4
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
|
-
$border-radius-support: not -moz, not -webkit, not -ms, not -o, -khtml;
|
8
5
|
|
6
|
+
// The the user threshold for border-radius support. Defaults to `$graceful-usage-threshold`
|
7
|
+
$border-radius-threshold: $graceful-usage-threshold;
|
9
8
|
|
10
9
|
// The length of a border-radius to be used by default.
|
11
10
|
$default-border-radius: 5px !default;
|
@@ -27,34 +26,32 @@ $default-border-radius: 5px !default;
|
|
27
26
|
//
|
28
27
|
// Which generates:
|
29
28
|
//
|
30
|
-
//
|
31
|
-
//
|
32
|
-
//
|
33
|
-
//
|
34
|
-
//
|
35
|
-
//
|
36
|
-
//
|
37
|
-
//
|
38
|
-
//
|
39
|
-
//
|
40
|
-
//
|
41
|
-
//
|
42
|
-
//
|
43
|
-
//
|
44
|
-
// -moz-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px;
|
45
|
-
// -khtml-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px;
|
46
|
-
// border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; }
|
29
|
+
// .simple {
|
30
|
+
// -moz-border-radius: 4px / 4px;
|
31
|
+
// -webkit-border-radius: 4px 4px;
|
32
|
+
// border-radius: 4px / 4px; }
|
33
|
+
//
|
34
|
+
// .compound {
|
35
|
+
// -moz-border-radius: 2px 5px / 3px 6px;
|
36
|
+
// -webkit-border-radius: 2px 3px;
|
37
|
+
// border-radius: 2px 5px / 3px 6px; }
|
38
|
+
//
|
39
|
+
// .crazy {
|
40
|
+
// -moz-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px;
|
41
|
+
// -webkit-border-radius: 1px 2px;
|
42
|
+
// border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; }
|
47
43
|
@mixin border-radius($radius: $default-border-radius, $vertical-radius: false) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
44
|
+
@include with-each-prefix(border-radius, $border-radius-threshold) {
|
45
|
+
@if $current-prefix == -webkit {
|
46
|
+
// Legacy Webkit didn't understand the official shorthand syntax for specifying a vertical radius.
|
47
|
+
$legacy-webkit-radius: first-value-of($radius);
|
48
|
+
@if $vertical-radius { $legacy-webkit-radius: append($legacy-webkit-radius, first-value-of($vertical-radius)); }
|
49
|
+
@include prefix-prop(border-radius, $legacy-webkit-radius);
|
50
|
+
} @else {
|
51
|
+
// Official syntax for everyone else
|
52
|
+
@include prefix-prop(border-radius, if($vertical-radius, #{$radius} / #{$vertical-radius}, $radius));
|
53
|
+
}
|
54
|
+
}
|
58
55
|
}
|
59
56
|
|
60
57
|
// Round radius at position by amount.
|
@@ -62,14 +59,15 @@ $default-border-radius: 5px !default;
|
|
62
59
|
// * legal values for `$vert`: `top`, `bottom`
|
63
60
|
// * legal values for `$horz`: `left`, `right`
|
64
61
|
@mixin border-corner-radius($vert, $horz, $radius: $default-border-radius) {
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
62
|
+
@include with-each-prefix(border-radius, $border-radius-threshold) {
|
63
|
+
@if $current-prefix == -moz {
|
64
|
+
// Support for mozilla's syntax for specifying a corner
|
65
|
+
@include prefix-prop("border-radius-#{$vert}#{$horz}", $radius);
|
66
|
+
} @else {
|
67
|
+
// Official syntax for everyone else
|
68
|
+
@include prefix-prop("border-#{$vert}-#{$horz}-radius", $radius);
|
69
|
+
}
|
70
|
+
}
|
73
71
|
}
|
74
72
|
|
75
73
|
// Round top-left corner only
|
@@ -1,52 +1,77 @@
|
|
1
1
|
// Box Shadow
|
2
2
|
|
3
|
-
@import "
|
3
|
+
@import "compass/support";
|
4
4
|
|
5
|
-
//
|
6
|
-
//
|
7
|
-
$box-shadow-support: -
|
5
|
+
// The prefixed support threshold for box-shadow.
|
6
|
+
// Defaults to the $graceful-usage-threshold.
|
7
|
+
$box-shadow-support-threshold: $graceful-usage-threshold !default;
|
8
8
|
|
9
9
|
|
10
10
|
// The default color for box shadows
|
11
|
-
$default-box-shadow-color
|
11
|
+
$default-box-shadow-color: #333333 !default;
|
12
12
|
|
13
13
|
// The default horizontal offset. Positive is to the right.
|
14
|
-
$default-box-shadow-h-offset
|
14
|
+
$default-box-shadow-h-offset: 0px !default;
|
15
15
|
|
16
16
|
// The default vertical offset. Positive is down.
|
17
|
-
$default-box-shadow-v-offset
|
17
|
+
$default-box-shadow-v-offset: 0px !default;
|
18
18
|
|
19
19
|
// The default blur length.
|
20
|
-
$default-box-shadow-blur
|
20
|
+
$default-box-shadow-blur: 5px !default;
|
21
21
|
|
22
22
|
// The default spread length.
|
23
|
-
$default-box-shadow-spread
|
23
|
+
$default-box-shadow-spread: null !default;
|
24
24
|
|
25
|
-
// The default shadow inset: inset or
|
26
|
-
$default-box-shadow-inset
|
25
|
+
// The default shadow inset: inset or null (for standard shadow).
|
26
|
+
$default-box-shadow-inset: null !default;
|
27
27
|
|
28
|
+
@function default-box-shadow() {
|
29
|
+
@return compact(if($default-box-shadow-inset, inset, null)
|
30
|
+
$default-box-shadow-h-offset
|
31
|
+
$default-box-shadow-v-offset
|
32
|
+
$default-box-shadow-blur
|
33
|
+
$default-box-shadow-spread
|
34
|
+
$default-box-shadow-color);
|
35
|
+
}
|
28
36
|
|
29
37
|
// Provides cross-browser for Webkit, Gecko, and CSS3 box shadows
|
30
38
|
// when one or more box shadows are needed.
|
31
39
|
// Each shadow argument should adhere to the standard css3 syntax
|
32
40
|
// for the box-shadow property.
|
33
41
|
@mixin box-shadow($shadow...) {
|
34
|
-
$
|
35
|
-
|
36
|
-
@include experimental(box-shadow, $shadow, $box-shadow-support...);
|
42
|
+
$shadow: set-arglist-default($shadow, default-box-shadow());
|
43
|
+
@include prefixed-properties(css-boxshadow, $box-shadow-support-threshold, (box-shadow: $shadow));
|
37
44
|
}
|
38
45
|
|
39
46
|
// Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.
|
40
47
|
// Includes default arguments for color, horizontal offset, vertical offset, blur length, spread length, and inset.
|
41
48
|
@mixin single-box-shadow(
|
42
|
-
$hoff :
|
43
|
-
$voff :
|
44
|
-
$blur :
|
45
|
-
$spread :
|
46
|
-
$color :
|
49
|
+
$hoff : null,
|
50
|
+
$voff : null,
|
51
|
+
$blur : null,
|
52
|
+
$spread : null,
|
53
|
+
$color : null,
|
47
54
|
$inset : $default-box-shadow-inset
|
48
55
|
) {
|
49
|
-
|
56
|
+
// Handle legacy argument order
|
57
|
+
@if $hoff != none and type-of($hoff) != number {
|
58
|
+
@warn "The $color argument for single-box-shadow is now the 5th argument instead of the 1st.";
|
59
|
+
$tmp-color: $color;
|
60
|
+
$color: $hoff;
|
61
|
+
$hoff: $voff;
|
62
|
+
$voff: $blur;
|
63
|
+
$blur: $spread;
|
64
|
+
$spread: $tmp-color
|
65
|
+
}
|
66
|
+
|
67
|
+
// Need to set these defaults here instead of the arglist to support the above backwards compat handling
|
68
|
+
@if $hoff == null { $hoff: $default-box-shadow-h-offset; }
|
69
|
+
@if $voff == null { $hoff: $default-box-shadow-v-offset; }
|
70
|
+
@if $blur == null { $blur: $default-box-shadow-blur; }
|
71
|
+
@if $spread == null { $spread: $default-box-shadow-spread; }
|
72
|
+
@if $color == null { $color: $default-box-shadow-color; }
|
73
|
+
|
74
|
+
@if not ($inset == true or $inset == false or $inset == null or $inset == inset) {
|
50
75
|
@warn "$inset expected to be true or the inset keyword. Got #{$inset} instead. Using: inset";
|
51
76
|
}
|
52
77
|
|