compass 0.12.7 → 0.13.alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. data/README.markdown +4 -6
  2. data/VERSION.yml +6 -0
  3. data/bin/compass +1 -2
  4. data/bin/compass.compiled.rbc +707 -0
  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/examples/css3/extensions/fancy-fonts/templates/project/bgrove.otf +0 -0
  10. data/examples/css3/extensions/fancy-fonts/templates/project/bgrove.ttf +0 -0
  11. data/features/step_definitions/command_line_steps.rb +1 -1
  12. data/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss +38 -41
  13. data/frameworks/compass/stylesheets/compass/_css3.scss +1 -3
  14. data/frameworks/compass/stylesheets/compass/_support.scss +0 -4
  15. data/frameworks/compass/stylesheets/compass/css3/_animation.scss +127 -0
  16. data/frameworks/compass/stylesheets/compass/css3/_appearance.scss +3 -4
  17. data/frameworks/compass/stylesheets/compass/css3/_box.scss +2 -2
  18. data/frameworks/compass/stylesheets/compass/css3/_columns.scss +11 -97
  19. data/frameworks/compass/stylesheets/compass/css3/_font-face.scss +4 -4
  20. data/frameworks/compass/stylesheets/compass/css3/_images.scss +2 -2
  21. data/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +7 -13
  22. data/frameworks/compass/stylesheets/compass/css3/_shared.scss +38 -0
  23. data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +13 -52
  24. data/frameworks/compass/stylesheets/compass/css3/_transform.scss +14 -14
  25. data/frameworks/compass/stylesheets/compass/css3/_transition.scss +60 -127
  26. data/frameworks/compass/stylesheets/compass/css3/_user-interface.scss +21 -0
  27. data/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +8 -6
  28. data/frameworks/compass/stylesheets/compass/typography/text/_replacement.scss +9 -35
  29. data/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +9 -5
  30. data/lib/compass.rbc +796 -0
  31. data/lib/compass/actions.rb +4 -6
  32. data/lib/compass/actions.rbc +2736 -0
  33. data/lib/compass/app_integration.rbc +836 -0
  34. data/lib/compass/app_integration/merb.rbc +106 -0
  35. data/lib/compass/app_integration/rails.rbc +2096 -0
  36. data/lib/compass/app_integration/rails/configuration_defaults.rbc +2430 -0
  37. data/lib/compass/app_integration/rails/installer.rbc +3677 -0
  38. data/lib/compass/app_integration/stand_alone.rbc +589 -0
  39. data/lib/compass/app_integration/stand_alone/configuration_defaults.rbc +721 -0
  40. data/lib/compass/app_integration/stand_alone/installer.rbc +1487 -0
  41. data/lib/compass/browser_support.rbc +1144 -0
  42. data/lib/compass/commands.rbc +307 -0
  43. data/lib/compass/commands/base.rbc +1044 -0
  44. data/lib/compass/commands/clean_project.rbc +1856 -0
  45. data/lib/compass/commands/create_project.rbc +2691 -0
  46. data/lib/compass/commands/default.rbc +1677 -0
  47. data/lib/compass/commands/generate_grid_background.rbc +1939 -0
  48. data/lib/compass/commands/help.rbc +1921 -0
  49. data/lib/compass/commands/imports.rbc +969 -0
  50. data/lib/compass/commands/installer_command.rbc +807 -0
  51. data/lib/compass/commands/interactive.rbc +1341 -0
  52. data/lib/compass/commands/list_frameworks.rbc +1111 -0
  53. data/lib/compass/commands/print_version.rbc +2478 -0
  54. data/lib/compass/commands/project_base.rb +1 -7
  55. data/lib/compass/commands/project_base.rbc +2085 -0
  56. data/lib/compass/commands/project_stats.rbc +4202 -0
  57. data/lib/compass/commands/registry.rbc +1350 -0
  58. data/lib/compass/commands/sprite.rbc +2212 -0
  59. data/lib/compass/commands/stamp_pattern.rbc +2011 -0
  60. data/lib/compass/commands/unpack_extension.rbc +2348 -0
  61. data/lib/compass/commands/update_project.rb +2 -2
  62. data/lib/compass/commands/update_project.rbc +3002 -0
  63. data/lib/compass/commands/validate_project.rbc +1686 -0
  64. data/lib/compass/commands/watch_project.rbc +4155 -0
  65. data/lib/compass/commands/write_configuration.rbc +2896 -0
  66. data/lib/compass/compiler.rb +2 -1
  67. data/lib/compass/compiler.rbc +4913 -0
  68. data/lib/compass/configuration.rbc +1398 -0
  69. data/lib/compass/configuration/adapters.rbc +2088 -0
  70. data/lib/compass/configuration/comments.rbc +843 -0
  71. data/lib/compass/configuration/data.rbc +2633 -0
  72. data/lib/compass/configuration/defaults.rbc +3617 -0
  73. data/lib/compass/configuration/file_data.rbc +643 -0
  74. data/lib/compass/configuration/helpers.rbc +3500 -0
  75. data/lib/compass/configuration/inheritance.rbc +3592 -0
  76. data/lib/compass/configuration/paths.rbc +412 -0
  77. data/lib/compass/configuration/serialization.rbc +1996 -0
  78. data/lib/compass/dependencies.rbc +232 -0
  79. data/lib/compass/errors.rbc +176 -0
  80. data/lib/compass/exec.rbc +500 -0
  81. data/lib/compass/exec/command_option_parser.rbc +676 -0
  82. data/lib/compass/exec/global_options_parser.rb +1 -1
  83. data/lib/compass/exec/global_options_parser.rbc +1306 -0
  84. data/lib/compass/exec/helpers.rbc +758 -0
  85. data/lib/compass/exec/project_options_parser.rb +0 -8
  86. data/lib/compass/exec/project_options_parser.rbc +1515 -0
  87. data/lib/compass/exec/sub_command_ui.rbc +1191 -0
  88. data/lib/compass/frameworks.rbc +3640 -0
  89. data/lib/compass/grid_builder.rbc +0 -0
  90. data/lib/compass/installers.rbc +152 -0
  91. data/lib/compass/installers/bare_installer.rbc +939 -0
  92. data/lib/compass/installers/base.rbc +4427 -0
  93. data/lib/compass/installers/manifest.rbc +3335 -0
  94. data/lib/compass/installers/manifest_installer.rbc +1591 -0
  95. data/lib/compass/installers/template_context.rbc +1030 -0
  96. data/lib/compass/logger.rbc +2317 -0
  97. data/lib/compass/quick_cache.rbc +324 -0
  98. data/lib/compass/sass_extensions.rbc +213 -0
  99. data/lib/compass/sass_extensions/functions.rbc +808 -0
  100. data/lib/compass/sass_extensions/functions/colors.rb +0 -14
  101. data/lib/compass/sass_extensions/functions/colors.rbc +1279 -0
  102. data/lib/compass/sass_extensions/functions/constants.rb +0 -9
  103. data/lib/compass/sass_extensions/functions/constants.rbc +1921 -0
  104. data/lib/compass/sass_extensions/functions/cross_browser_support.rbc +1966 -0
  105. data/lib/compass/sass_extensions/functions/display.rbc +1227 -0
  106. data/lib/compass/sass_extensions/functions/enumerate.rbc +446 -0
  107. data/lib/compass/sass_extensions/functions/env.rb +18 -0
  108. data/lib/compass/sass_extensions/functions/env.rbc +299 -0
  109. data/lib/compass/sass_extensions/functions/font_files.rbc +821 -0
  110. data/lib/compass/sass_extensions/functions/gradient_support.rb +4 -11
  111. data/lib/compass/sass_extensions/functions/gradient_support.rbc +14147 -0
  112. data/lib/compass/sass_extensions/functions/image_size.rbc +3152 -0
  113. data/lib/compass/sass_extensions/functions/inline_image.rbc +1678 -0
  114. data/lib/compass/sass_extensions/functions/lists.rbc +2601 -0
  115. data/lib/compass/sass_extensions/functions/math.rb +1 -1
  116. data/lib/compass/sass_extensions/functions/selectors.rbc +1592 -0
  117. data/lib/compass/sass_extensions/functions/sprites.rb +11 -14
  118. data/lib/compass/sass_extensions/functions/sprites.rbc +3792 -0
  119. data/lib/compass/sass_extensions/functions/trig.rbc +811 -0
  120. data/lib/compass/sass_extensions/functions/urls.rbc +5248 -0
  121. data/lib/compass/sass_extensions/monkey_patches.rbc +134 -0
  122. data/lib/compass/sass_extensions/monkey_patches/browser_support.rbc +2169 -0
  123. data/lib/compass/sass_extensions/monkey_patches/traversal.rbc +660 -0
  124. data/lib/compass/sass_extensions/sprites.rbc +363 -0
  125. data/lib/compass/sass_extensions/sprites/base.rbc +4529 -0
  126. data/lib/compass/sass_extensions/sprites/engines.rb +3 -3
  127. data/lib/compass/sass_extensions/sprites/engines.rbc +662 -0
  128. data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb +6 -8
  129. data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rbc +1074 -0
  130. data/lib/compass/sass_extensions/sprites/image.rbc +2961 -0
  131. data/lib/compass/sass_extensions/sprites/image_methods.rb +1 -0
  132. data/lib/compass/sass_extensions/sprites/image_methods.rbc +900 -0
  133. data/lib/compass/sass_extensions/sprites/image_row.rbc +1168 -0
  134. data/lib/compass/sass_extensions/sprites/layout_methods.rbc +3236 -0
  135. data/lib/compass/sass_extensions/sprites/row_fitter.rbc +2067 -0
  136. data/lib/compass/sass_extensions/sprites/sprite_map.rb +0 -1
  137. data/lib/compass/sass_extensions/sprites/sprite_map.rbc +1991 -0
  138. data/lib/compass/sass_extensions/sprites/sprite_methods.rb +3 -13
  139. data/lib/compass/sass_extensions/sprites/sprite_methods.rbc +3190 -0
  140. data/lib/compass/sass_extensions/sprites/sprites.rbc +1573 -0
  141. data/lib/compass/sprite_importer.rb +6 -10
  142. data/lib/compass/sprite_importer.rbc +3573 -0
  143. data/lib/compass/sprite_importer/content.erb +14 -12
  144. data/lib/compass/util.rbc +552 -0
  145. data/lib/compass/version.rb +11 -15
  146. data/lib/compass/version.rbc +1245 -0
  147. data/test/fixtures/sprites/public/images/numeric/200.png +0 -0
  148. data/test/fixtures/stylesheets/blueprint/css/screen.css +3 -2
  149. data/test/fixtures/stylesheets/blueprint/css/single-imports/buttons.css +8 -6
  150. data/test/fixtures/stylesheets/blueprint/css/single-imports/debug.css +2 -1
  151. data/test/fixtures/stylesheets/blueprint/css/single-imports/fancy-type.css +1 -1
  152. data/test/fixtures/stylesheets/blueprint/css/single-imports/reset-utilities.css +2 -41
  153. data/test/fixtures/stylesheets/blueprint/css/single-imports/reset.css +3 -5
  154. data/test/fixtures/stylesheets/busted_image_urls/tmp/screen.css +9 -0
  155. data/test/fixtures/stylesheets/compass/css/animation-with-legacy-ie.css +41 -0
  156. data/test/fixtures/stylesheets/compass/css/animation.css +41 -0
  157. data/test/fixtures/stylesheets/compass/css/columns.css +12 -120
  158. data/test/fixtures/stylesheets/compass/css/fonts.css +1 -1
  159. data/test/fixtures/stylesheets/compass/css/gradients.css +25 -1
  160. data/test/fixtures/stylesheets/compass/css/grid_background.css +14 -7
  161. data/test/fixtures/stylesheets/compass/css/lists.css +8 -6
  162. data/test/fixtures/stylesheets/compass/css/pie.css +1 -0
  163. data/test/fixtures/stylesheets/compass/css/reset.css +1 -1
  164. data/test/fixtures/stylesheets/compass/css/text_shadow.css +4 -22
  165. data/test/fixtures/stylesheets/compass/css/transition.css +16 -66
  166. data/test/fixtures/stylesheets/compass/css/user-interface.css +10 -0
  167. data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +21 -21
  168. data/test/fixtures/stylesheets/compass/sass/animation-with-legacy-ie.scss +19 -0
  169. data/test/fixtures/stylesheets/compass/sass/animation.scss +13 -0
  170. data/test/fixtures/stylesheets/compass/sass/columns.scss +0 -18
  171. data/test/fixtures/stylesheets/compass/sass/gradients.sass +4 -2
  172. data/test/fixtures/stylesheets/compass/sass/text_shadow.scss +1 -6
  173. data/test/fixtures/stylesheets/compass/sass/transition.scss +1 -12
  174. data/test/fixtures/stylesheets/compass/sass/user-interface.scss +7 -0
  175. data/test/fixtures/stylesheets/envtest/css/env.css +8 -0
  176. data/test/fixtures/stylesheets/envtest/sass/env.scss +16 -0
  177. data/test/fixtures/stylesheets/envtest/tmp/env.css +14 -0
  178. data/test/helpers/command_line.rbc +2820 -0
  179. data/test/helpers/diff.rbc +1104 -0
  180. data/test/helpers/io.rbc +962 -0
  181. data/test/helpers/rails.rbc +1116 -0
  182. data/test/helpers/test_case.rb +1 -8
  183. data/test/helpers/test_case.rbc +1255 -0
  184. data/test/integrations/compass_test.rb +10 -1
  185. data/test/integrations/compass_test.rbc +6589 -0
  186. data/test/integrations/rails_integration_test.rbc +1342 -0
  187. data/test/integrations/sprites_test.rb +70 -27
  188. data/test/integrations/sprites_test.rbc +6192 -0
  189. data/test/test_helper.rb +1 -2
  190. data/test/test_helper.rbc +1694 -0
  191. data/test/units/actions_test.rbc +644 -0
  192. data/test/units/command_line_test.rbc +1532 -0
  193. data/test/units/compass_module_test.rb +1 -1
  194. data/test/units/compass_png_test.rbc +0 -0
  195. data/test/units/configuration_test.rbc +3833 -0
  196. data/test/units/rails_configuration_test.rbc +1032 -0
  197. data/test/units/sass_extensions_test.rb +11 -21
  198. data/test/units/sass_extensions_test.rbc +3586 -0
  199. data/test/units/sprites/engine_test.rbc +962 -0
  200. data/test/units/sprites/image_row_test.rbc +1578 -0
  201. data/test/units/sprites/image_test.rbc +2836 -0
  202. data/test/units/sprites/importer_test.rbc +2620 -0
  203. data/test/units/sprites/row_fitter_test.rbc +1479 -0
  204. data/test/units/sprites/sprite_command_test.rbc +1147 -0
  205. data/test/units/sprites/sprite_map_test.rbc +6515 -0
  206. metadata +241 -94
  207. checksums.yaml +0 -7
  208. data/frameworks/compass/stylesheets/compass/css3/_filter.scss +0 -23
  209. data/frameworks/compass/stylesheets/compass/css3/_hyphenation.scss +0 -77
  210. data/test/fixtures/stylesheets/compass/css/filters.css +0 -29
  211. data/test/fixtures/stylesheets/compass/css/hyphenation.css +0 -16
  212. data/test/fixtures/stylesheets/compass/css/replacement.css +0 -59
  213. data/test/fixtures/stylesheets/compass/sass/filters.scss +0 -24
  214. data/test/fixtures/stylesheets/compass/sass/hyphenation.scss +0 -11
  215. data/test/fixtures/stylesheets/compass/sass/replacement.scss +0 -22
  216. data/test/units/regressions_test.rb +0 -35
@@ -16,7 +16,7 @@
16
16
  // [font generator](http://www.fontsquirrel.com/fontface/generator)
17
17
  //
18
18
 
19
- // In order to refer to a specific style of the font in your stylesheets as
19
+ // In order to refer to a specific style of the font in your stylesheets as
20
20
  // e.g. "font-style: italic;", you may add a couple of @font-face includes
21
21
  // containing the respective font files for each style and specying
22
22
  // respective the $style parameter.
@@ -24,8 +24,8 @@
24
24
  // Order of the includes matters, and it is: normal, bold, italic, bold+italic.
25
25
 
26
26
  @mixin font-face(
27
- $name,
28
- $font-files,
27
+ $name,
28
+ $font-files,
29
29
  $eot: false,
30
30
  $weight: false,
31
31
  $style: false
@@ -35,7 +35,7 @@
35
35
  font-family: quote($name);
36
36
  @if $eot {
37
37
  src: font-url($eot);
38
- $font-files: font-url($iefont) unquote("format('embedded-opentype')"), $font-files;
38
+ $font-files: font-url($iefont) unquote("format('eot')"), $font-files;
39
39
  }
40
40
  src: $font-files;
41
41
  @if $weight {
@@ -23,6 +23,7 @@
23
23
  @if $experimental-support-for-webkit and prefixed(-webkit, $backgrounds) { background: -webkit($backgrounds); }
24
24
  @if $experimental-support-for-mozilla and prefixed(-moz, $backgrounds) { background: -moz($backgrounds); }
25
25
  @if $experimental-support-for-opera and prefixed(-o, $backgrounds) { background: -o($backgrounds); }
26
+ @if $experimental-support-for-microsoft and prefixed(-ms, $backgrounds) { background: -ms($backgrounds); }
26
27
  @if $experimental-support-for-pie and $add-pie-bg { -pie-background: -pie($backgrounds); }
27
28
  background: $backgrounds ;
28
29
  }
@@ -70,6 +71,7 @@
70
71
  @if $experimental-support-for-webkit and prefixed(-webkit, $images) { background-image: -webkit($images); }
71
72
  @if $experimental-support-for-mozilla and prefixed(-moz, $images) { background-image: -moz($images); }
72
73
  @if $experimental-support-for-opera and prefixed(-o, $images) { background-image: -o($images); }
74
+ @if $experimental-support-for-microsoft and prefixed(-ms, $images) { background-image: -ms($images); }
73
75
  @if $experimental-support-for-pie and $add-pie-bg { @warn "PIE does not support background-image. Use @include background(#{$images}) instead." }
74
76
  background-image: $images ;
75
77
  }
@@ -78,8 +80,6 @@
78
80
  // For use in IE 6 - 8. Best practice would have you apply this via a
79
81
  // conditional IE stylesheet, but if you must, you should place this before
80
82
  // any background-image properties that you have specified.
81
- //
82
- // For the `$orientation` parameter, you can pass `vertical` or `horizontal`.
83
83
  @mixin filter-gradient($start-color, $end-color, $orientation: vertical) {
84
84
  @include has-layout;
85
85
  $gradient-type: if($orientation == vertical, 0, 1);
@@ -1,22 +1,16 @@
1
1
  @import "shared";
2
2
 
3
- // Set `$inline-block-alignment` to `none` or `false` to disable the output
4
- // of a vertical-align property in the inline-block mixin.
5
- // Or set it to a legal value for `vertical-align` to change the default.
6
- $inline-block-alignment: middle !default;
7
-
8
3
  // Provides a cross-browser method to implement `display: inline-block;`
9
- @mixin inline-block($alignment: $inline-block-alignment) {
10
- @if $legacy-support-for-mozilla {
11
- display: -moz-inline-stack;
4
+
5
+ @mixin inline-block {
6
+ @if $legacy-support-for-ie {
7
+ & { *display: inline; }
12
8
  }
9
+ display: -moz-inline-box;
10
+ -moz-box-orient: vertical;
13
11
  display: inline-block;
14
- @if $alignment and $alignment != none {
15
- vertical-align: $alignment;
16
- }
12
+ vertical-align: middle;
17
13
  @if $legacy-support-for-ie {
18
14
  *vertical-align: auto;
19
- zoom: 1;
20
- *display: inline;
21
15
  }
22
16
  }
@@ -36,3 +36,41 @@
36
36
  @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
37
37
  @if $official { #{$property} : #{$value}; }
38
38
  }
39
+
40
+ // Change the experimental-support settings in specific contexts.
41
+ @mixin set-experimental-support($moz: false, $webkit: false, $ms: false, $o: false, $khtml: false) {
42
+ $experimental-support-for-mozilla: $moz;
43
+ $experimental-support-for-webkit: $webkit;
44
+ $experimental-support-for-microsoft: $ms;
45
+ $experimental-support-for-opera: $o;
46
+ $experimental-support-for-khtml: $khtml;
47
+ }
48
+
49
+ // Change the legacy-support-for-ie* settings in specific contexts.
50
+ @mixin set-legacy-ie-support($ie6: false, $ie7: false, $ie8: false) {
51
+ $legacy-support-for-ie6: $ie6;
52
+ $legacy-support-for-ie7: $ie7;
53
+ $legacy-support-for-ie8: $ie8;
54
+ }
55
+
56
+ // This mixin allows you to change the experimental support settings for
57
+ // child (@content) styles.
58
+ @mixin with-only-support-for($moz: false, $webkit: false, $ms: false, $o: false, $khtml: false, $legacy-ie: false) {
59
+ // Capture the current state
60
+ $original-moz: $experimental-support-for-mozilla;
61
+ $original-webkit: $experimental-support-for-webkit;
62
+ $original-o: $experimental-support-for-opera;
63
+ $original-ms: $experimental-support-for-microsoft;
64
+ $original-khtml: $experimental-support-for-khtml;
65
+ $original-ie6: $legacy-support-for-ie6;
66
+ $original-ie7: $legacy-support-for-ie7;
67
+ $original-ie8: $legacy-support-for-ie8;
68
+ // Change support settings
69
+ @include set-experimental-support($moz, $webkit, $ms, $o, $khtml);
70
+ @include set-legacy-ie-support($legacy-ie, $legacy-ie, $legacy-ie);
71
+ // Apply styles
72
+ @content;
73
+ // Return to original support settings
74
+ @include set-legacy-ie-support($original-ie6, $original-ie7, $original-ie8);
75
+ @include set-experimental-support($original-moz, $original-webkit, $original-ms, $original-o, $original-khtml);
76
+ }
@@ -7,16 +7,10 @@ $default-text-shadow-color: #aaa !default;
7
7
  $default-text-shadow-h-offset: 0px !default;
8
8
  $default-text-shadow-v-offset: 0px !default;
9
9
  $default-text-shadow-blur: 1px !default;
10
- $default-text-shadow-spread: false !default;
11
10
 
12
11
  // Provides cross-browser text shadows when one or more shadows are needed.
13
12
  // Each shadow argument should adhere to the standard css3 syntax for the
14
13
  // text-shadow property.
15
- //
16
- // Note: if any shadow has a spread parameter, this will cause the mixin
17
- // to emit the shadow declaration twice, first without the spread,
18
- // then with the spread included. This allows you to progressively
19
- // enhance the browsers that do support the spread parameter.
20
14
  @mixin text-shadow(
21
15
  $shadow-1 : default,
22
16
  $shadow-2 : false,
@@ -30,58 +24,25 @@ $default-text-shadow-spread: false !default;
30
24
  $shadow-10: false
31
25
  ) {
32
26
  @if $shadow-1 == default {
33
- $shadow-1: compact($default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur $default-text-shadow-spread $default-text-shadow-color);
27
+ $shadow-1: $default-text-shadow-color $default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur;
34
28
  }
35
- $shadows-without-spread: join((),(),comma);
36
- $shadows: join((),(),comma);
37
- $has-spread: false;
38
- @each $shadow in compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5,
39
- $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10) {
40
- @if length($shadow) > 4 {
41
- $has-spread: true;
42
- $shadows-without-spread: append($shadows-without-spread, nth($shadow,1) nth($shadow,2) nth($shadow,3) nth($shadow,5));
43
- $shadows: append($shadows, $shadow);
44
- } else {
45
- $shadows-without-spread: append($shadows-without-spread, $shadow);
46
- $shadows: append($shadows, $shadow);
47
- }
48
- }
49
- @if $has-spread {
50
- text-shadow: $shadows-without-spread;
51
- }
52
- text-shadow: $shadows;
29
+ text-shadow: compact($shadow-1, $shadow-2, $shadow-3,
30
+ $shadow-4, $shadow-5, $shadow-6,
31
+ $shadow-7, $shadow-8, $shadow-9, $shadow-10);
53
32
  }
54
33
 
55
34
  // Provides a single cross-browser CSS text shadow.
56
- //
57
- // Provides sensible defaults for the color, horizontal offset, vertical offset, blur, and spread
58
- // according to the configuration defaults above.
35
+ // Includes default arguments for color, horizontal offset, vertical offset, and blur
59
36
  @mixin single-text-shadow(
60
- $hoff: false,
61
- $voff: false,
62
- $blur: false,
63
- $spread: false,
64
- $color: false
37
+ $color: $default-text-shadow-color,
38
+ $hoff: $default-text-shadow-h-offset,
39
+ $voff: $default-text-shadow-v-offset,
40
+ $blur: $default-text-shadow-blur
65
41
  ) {
66
- // A lot of people think the color comes first. It doesn't.
67
- @if type-of($hoff) == color {
68
- $temp-color: $hoff;
69
- $hoff: $voff;
70
- $voff: $blur;
71
- $blur: $spread;
72
- $spread: $color;
73
- $color: $temp-color;
74
- }
75
- // Can't rely on default assignment with multiple supported argument orders.
76
- $hoff: if($hoff, $hoff, $default-text-shadow-h-offset);
77
- $voff: if($voff, $voff, $default-text-shadow-v-offset);
78
- $blur: if($blur, $blur, $default-text-shadow-blur );
79
- $spread: if($spread, $spread, $default-text-shadow-spread );
80
- $color: if($color, $color, $default-text-shadow-color );
81
- // We don't need experimental support for this property.
82
- @if $color == none or $hoff == none {
83
- @include text-shadow(none);
42
+ // XXX I'm surprised we don't need experimental support for this property.
43
+ @if $color == none {
44
+ text-shadow: none;
84
45
  } @else {
85
- @include text-shadow(compact($hoff $voff $blur $spread $color));
46
+ text-shadow: $color $hoff $voff $blur;
86
47
  }
87
48
  }
@@ -140,7 +140,7 @@ $default-skew-y : 5deg !default;
140
140
  //
141
141
  // @include transform( transforms [, 3D-only ] )
142
142
  //
143
- // where 'transforms' is a space separated list of all the transforms to be applied.
143
+ // where 'transforms' is a space separated list of all the transforms to be applied
144
144
  @mixin transform(
145
145
  $transform,
146
146
  $only3d: false
@@ -174,8 +174,8 @@ $default-skew-y : 5deg !default;
174
174
  //
175
175
  // @include perspective( perspective )
176
176
  //
177
- // where 'perspective' is a unitless number representing the depth of the
178
- // z-axis. The higher the perspective, the more exaggerated the foreshortening.
177
+ // where 'perspective' is a uniless number representing the depth of the z-axis
178
+ // the higher the perspective, the more exagerated the foreshortening.
179
179
  // values from 500 to 1000 are more-or-less "normal" - a good starting-point.
180
180
  @mixin perspective($p) {
181
181
  @include experimental(perspective, $p,
@@ -198,8 +198,8 @@ $default-skew-y : 5deg !default;
198
198
  //
199
199
  // @include transform-style( [ style ] )
200
200
  //
201
- // where `style` can be either `flat` or `preserve-3d`.
202
- // Browsers default to `flat`, mixin defaults to `preserve-3d`.
201
+ // where `style` can be either `flat` or `preserve-3d`
202
+ // browsers default to `flat`, mixin defaults to `preserve-3d`
203
203
  @mixin transform-style($style: preserve-3d) {
204
204
  @include experimental(transform-style, $style,
205
205
  -moz, -webkit, -o, -ms, not -khtml, official
@@ -210,8 +210,8 @@ $default-skew-y : 5deg !default;
210
210
  //
211
211
  // @include backface-visibility( [ visibility ] )
212
212
  //
213
- // where `visibility` can be either `visible` or `hidden`.
214
- // Browsers default to visible, mixin defaults to hidden
213
+ // where `visibility` can be either `visible` or `hidden`
214
+ // browsers default to visible, mixin defaults to hidden
215
215
  @mixin backface-visibility($visibility: hidden) {
216
216
  @include experimental(backface-visibility, $visibility,
217
217
  -moz, -webkit, -o, -ms, not -khtml, official
@@ -362,9 +362,9 @@ $default-skew-y : 5deg !default;
362
362
 
363
363
  // Rotate an object around an arbitrary axis (3D)
364
364
  // @include rotate( [ vector-x, vector-y, vector-z, rotation, perspective ] )
365
- // where the 'vector-' arguments accept unitless numbers.
366
- // These numbers are not important on their own, but in relation to one another
367
- // creating an axis from your transform-origin, along the axis of Xx = Yy = Zz.
365
+ // where the 'vector-' arguments accept unitless numbers
366
+ // these numbers are not important on their own, but in relation to one another
367
+ // creating an axis from your transform-origin, along the axis of Xx = Yy = Zz
368
368
  //
369
369
  // **Note** This mixin cannot be combined with other transform mixins.
370
370
  @mixin rotate3d(
@@ -385,7 +385,7 @@ $default-skew-y : 5deg !default;
385
385
 
386
386
  // Move an object along the x or y axis (2D)
387
387
  // @include translate( [ translate-x, translate-y, perspective, 3D-only ] )
388
- // where the 'translate-' arguments accept any distance in percentages or absolute (px, cm, in, em etc..) units.
388
+ // where the 'translate-' arguments accept any distance in percentages or absolute (px, cm, in, em etc..) units
389
389
  //
390
390
  // **Note** This mixin cannot be combined with other transform mixins.
391
391
  @mixin translate(
@@ -463,7 +463,7 @@ $default-skew-y : 5deg !default;
463
463
  //
464
464
  // @include skew( [ skew-x, skew-y, 3D-only ] )
465
465
  //
466
- // where the 'skew-' arguments accept css angles in degrees (deg) or radian (rad) units.
466
+ // where the 'skew-' arguments accept css angles in degrees (deg) or radian (rad) units
467
467
  //
468
468
  // **Note** This mixin cannot be combined with other transform mixins.
469
469
  @mixin skew(
@@ -504,8 +504,8 @@ $default-skew-y : 5deg !default;
504
504
 
505
505
  // Full transform mixins
506
506
  // For settings any combination of transforms as arguments
507
- // These are complex and not highly recommended for daily use. They are mainly
508
- // here for backward-compatibility purposes.
507
+ // These are complex and not highly recommended for daily use
508
+ // They are mainly here for backwards-compatability purposes
509
509
  //
510
510
  // * they include origin adjustments
511
511
  // * scale takes a multiplier (unitless), rotate and skew take degrees (deg)
@@ -30,23 +30,9 @@ $transitionable-prefixed-values: transform, transform-origin !default;
30
30
  // * for multiple, use a comma-delimited list
31
31
  // * also accepts "all" or "none"
32
32
 
33
- @mixin transition-property($property-1: $default-transition-property,
34
- $property-2 : false,
35
- $property-3 : false,
36
- $property-4 : false,
37
- $property-5 : false,
38
- $property-6 : false,
39
- $property-7 : false,
40
- $property-8 : false,
41
- $property-9 : false,
42
- $property-10: false
43
- ) {
44
- @if type-of($property-1) == string { $property-1: unquote($property-1); }
45
- $properties: compact($property-1, $property-2, $property-3, $property-4, $property-5, $property-6, $property-7, $property-8, $property-9, $property-10);
46
- @if $experimental-support-for-webkit { -webkit-transition-property : prefixed-for-transition(-webkit, $properties); }
47
- @if $experimental-support-for-mozilla { -moz-transition-property : prefixed-for-transition(-moz, $properties); }
48
- @if $experimental-support-for-opera { -o-transition-property : prefixed-for-transition(-o, $properties); }
49
- transition-property : $properties;
33
+ @mixin transition-property($properties: $default-transition-property) {
34
+ @if type-of($properties) == string { $properties: unquote($properties); }
35
+ @include build-prefix-values(transition-property, $properties);
50
36
  }
51
37
 
52
38
  // One or more durations in seconds
@@ -54,21 +40,10 @@ $transitionable-prefixed-values: transform, transform-origin !default;
54
40
  // * for multiple, use a comma-delimited list
55
41
  // * these durations will affect the properties in the same list position
56
42
 
57
- @mixin transition-duration($duration-1: $default-transition-duration,
58
- $duration-2 : false,
59
- $duration-3 : false,
60
- $duration-4 : false,
61
- $duration-5 : false,
62
- $duration-6 : false,
63
- $duration-7 : false,
64
- $duration-8 : false,
65
- $duration-9 : false,
66
- $duration-10: false
67
- ) {
68
- @if type-of($duration-1) == string { $duration-1: unquote($duration-1); }
69
- $durations: compact($duration-1, $duration-2, $duration-3, $duration-4, $duration-5, $duration-6, $duration-7, $duration-8, $duration-9, $duration-10);
70
- @include experimental(transition-duration, $durations,
71
- -moz, -webkit, -o, not -ms, not -khtml, official
43
+ @mixin transition-duration($duration: $default-transition-duration) {
44
+ @if type-of($duration) == string { $duration: unquote($duration); }
45
+ @include experimental(transition-duration, $duration,
46
+ -moz, -webkit, -o, -ms, not -khtml, official
72
47
  );
73
48
  }
74
49
 
@@ -78,21 +53,9 @@ $transitionable-prefixed-values: transform, transform-origin !default;
78
53
  // * For multiple, use a comma-delimited list
79
54
  // * These functions will effect the properties in the same list position
80
55
 
81
- @mixin transition-timing-function($function-1: $default-transition-function,
82
- $function-2 : false,
83
- $function-3 : false,
84
- $function-4 : false,
85
- $function-5 : false,
86
- $function-6 : false,
87
- $function-7 : false,
88
- $function-8 : false,
89
- $function-9 : false,
90
- $function-10: false
91
- ) {
92
- $function-1: unquote($function-1);
93
- $functions: compact($function-1, $function-2, $function-3, $function-4, $function-5, $function-6, $function-7, $function-8, $function-9, $function-10);
94
- @include experimental(transition-timing-function, $functions,
95
- -moz, -webkit, -o, not -ms, not -khtml, official
56
+ @mixin transition-timing-function($function: $default-transition-function) {
57
+ @include experimental(transition-timing-function, unquote($function),
58
+ -moz, -webkit, -o, -ms, not -khtml, official
96
59
  );
97
60
  }
98
61
 
@@ -101,21 +64,10 @@ $transitionable-prefixed-values: transform, transform-origin !default;
101
64
  // * for multiple, use a comma-delimited list
102
65
  // * these delays will effect the properties in the same list position
103
66
 
104
- @mixin transition-delay($delay-1: $default-transition-delay,
105
- $delay-2 : false,
106
- $delay-3 : false,
107
- $delay-4 : false,
108
- $delay-5 : false,
109
- $delay-6 : false,
110
- $delay-7 : false,
111
- $delay-8 : false,
112
- $delay-9 : false,
113
- $delay-10: false
114
- ) {
115
- @if type-of($delay-1) == string { $delay-1: unquote($delay-1); }
116
- $delays: compact($delay-1, $delay-2, $delay-3, $delay-4, $delay-5, $delay-6, $delay-7, $delay-8, $delay-9, $delay-10);
117
- @include experimental(transition-delay, $delays,
118
- -moz, -webkit, -o, not -ms, not -khtml, official
67
+ @mixin transition-delay($delay: $default-transition-delay) {
68
+ @if type-of($delay) == string { $delay: unquote($delay); }
69
+ @include experimental(transition-delay, $delay,
70
+ -moz, -webkit, -o, -ms, not -khtml, official
119
71
  );
120
72
  }
121
73
 
@@ -127,7 +79,7 @@ $transitionable-prefixed-values: transform, transform-origin !default;
127
79
  $function: $default-transition-function,
128
80
  $delay: $default-transition-delay
129
81
  ) {
130
- @include transition(compact($property $duration $function $delay));
82
+ @include build-prefix-values(transition, compact($property $duration $function, false), $delay);
131
83
  }
132
84
 
133
85
  @mixin transition(
@@ -145,77 +97,58 @@ $transitionable-prefixed-values: transform, transform-origin !default;
145
97
  @if $transition-1 == default {
146
98
  $transition-1 : compact($default-transition-property $default-transition-duration $default-transition-function $default-transition-delay);
147
99
  }
148
- $transitions: false;
149
- @if type-of($transition-1) == list and type-of(nth($transition-1,1)) == list {
150
- $transitions: join($transition-1, compact($transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10), comma);
151
- } @else {
152
- $transitions : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10);
153
- }
154
- $delays: comma-list();
155
- $has-delays: false;
156
- $webkit-value: comma-list();
157
- $moz-value: comma-list();
158
- $o-value: comma-list();
159
-
160
- // This block can be made considerably simpler at the point in time that
161
- // we no longer need to deal with the differences in how delays are treated.
162
- @each $transition in $transitions {
163
- // Extract the values from the list
164
- // (this would be cleaner if nth took a 3rd argument to provide a default value).
165
- $property: nth($transition, 1);
166
- $duration: false;
167
- $timing-function: false;
168
- $delay: false;
169
- @if length($transition) > 1 { $duration: nth($transition, 2); }
170
- @if length($transition) > 2 { $timing-function: nth($transition, 3); }
171
- @if length($transition) > 3 { $delay: nth($transition, 4); $has-delays: true; }
172
-
173
- // If a delay is provided without a timing function
174
- @if is-time($timing-function) and not $delay { $delay: $timing-function; $timing-function: false; $has-delays: true; }
175
-
176
- // Keep a list of delays in case one is specified
177
- $delays: append($delays, if($delay, $delay, 0s));
178
-
179
- $webkit-value: append($webkit-value, compact(prefixed-for-transition(-webkit, $property) $duration $timing-function));
180
- $moz-value: append( $moz-value, compact(prefixed-for-transition( -moz, $property) $duration $timing-function $delay));
181
- $o-value: append( $o-value, compact(prefixed-for-transition( -o, $property) $duration $timing-function $delay));
182
- }
183
100
 
184
- @if $experimental-support-for-webkit { -webkit-transition : $webkit-value;
185
- // old webkit doesn't support the delay parameter in the shorthand so we progressively enhance it.
186
- @if $has-delays { -webkit-transition-delay : $delays; } }
187
- @if $experimental-support-for-mozilla { -moz-transition : $moz-value; }
188
- @if $experimental-support-for-opera { -o-transition : $o-value; }
189
- transition : $transitions;
101
+ $transition : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10);
102
+ @include build-prefix-values(transition, $transition);
190
103
  }
191
104
 
192
- // coerce a list to be comma delimited or make a new, empty comma delimited list.
193
- @function comma-list($list: ()) {
194
- @return join((), $list, comma);
195
- }
105
+ @mixin build-prefix-values($property, $values, $delay: false) {
106
+ $raw-values: ($values);
107
+ $index: compact(false);
108
+
109
+ $webkit-value: compact(false);
110
+ $moz-value: compact(false);
111
+ $ms-value: compact(false);
112
+ $o-value: compact(false);
196
113
 
197
- // Returns `$property` with the given prefix if it is found in `$transitionable-prefixed-values`.
198
- @function prefixed-for-transition($prefix, $property) {
199
- @if type-of($property) == list {
200
- $new-list: comma-list();
201
- @each $v in $property {
202
- $new-list: append($new-list, prefixed-for-transition($prefix, $v));
114
+ @each $value in $raw-values {
115
+ $value: compact(join($value, false));
116
+ $match: false;
117
+
118
+ @each $prefixed-value in $transitionable-prefixed-values {
119
+ @if index($value, $prefixed-value) {
120
+ $index: index($value, $prefixed-value);
121
+ $match: true;
122
+ }
203
123
  }
204
- @return $new-list;
205
- } @else {
206
- @if index($transitionable-prefixed-values, $property) {
207
- @return #{$prefix}-#{$property};
124
+
125
+ @if $match {
126
+ $value-prefix: nth($value, $index);
127
+ $value-suffix: compact(false);
128
+
129
+ @for $i from 2 through length($value) {
130
+ $value-suffix: append($value-suffix, nth($value, $i), space);
131
+ }
132
+
133
+ $non-webkit-suffix: compact(append($value-suffix, $delay, space));
134
+
135
+ $webkit-value: append($webkit-value, compact(join(-webkit-#{$value-prefix}, $value-suffix)), comma);
136
+ $moz-value: append($moz-value, compact(join(-moz-#{$value-prefix}, $non-webkit-suffix)), comma);
137
+ $ms-value: append($ms-value, compact(join(-ms-#{$value-prefix}, $non-webkit-suffix)), comma);
138
+ $o-value: append($o-value, compact(join(-o-#{$value-prefix}, $non-webkit-suffix)), comma);
208
139
  } @else {
209
- @return $property;
140
+ $non-webkit-value: compact(append($value, $delay, space));
141
+
142
+ $webkit-value: append($webkit-value, $value, comma);
143
+ $moz-value: append($moz-value, $non-webkit-value, comma);
144
+ $ms-value: append($ms-value, $non-webkit-value, comma);
145
+ $o-value: append($o-value, $non-webkit-value, comma);
210
146
  }
211
147
  }
212
- }
213
148
 
214
- // Checks if the value given is a unit of time.
215
- @function is-time($value) {
216
- @if type-of($value) == number {
217
- @return not not index(s ms, unit($value));
218
- } @else {
219
- @return false;
220
- }
149
+ @if $experimental-support-for-webkit { -webkit-#{$property} : $webkit-value; @if $delay { -webkit-#{$property}-delay : $delay; } }
150
+ @if $experimental-support-for-mozilla { -moz-#{$property} : $moz-value; }
151
+ @if $experimental-support-for-microsoft { -ms-#{$property} : $ms-value; }
152
+ @if $experimental-support-for-opera { -o-#{$property} : $o-value; }
153
+ #{$property} : compact($values $delay);
221
154
  }