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.
Files changed (156) hide show
  1. checksums.yaml +7 -0
  2. data/README.markdown +2 -3
  3. data/Rakefile +91 -5
  4. data/VERSION.yml +1 -1
  5. data/examples/compass/images/emblem-a043c4f148.png +0 -0
  6. data/examples/compass/images/flag-03c3b29b35.png +0 -0
  7. data/examples/compass/images/flag-21cfbfbfc8.png +0 -0
  8. data/examples/css3/extensions/fancy-fonts/templates/project/Prociono.otf +0 -0
  9. data/features/command_line.feature +2 -6
  10. data/features/step_definitions/command_line_steps.rb +1 -0
  11. data/frameworks/compass/stylesheets/compass/_css3.scss +0 -1
  12. data/frameworks/compass/stylesheets/compass/_support.scss +353 -35
  13. data/frameworks/compass/stylesheets/compass/css3/_animation.scss +49 -48
  14. data/frameworks/compass/stylesheets/compass/css3/_appearance.scss +4 -8
  15. data/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +15 -19
  16. data/frameworks/compass/stylesheets/compass/css3/_background-origin.scss +17 -19
  17. data/frameworks/compass/stylesheets/compass/css3/_background-size.scss +4 -8
  18. data/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +37 -39
  19. data/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +45 -20
  20. data/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss +6 -8
  21. data/frameworks/compass/stylesheets/compass/css3/_box.scss +12 -13
  22. data/frameworks/compass/stylesheets/compass/css3/_columns.scss +46 -26
  23. data/frameworks/compass/stylesheets/compass/css3/_deprecated-support.scss +272 -0
  24. data/frameworks/compass/stylesheets/compass/css3/_filter.scss +17 -10
  25. data/frameworks/compass/stylesheets/compass/css3/_flexbox.scss +134 -281
  26. data/frameworks/compass/stylesheets/compass/css3/_font-face.scss +5 -5
  27. data/frameworks/compass/stylesheets/compass/css3/_hyphenation.scss +14 -11
  28. data/frameworks/compass/stylesheets/compass/css3/_images.scss +77 -67
  29. data/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +15 -6
  30. data/frameworks/compass/stylesheets/compass/css3/_opacity.scss +6 -2
  31. data/frameworks/compass/stylesheets/compass/css3/_pie.scss +1 -73
  32. data/frameworks/compass/stylesheets/compass/css3/_regions.scss +7 -6
  33. data/frameworks/compass/stylesheets/compass/css3/_selection.scss +45 -17
  34. data/frameworks/compass/stylesheets/compass/css3/_shared.scss +4 -261
  35. data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +1 -1
  36. data/frameworks/compass/stylesheets/compass/css3/_transform.scss +24 -32
  37. data/frameworks/compass/stylesheets/compass/css3/_transition.scss +102 -152
  38. data/frameworks/compass/stylesheets/compass/css3/_user-interface.scss +42 -27
  39. data/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +2 -1
  40. data/frameworks/compass/stylesheets/compass/typography/links/_hover-link.scss +1 -1
  41. data/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss +2 -2
  42. data/frameworks/compass/stylesheets/compass/typography/lists/_inline-list.scss +1 -1
  43. data/frameworks/compass/stylesheets/compass/typography/text/_ellipsis.scss +1 -1
  44. data/frameworks/compass/stylesheets/compass/utilities/_sass.scss +2 -0
  45. data/frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss +12 -0
  46. data/frameworks/compass/stylesheets/compass/utilities/color/_contrast.scss +36 -12
  47. data/frameworks/compass/stylesheets/compass/utilities/general/_float.scss +6 -2
  48. data/frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss +23 -4
  49. data/frameworks/compass/stylesheets/compass/utilities/general/_min.scss +1 -1
  50. data/frameworks/compass/stylesheets/compass/utilities/sass/_lists.scss +16 -0
  51. data/frameworks/compass/stylesheets/compass/utilities/sass/_maps.scss +19 -0
  52. data/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +25 -18
  53. data/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss +3 -1
  54. data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.scss +3 -3
  55. data/lib/compass.rb +1 -1
  56. data/lib/compass/browser_support.rb +1 -1
  57. data/lib/compass/caniuse.rb +247 -0
  58. data/lib/compass/configuration/adapters.rb +7 -1
  59. data/lib/compass/sass_extensions/functions.rb +5 -0
  60. data/lib/compass/sass_extensions/functions/constants.rb +2 -2
  61. data/lib/compass/sass_extensions/functions/cross_browser_support.rb +176 -1
  62. data/lib/compass/sass_extensions/functions/display.rb +24 -19
  63. data/lib/compass/sass_extensions/functions/env.rb +37 -8
  64. data/lib/compass/sass_extensions/functions/gradient_support.rb +10 -13
  65. data/lib/compass/sass_extensions/functions/math.rb +31 -13
  66. data/lib/compass/sass_extensions/functions/sprites.rb +48 -25
  67. data/lib/compass/sass_extensions/monkey_patches/browser_support.rb +42 -13
  68. data/lib/compass/sass_extensions/sprites/image.rb +14 -4
  69. data/lib/compass/sass_extensions/sprites/image_methods.rb +19 -3
  70. data/lib/compass/sprite_importer/content.erb +8 -7
  71. data/lib/compass/watcher/project_watcher.rb +75 -42
  72. data/lib/compass/watcher/watch.rb +35 -17
  73. data/test/fixtures/sprites/public/images/focus/ten-by-ten.png +0 -0
  74. data/test/fixtures/sprites/public/images/focus/ten-by-ten_active.png +0 -0
  75. data/test/fixtures/sprites/public/images/focus/ten-by-ten_focus.png +0 -0
  76. data/test/fixtures/sprites/public/images/focus/ten-by-ten_hover.png +0 -0
  77. data/test/fixtures/sprites/public/images/focus/ten-by-ten_target.png +0 -0
  78. data/test/fixtures/stylesheets/compass/config.rb +1 -0
  79. data/test/fixtures/stylesheets/compass/css/animation-with-legacy-ie.css +1 -9
  80. data/test/fixtures/stylesheets/compass/css/animation.css +1 -9
  81. data/test/fixtures/stylesheets/compass/css/appearance.css +3 -0
  82. data/test/fixtures/stylesheets/compass/css/background-clip.css +4 -8
  83. data/test/fixtures/stylesheets/compass/css/background-origin.css +4 -8
  84. data/test/fixtures/stylesheets/compass/css/background-size.css +3 -10
  85. data/test/fixtures/stylesheets/compass/css/border_radius.css +3 -3
  86. data/test/fixtures/stylesheets/compass/css/{box-sizeing.css → box-sizing.css} +2 -2
  87. data/test/fixtures/stylesheets/compass/css/box_shadow.css +15 -5
  88. data/test/fixtures/stylesheets/compass/css/brightness.css +14 -0
  89. data/test/fixtures/stylesheets/compass/css/browser-support.css +306 -0
  90. data/test/fixtures/stylesheets/compass/css/color.css +18 -0
  91. data/test/fixtures/stylesheets/compass/css/columns.css +27 -18
  92. data/test/fixtures/stylesheets/compass/css/filters.css +6 -6
  93. data/test/fixtures/stylesheets/compass/css/flexbox.css +84 -111
  94. data/test/fixtures/stylesheets/compass/css/fonts.css +1 -1
  95. data/test/fixtures/stylesheets/compass/css/gradients.css +53 -53
  96. data/test/fixtures/stylesheets/compass/css/grid_background.css +11 -11
  97. data/test/fixtures/stylesheets/compass/css/hyphenation.css +2 -4
  98. data/test/fixtures/stylesheets/compass/css/lists.css +6 -12
  99. data/test/fixtures/stylesheets/compass/css/regions.css +2 -2
  100. data/test/fixtures/stylesheets/compass/css/selection.css +41 -4
  101. data/test/fixtures/stylesheets/compass/css/sprites_with_explicit_separator.css +16 -0
  102. data/test/fixtures/stylesheets/compass/css/support.css +62 -0
  103. data/test/fixtures/stylesheets/compass/css/transform.css +64 -136
  104. data/test/fixtures/stylesheets/compass/css/transition.css +27 -45
  105. data/test/fixtures/stylesheets/compass/css/typography/links/hover-link.css +4 -0
  106. data/test/fixtures/stylesheets/compass/css/user-interface.css +34 -7
  107. data/test/fixtures/stylesheets/compass/css/utilities.css +7 -7
  108. data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +6 -9
  109. data/test/fixtures/stylesheets/compass/images/flag_states-sc42d7bf926.png +0 -0
  110. data/test/fixtures/stylesheets/compass/images/flag_states/foo.png +0 -0
  111. data/test/fixtures/stylesheets/compass/images/flag_states/foo_active.png +0 -0
  112. data/test/fixtures/stylesheets/compass/images/flag_states/foo_focus.png +0 -0
  113. data/test/fixtures/stylesheets/compass/images/flag_states/foo_hover.png +0 -0
  114. data/test/fixtures/stylesheets/compass/images/flag_states/foo_target.png +0 -0
  115. data/test/fixtures/stylesheets/compass/sass/animation-with-legacy-ie.scss +1 -3
  116. data/test/fixtures/stylesheets/compass/sass/appearance.scss +5 -0
  117. data/test/fixtures/stylesheets/compass/sass/background-clip.scss +0 -5
  118. data/test/fixtures/stylesheets/compass/sass/background-origin.scss +0 -5
  119. data/test/fixtures/stylesheets/compass/sass/background-size.scss +0 -5
  120. data/test/fixtures/stylesheets/compass/sass/{box-sizeing.scss → box-sizing.scss} +1 -1
  121. data/test/fixtures/stylesheets/compass/sass/box_shadow.scss +2 -0
  122. data/test/fixtures/stylesheets/compass/sass/brightness.scss +12 -0
  123. data/test/fixtures/stylesheets/compass/sass/browser-support.scss +30 -0
  124. data/test/fixtures/stylesheets/compass/sass/color.scss +22 -0
  125. data/test/fixtures/stylesheets/compass/sass/filters.scss +1 -0
  126. data/test/fixtures/stylesheets/compass/sass/flexbox.scss +84 -40
  127. data/test/fixtures/stylesheets/compass/sass/gradients.sass +3 -2
  128. data/test/fixtures/stylesheets/compass/sass/selection.scss +29 -4
  129. data/test/fixtures/stylesheets/compass/sass/sprites_with_explicit_separator.scss +7 -0
  130. data/test/fixtures/stylesheets/compass/sass/support.scss +137 -0
  131. data/test/fixtures/stylesheets/compass/sass/transition.scss +0 -3
  132. data/test/fixtures/stylesheets/compass/sass/typography/links/hover-link.scss +3 -0
  133. data/test/fixtures/stylesheets/compass/sass/user-interface.scss +16 -5
  134. data/test/fixtures/stylesheets/compass/sass/utilities.scss +4 -4
  135. data/test/fixtures/stylesheets/envtest/css/env.css +4 -4
  136. data/test/fixtures/stylesheets/envtest/tmp/env.css +4 -4
  137. data/test/integrations/sprites_test.rb +30 -1
  138. data/test/test_helper.rb +2 -2
  139. data/test/units/caniuse_test.rb +115 -0
  140. data/test/units/command_line_test.rb +1 -0
  141. data/test/units/sass_extensions_test.rb +5 -0
  142. data/test/units/sprites/image_test.rb +12 -0
  143. data/test/units/sprites/sprite_map_test.rb +11 -0
  144. data/test/units/watcher/project_watcher_test.rb +26 -18
  145. metadata +96 -42
  146. data/examples/compass/src/pie.scss +0 -110
  147. data/frameworks/compass/stylesheets/compass/css3/_transform-legacy.scss +0 -87
  148. data/frameworks/compass/templates/pie/LICENSE +0 -12
  149. data/frameworks/compass/templates/pie/LICENSE-APACHE2.txt +0 -13
  150. data/frameworks/compass/templates/pie/LICENSE-GPL2.txt +0 -278
  151. data/frameworks/compass/templates/pie/PIE.htc +0 -96
  152. data/frameworks/compass/templates/pie/manifest.rb +0 -39
  153. data/frameworks/compass/templates/pie/pie.scss +0 -74
  154. data/lib/compass/sass_extensions/functions/utility.rb +0 -10
  155. data/test/fixtures/stylesheets/compass/css/pie.css +0 -23
  156. data/test/fixtures/stylesheets/compass/sass/pie.scss +0 -47
@@ -1,8 +1,8 @@
1
- @import "shared";
1
+ @import "compass/support";
2
2
 
3
- // @private css3-feature-support variables must always include a list of five boolean values
4
- // representing in order: -moz, -webkit, -ms, -o, -khtml.
5
- $animation-support: -moz, -webkit, not -ms, -o, -khtml;
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
- $name,
39
- $moz : $experimental-support-for-mozilla,
40
- $webkit : $experimental-support-for-webkit,
41
- $o : $experimental-support-for-opera,
42
- $khtml : $experimental-support-for-khtml,
43
- $official : true
44
- ) {
45
- @if $moz and nth($animation-support,1) {
46
- @include with-only-support-for($moz: true) {
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 experimental(animation-name, $name, $animation-support...); }
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 experimental(animation-duration, $duration, $animation-support...); }
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 experimental(animation-delay, $delay, $animation-support...); }
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 experimental(animation-timing-function, $function, $animation-support...); }
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 experimental(animation-iteration-count, $count, $animation-support...); }
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 experimental(animation-direction, $direction, $animation-support...); }
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 experimental(animation-fill-mode, $mode, $animation-support...); }
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 experimental(animation-play-state, $state, $animation-support...); }
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
- $default: -compass-space-list(compact($default-animation-name $default-animation-duration $default-animation-timing-function $default-animation-delay $default-animation-iteration-count $default-animation-direction $default-animation-fill-mode $default-animation-play-state));
118
- $animation: set-arglist-default($animation, $default);
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 experimental(appearance, $appearance, $appearance-support...);
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
- @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
- // - 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: compact();
19
- $deprecated: compact();
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
- // Legacy versions of Mozilla support a different syntax, prefixed.
32
- @include experimental-only-for(background-clip, $deprecated,
33
- $moz: $legacy-support-for-mozilla,
34
- $webkit: $legacy-support-for-webkit
35
- );
36
-
37
- // Official syntax for the rest
38
- @include experimental(background-clip, $output, $background-clip-support...);
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
- @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
- // - 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
- // $origin... : [padding-box | border-box | content-box]
13
+ //
14
+ // $origin... : [padding-box | border-box | content-box]
17
15
  @mixin background-origin($origin...) {
18
- $output: compact();
19
- $deprecated: compact();
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
- // Legacy versions of Mozilla support a different syntax, prefixed.
32
- @include experimental-only-for(background-origin, $deprecated,
33
- $moz: $legacy-support-for-mozilla,
34
- $webkit: $legacy-support-for-webkit
35
- );
36
-
37
- // Official syntax for the rest
38
- @include experimental(background-origin, $output, $background-origin-support...);
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
- @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
- // - 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 experimental(background-size, $size, $background-size-support...);
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 "shared";
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
- // .simple {
31
- // -webkit-border-radius: 4px 4px;
32
- // -moz-border-radius: 4px / 4px;
33
- // -khtml-border-radius: 4px / 4px;
34
- // border-radius: 4px / 4px; }
35
- //
36
- // .compound {
37
- // -webkit-border-radius: 2px 3px;
38
- // -moz-border-radius: 2px 5px / 3px 6px;
39
- // -khtml-border-radius: 2px 5px / 3px 6px;
40
- // border-radius: 2px 5px / 3px 6px; }
41
- //
42
- // .crazy {
43
- // -webkit-border-radius: 1px 2px;
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
- // Legacy Webkit didn't understand the official shorthand syntax for specifying a vertical radius.
50
- $legacy-webkit-radius: first-value-of($radius);
51
- @if $vertical-radius { $legacy-webkit-radius: append($legacy-webkit-radius, first-value-of($vertical-radius)); }
52
- @include experimental-only-for(border-radius, $legacy-webkit-radius, $webkit: $legacy-support-for-webkit);
53
-
54
- // Official syntax for everyone else
55
- $radius: if($vertical-radius, #{$radius} / #{$vertical-radius}, $radius);
56
- @include experimental-only-for(border-radius, $radius, $moz: $legacy-support-for-mozilla);
57
- @include experimental(border-radius, $radius, $border-radius-support...);
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
- // Support for mozilla's syntax for specifying a corner
67
- @include experimental-only-for("border-radius-#{$vert}#{$horz}", $radius, $moz: $legacy-support-for-mozilla);
68
-
69
- // Official syntax for everyone else
70
- $corners: "border-#{$vert}-#{$horz}-radius";
71
- @include experimental-only-for($corners, $radius, $webkit: $legacy-support-for-webkit);
72
- @include experimental($corners, $radius, $border-radius-support...);
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 "shared";
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
- $box-shadow-support: -moz, -webkit, not -ms, not -o, not -khtml;
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 : #333333 !default;
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 : 0px !default;
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 : 0px !default;
17
+ $default-box-shadow-v-offset: 0px !default;
18
18
 
19
19
  // The default blur length.
20
- $default-box-shadow-blur : 5px !default;
20
+ $default-box-shadow-blur: 5px !default;
21
21
 
22
22
  // The default spread length.
23
- $default-box-shadow-spread : false !default;
23
+ $default-box-shadow-spread: null !default;
24
24
 
25
- // The default shadow inset: inset or false (for standard shadow).
26
- $default-box-shadow-inset : false !default;
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
- $default: -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color));
35
- $shadow: set-arglist-default($shadow, $default);
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 : $default-box-shadow-h-offset,
43
- $voff : $default-box-shadow-v-offset,
44
- $blur : $default-box-shadow-blur,
45
- $spread : $default-box-shadow-spread,
46
- $color : $default-box-shadow-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
- @if not ($inset == true or $inset == false or $inset == inset) {
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