compass 0.12.0 → 0.12.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. checksums.yaml +7 -0
  2. data/README.markdown +18 -46
  3. data/Rakefile +34 -3
  4. data/bin/compass +2 -1
  5. data/features/command_line.feature +1 -0
  6. data/features/step_definitions/command_line_steps.rb +1 -1
  7. data/frameworks/compass/stylesheets/compass/_css3.scss +4 -0
  8. data/frameworks/compass/stylesheets/compass/_support.scss +4 -0
  9. data/frameworks/compass/stylesheets/compass/css3/_appearance.scss +7 -3
  10. data/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +4 -10
  11. data/frameworks/compass/stylesheets/compass/css3/_box.scss +2 -2
  12. data/frameworks/compass/stylesheets/compass/css3/_columns.scss +107 -10
  13. data/frameworks/compass/stylesheets/compass/css3/_filter.scss +23 -0
  14. data/frameworks/compass/stylesheets/compass/css3/_font-face.scss +4 -4
  15. data/frameworks/compass/stylesheets/compass/css3/_hyphenation.scss +77 -0
  16. data/frameworks/compass/stylesheets/compass/css3/_images.scss +2 -2
  17. data/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +13 -7
  18. data/frameworks/compass/stylesheets/compass/css3/_regions.scss +22 -0
  19. data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +52 -13
  20. data/frameworks/compass/stylesheets/compass/css3/_transform.scss +20 -20
  21. data/frameworks/compass/stylesheets/compass/css3/_transition.scss +128 -61
  22. data/frameworks/compass/stylesheets/compass/reset/_utilities.scss +4 -2
  23. data/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +69 -62
  24. data/frameworks/compass/stylesheets/compass/typography/text/_replacement.scss +35 -9
  25. data/frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss +1 -1
  26. data/lib/compass/actions.rb +6 -4
  27. data/lib/compass/commands.rb +4 -3
  28. data/lib/compass/commands/extension_command.rb +60 -0
  29. data/lib/compass/commands/project_base.rb +7 -1
  30. data/lib/compass/commands/update_project.rb +2 -2
  31. data/lib/compass/compiler.rb +1 -2
  32. data/lib/compass/configuration/adapters.rb +8 -2
  33. data/lib/compass/configuration/data.rb +1 -0
  34. data/lib/compass/exec/global_options_parser.rb +8 -1
  35. data/lib/compass/exec/project_options_parser.rb +8 -0
  36. data/lib/compass/sass_extensions/functions/colors.rb +14 -0
  37. data/lib/compass/sass_extensions/functions/constants.rb +9 -0
  38. data/lib/compass/sass_extensions/functions/font_files.rb +4 -2
  39. data/lib/compass/sass_extensions/functions/gradient_support.rb +11 -4
  40. data/lib/compass/sass_extensions/functions/math.rb +1 -1
  41. data/lib/compass/sass_extensions/functions/sprites.rb +10 -2
  42. data/lib/compass/sass_extensions/sprites/engines.rb +3 -3
  43. data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb +8 -6
  44. data/lib/compass/sass_extensions/sprites/sprite_methods.rb +3 -2
  45. data/lib/compass/sprite_importer.rb +1 -1
  46. data/lib/compass/version.rb +15 -11
  47. data/test/fixtures/stylesheets/blueprint/css/screen.css +3 -4
  48. data/test/fixtures/stylesheets/blueprint/css/single-imports/buttons.css +6 -8
  49. data/test/fixtures/stylesheets/blueprint/css/single-imports/debug.css +1 -2
  50. data/test/fixtures/stylesheets/blueprint/css/single-imports/fancy-type.css +1 -1
  51. data/test/fixtures/stylesheets/blueprint/css/single-imports/reset-utilities.css +8 -2
  52. data/test/fixtures/stylesheets/compass/css/border_radius.css +0 -6
  53. data/test/fixtures/stylesheets/compass/css/columns.css +126 -12
  54. data/test/fixtures/stylesheets/compass/css/filters.css +29 -0
  55. data/test/fixtures/stylesheets/compass/css/fonts.css +1 -1
  56. data/test/fixtures/stylesheets/compass/css/gradients.css +1 -25
  57. data/test/fixtures/stylesheets/compass/css/grid_background.css +7 -14
  58. data/test/fixtures/stylesheets/compass/css/hyphenation.css +16 -0
  59. data/test/fixtures/stylesheets/compass/css/lists.css +6 -8
  60. data/test/fixtures/stylesheets/compass/css/pie.css +0 -1
  61. data/test/fixtures/stylesheets/compass/css/regions.css +7 -0
  62. data/test/fixtures/stylesheets/compass/css/replacement.css +59 -0
  63. data/test/fixtures/stylesheets/compass/css/reset.css +2 -2
  64. data/test/fixtures/stylesheets/compass/css/text_shadow.css +22 -4
  65. data/test/fixtures/stylesheets/compass/css/transform.css +108 -0
  66. data/test/fixtures/stylesheets/compass/css/transition.css +67 -10
  67. data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +25 -25
  68. data/test/fixtures/stylesheets/compass/sass/columns.scss +19 -0
  69. data/test/fixtures/stylesheets/compass/sass/filters.scss +24 -0
  70. data/test/fixtures/stylesheets/compass/sass/gradients.sass +2 -4
  71. data/test/fixtures/stylesheets/compass/sass/hyphenation.scss +11 -0
  72. data/test/fixtures/stylesheets/compass/sass/regions.scss +4 -0
  73. data/test/fixtures/stylesheets/compass/sass/replacement.scss +22 -0
  74. data/test/fixtures/stylesheets/compass/sass/text_shadow.scss +6 -1
  75. data/test/fixtures/stylesheets/compass/sass/transition.scss +12 -0
  76. data/test/helpers/test_case.rb +8 -1
  77. data/test/integrations/sprites_test.rb +5 -5
  78. data/test/test_helper.rb +2 -1
  79. data/test/units/compass_module_test.rb +1 -1
  80. data/test/units/configuration_test.rb +15 -0
  81. data/test/units/regressions_test.rb +35 -0
  82. data/test/units/sass_extensions_test.rb +33 -11
  83. metadata +62 -222
  84. data/VERSION.yml +0 -5
  85. data/bin/compass.compiled.rbc +0 -707
  86. data/examples/compass/images/emblem-a043c4f148.png +0 -0
  87. data/examples/compass/images/flag-03c3b29b35.png +0 -0
  88. data/examples/compass/images/flag-21cfbfbfc8.png +0 -0
  89. data/examples/css3/extensions/fancy-fonts/templates/project/Prociono.otf +0 -0
  90. data/examples/css3/extensions/fancy-fonts/templates/project/bgrove.otf +0 -0
  91. data/examples/css3/extensions/fancy-fonts/templates/project/bgrove.ttf +0 -0
  92. data/lib/compass.rbc +0 -796
  93. data/lib/compass/actions.rbc +0 -2736
  94. data/lib/compass/app_integration.rbc +0 -836
  95. data/lib/compass/app_integration/merb.rbc +0 -106
  96. data/lib/compass/app_integration/rails.rbc +0 -2096
  97. data/lib/compass/app_integration/rails/configuration_defaults.rbc +0 -2430
  98. data/lib/compass/app_integration/rails/installer.rbc +0 -3677
  99. data/lib/compass/app_integration/stand_alone.rbc +0 -589
  100. data/lib/compass/app_integration/stand_alone/configuration_defaults.rbc +0 -721
  101. data/lib/compass/app_integration/stand_alone/installer.rbc +0 -1487
  102. data/lib/compass/browser_support.rbc +0 -1144
  103. data/lib/compass/commands.rbc +0 -307
  104. data/lib/compass/commands/base.rbc +0 -1044
  105. data/lib/compass/commands/clean_project.rbc +0 -1856
  106. data/lib/compass/commands/create_project.rbc +0 -2691
  107. data/lib/compass/commands/default.rbc +0 -1677
  108. data/lib/compass/commands/generate_grid_background.rbc +0 -1939
  109. data/lib/compass/commands/help.rbc +0 -1921
  110. data/lib/compass/commands/imports.rbc +0 -969
  111. data/lib/compass/commands/installer_command.rbc +0 -807
  112. data/lib/compass/commands/interactive.rbc +0 -1341
  113. data/lib/compass/commands/list_frameworks.rbc +0 -1111
  114. data/lib/compass/commands/print_version.rbc +0 -2478
  115. data/lib/compass/commands/project_base.rbc +0 -2085
  116. data/lib/compass/commands/project_stats.rbc +0 -4202
  117. data/lib/compass/commands/registry.rbc +0 -1350
  118. data/lib/compass/commands/sprite.rbc +0 -2212
  119. data/lib/compass/commands/stamp_pattern.rbc +0 -2011
  120. data/lib/compass/commands/unpack_extension.rbc +0 -2348
  121. data/lib/compass/commands/update_project.rbc +0 -3002
  122. data/lib/compass/commands/validate_project.rbc +0 -1686
  123. data/lib/compass/commands/watch_project.rbc +0 -4155
  124. data/lib/compass/commands/write_configuration.rbc +0 -2896
  125. data/lib/compass/compiler.rbc +0 -4913
  126. data/lib/compass/configuration.rbc +0 -1398
  127. data/lib/compass/configuration/adapters.rbc +0 -2088
  128. data/lib/compass/configuration/comments.rbc +0 -843
  129. data/lib/compass/configuration/data.rbc +0 -2633
  130. data/lib/compass/configuration/defaults.rbc +0 -3617
  131. data/lib/compass/configuration/file_data.rbc +0 -643
  132. data/lib/compass/configuration/helpers.rbc +0 -3500
  133. data/lib/compass/configuration/inheritance.rbc +0 -3592
  134. data/lib/compass/configuration/paths.rbc +0 -412
  135. data/lib/compass/configuration/serialization.rbc +0 -1996
  136. data/lib/compass/dependencies.rbc +0 -232
  137. data/lib/compass/errors.rbc +0 -176
  138. data/lib/compass/exec.rbc +0 -500
  139. data/lib/compass/exec/command_option_parser.rbc +0 -676
  140. data/lib/compass/exec/global_options_parser.rbc +0 -1306
  141. data/lib/compass/exec/helpers.rbc +0 -758
  142. data/lib/compass/exec/project_options_parser.rbc +0 -1515
  143. data/lib/compass/exec/sub_command_ui.rbc +0 -1191
  144. data/lib/compass/frameworks.rbc +0 -3640
  145. data/lib/compass/grid_builder.rbc +0 -0
  146. data/lib/compass/installers.rbc +0 -152
  147. data/lib/compass/installers/bare_installer.rbc +0 -939
  148. data/lib/compass/installers/base.rbc +0 -4427
  149. data/lib/compass/installers/manifest.rbc +0 -3335
  150. data/lib/compass/installers/manifest_installer.rbc +0 -1591
  151. data/lib/compass/installers/template_context.rbc +0 -1030
  152. data/lib/compass/logger.rbc +0 -2317
  153. data/lib/compass/quick_cache.rbc +0 -324
  154. data/lib/compass/sass_extensions.rbc +0 -213
  155. data/lib/compass/sass_extensions/functions.rbc +0 -808
  156. data/lib/compass/sass_extensions/functions/colors.rbc +0 -1279
  157. data/lib/compass/sass_extensions/functions/constants.rbc +0 -1921
  158. data/lib/compass/sass_extensions/functions/cross_browser_support.rbc +0 -1966
  159. data/lib/compass/sass_extensions/functions/display.rbc +0 -1227
  160. data/lib/compass/sass_extensions/functions/enumerate.rbc +0 -446
  161. data/lib/compass/sass_extensions/functions/env.rbc +0 -299
  162. data/lib/compass/sass_extensions/functions/font_files.rbc +0 -821
  163. data/lib/compass/sass_extensions/functions/gradient_support.rbc +0 -14147
  164. data/lib/compass/sass_extensions/functions/image_size.rbc +0 -3152
  165. data/lib/compass/sass_extensions/functions/inline_image.rbc +0 -1678
  166. data/lib/compass/sass_extensions/functions/lists.rbc +0 -2601
  167. data/lib/compass/sass_extensions/functions/selectors.rbc +0 -1592
  168. data/lib/compass/sass_extensions/functions/sprites.rbc +0 -3792
  169. data/lib/compass/sass_extensions/functions/trig.rbc +0 -811
  170. data/lib/compass/sass_extensions/functions/urls.rbc +0 -5248
  171. data/lib/compass/sass_extensions/monkey_patches.rbc +0 -134
  172. data/lib/compass/sass_extensions/monkey_patches/browser_support.rbc +0 -2169
  173. data/lib/compass/sass_extensions/monkey_patches/traversal.rbc +0 -660
  174. data/lib/compass/sass_extensions/sprites.rbc +0 -363
  175. data/lib/compass/sass_extensions/sprites/base.rbc +0 -4529
  176. data/lib/compass/sass_extensions/sprites/engines.rbc +0 -662
  177. data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rbc +0 -1074
  178. data/lib/compass/sass_extensions/sprites/image.rbc +0 -2961
  179. data/lib/compass/sass_extensions/sprites/image_methods.rbc +0 -900
  180. data/lib/compass/sass_extensions/sprites/image_row.rbc +0 -1168
  181. data/lib/compass/sass_extensions/sprites/layout_methods.rbc +0 -3236
  182. data/lib/compass/sass_extensions/sprites/row_fitter.rbc +0 -2067
  183. data/lib/compass/sass_extensions/sprites/sprite_map.rbc +0 -1991
  184. data/lib/compass/sass_extensions/sprites/sprite_methods.rbc +0 -3190
  185. data/lib/compass/sass_extensions/sprites/sprites.rbc +0 -1573
  186. data/lib/compass/sprite_importer.rbc +0 -3573
  187. data/lib/compass/util.rbc +0 -552
  188. data/lib/compass/version.rbc +0 -1245
  189. data/test/fixtures/stylesheets/busted_image_urls/tmp/screen.css +0 -9
  190. data/test/fixtures/stylesheets/envtest/tmp/env.css +0 -2
  191. data/test/helpers/command_line.rbc +0 -2820
  192. data/test/helpers/diff.rbc +0 -1104
  193. data/test/helpers/io.rbc +0 -962
  194. data/test/helpers/rails.rbc +0 -1116
  195. data/test/helpers/test_case.rbc +0 -1255
  196. data/test/integrations/compass_test.rbc +0 -6589
  197. data/test/integrations/rails_integration_test.rbc +0 -1342
  198. data/test/integrations/sprites_test.rbc +0 -6192
  199. data/test/test_helper.rbc +0 -1694
  200. data/test/units/actions_test.rbc +0 -644
  201. data/test/units/command_line_test.rbc +0 -1532
  202. data/test/units/compass_png_test.rbc +0 -0
  203. data/test/units/configuration_test.rbc +0 -3833
  204. data/test/units/rails_configuration_test.rbc +0 -1032
  205. data/test/units/sass_extensions_test.rbc +0 -3586
  206. data/test/units/sprites/engine_test.rbc +0 -962
  207. data/test/units/sprites/image_row_test.rbc +0 -1578
  208. data/test/units/sprites/image_test.rbc +0 -2836
  209. data/test/units/sprites/importer_test.rbc +0 -2620
  210. data/test/units/sprites/row_fitter_test.rbc +0 -1479
  211. data/test/units/sprites/sprite_command_test.rbc +0 -1147
  212. data/test/units/sprites/sprite_map_test.rbc +0 -6515
@@ -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('eot')"), $font-files;
38
+ $font-files: font-url($iefont) unquote("format('embedded-opentype')"), $font-files;
39
39
  }
40
40
  src: $font-files;
41
41
  @if $weight {
@@ -0,0 +1,77 @@
1
+ @import "shared";
2
+
3
+ // Mixins to support specific CSS Text Level 3 elements
4
+ //
5
+ //
6
+ //
7
+ // Mixin for word-break properties
8
+ // http://www.w3.org/css3-text/#word-break
9
+ // * legal values for $type : normal, keep-all, break-all
10
+ //
11
+ // Example:
12
+ // p.wordBreak {@include word-break(break-all);}
13
+ //
14
+ // Which generates:
15
+ // p.wordBreak {
16
+ // -ms-word-break: break-all;
17
+ // word-break: break-all;
18
+ // word-break: break-word;}
19
+ //
20
+ @mixin word-break($value: normal){
21
+ @if $value == break-all {
22
+ //Most browsers handle the break-all case the same...
23
+ @include experimental(word-break, $value,
24
+ not -moz, not -webkit, not -o, -ms, not -khtml, official
25
+ );
26
+ //Webkit handles break-all differently... as break-word
27
+ @include experimental(word-break, break-word,
28
+ not -moz, not -webkit, not -o, not -ms, not -khtml, official
29
+ );
30
+ }
31
+ @else {
32
+ @include experimental(word-break, $value,
33
+ not -moz, not -webkit, not -o, -ms, not -khtml, official
34
+ );
35
+ }
36
+ }
37
+
38
+ // Mixin for the hyphens property
39
+ //
40
+ // W3C specification: http://www.w3.org/TR/css3-text/#hyphens
41
+ // * legal values for $type : auto, manual, none
42
+ //
43
+ // Example:
44
+ // p {
45
+ // @include hyphens(auto);}
46
+ // Which generates:
47
+ // p {
48
+ // -moz-hyphens: auto;
49
+ // -webkit-hyphens: auto;
50
+ // hyphens: auto;}
51
+ //
52
+ @mixin hyphens($value: auto){
53
+ @include experimental(hyphens, $value,
54
+ -moz, -webkit, not -o, not -ms, not -khtml, official
55
+ );
56
+ }
57
+
58
+ // Mixin for x-browser hyphenation based on @auchenberg's post:
59
+ // Removes the need for the <wbr/> HTML tag
60
+ // http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
61
+ //
62
+ // Example:
63
+ // div {@include hyphenation;}
64
+ //
65
+ // Which generates:
66
+ // div {
67
+ // -ms-word-break: break-all;
68
+ // word-break: break-all;
69
+ // word-break: break-word;
70
+ // -moz-hyphens: auto;
71
+ // -webkit-hyphens: auto;
72
+ // hyphens: auto;}
73
+ //
74
+ @mixin hyphenation{
75
+ @include word-break(break-all);
76
+ @include hyphens;
77
+ }
@@ -23,7 +23,6 @@
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); }
27
26
  @if $experimental-support-for-pie and $add-pie-bg { -pie-background: -pie($backgrounds); }
28
27
  background: $backgrounds ;
29
28
  }
@@ -71,7 +70,6 @@
71
70
  @if $experimental-support-for-webkit and prefixed(-webkit, $images) { background-image: -webkit($images); }
72
71
  @if $experimental-support-for-mozilla and prefixed(-moz, $images) { background-image: -moz($images); }
73
72
  @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); }
75
73
  @if $experimental-support-for-pie and $add-pie-bg { @warn "PIE does not support background-image. Use @include background(#{$images}) instead." }
76
74
  background-image: $images ;
77
75
  }
@@ -80,6 +78,8 @@
80
78
  // For use in IE 6 - 8. Best practice would have you apply this via a
81
79
  // conditional IE stylesheet, but if you must, you should place this before
82
80
  // 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,16 +1,22 @@
1
1
  @import "shared";
2
2
 
3
- // Provides a cross-browser method to implement `display: inline-block;`
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;
4
7
 
5
- @mixin inline-block {
6
- @if $legacy-support-for-ie {
7
- & { *display: inline; }
8
+ // 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;
8
12
  }
9
- display: -moz-inline-box;
10
- -moz-box-orient: vertical;
11
13
  display: inline-block;
12
- vertical-align: middle;
14
+ @if $alignment and $alignment != none {
15
+ vertical-align: $alignment;
16
+ }
13
17
  @if $legacy-support-for-ie {
14
18
  *vertical-align: auto;
19
+ zoom: 1;
20
+ *display: inline;
15
21
  }
16
22
  }
@@ -0,0 +1,22 @@
1
+ @import "shared";
2
+
3
+ // Webkit, IE10 and future support for [CSS Regions](http://dev.w3.org/csswg/css3-regions/)
4
+ //
5
+ // $target is a value you use to link two regions of your css. Give the source of your content the flow-into property, and give your target container the flow-from property.
6
+ //
7
+ // For a visual explanation, see the diagrams at Chris Coyier's
8
+ // [CSS-Tricks](http://css-tricks.com/content-folding/)
9
+
10
+ @mixin flow-into($target) {
11
+ $target: unquote($target);
12
+ @include experimental(flow-into, $target,
13
+ not -moz, -webkit, not -o, -ms, not -khtml, not official
14
+ );
15
+ }
16
+
17
+ @mixin flow-from($target) {
18
+ $target: unquote($target);
19
+ @include experimental(flow-from, $target,
20
+ not -moz, -webkit, not -o, -ms, not -khtml, not official
21
+ );
22
+ }
@@ -7,10 +7,16 @@ $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;
10
11
 
11
12
  // Provides cross-browser text shadows when one or more shadows are needed.
12
13
  // Each shadow argument should adhere to the standard css3 syntax for the
13
14
  // 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.
14
20
  @mixin text-shadow(
15
21
  $shadow-1 : default,
16
22
  $shadow-2 : false,
@@ -24,25 +30,58 @@ $default-text-shadow-blur: 1px !default;
24
30
  $shadow-10: false
25
31
  ) {
26
32
  @if $shadow-1 == default {
27
- $shadow-1: $default-text-shadow-color $default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur;
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);
28
34
  }
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);
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;
32
53
  }
33
54
 
34
55
  // Provides a single cross-browser CSS text shadow.
35
- // Includes default arguments for color, horizontal offset, vertical offset, and blur
56
+ //
57
+ // Provides sensible defaults for the color, horizontal offset, vertical offset, blur, and spread
58
+ // according to the configuration defaults above.
36
59
  @mixin single-text-shadow(
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
60
+ $hoff: false,
61
+ $voff: false,
62
+ $blur: false,
63
+ $spread: false,
64
+ $color: false
41
65
  ) {
42
- // XXX I'm surprised we don't need experimental support for this property.
43
- @if $color == none {
44
- text-shadow: none;
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);
45
84
  } @else {
46
- text-shadow: $color $hoff $voff $blur;
85
+ @include text-shadow(compact($hoff $voff $blur $spread $color));
47
86
  }
48
87
  }
@@ -104,7 +104,7 @@ $default-skew-y : 5deg !default;
104
104
  $only3d: $only3d or -compass-list-size(-compass-list($origin)) > 2;
105
105
  @if $only3d {
106
106
  @include experimental(transform-origin, $origin,
107
- not -moz, -webkit, not -o, not -ms, not -khtml, official
107
+ -moz, -webkit, -o, -ms, not -khtml, official
108
108
  );
109
109
  } @else {
110
110
  @include experimental(transform-origin, $origin,
@@ -140,14 +140,14 @@ $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
147
147
  ) {
148
148
  @if $only3d {
149
149
  @include experimental(transform, $transform,
150
- not -moz, -webkit, not -o, not -ms, not -khtml, official
150
+ -moz, -webkit, -o, -ms, not -khtml, official
151
151
  );
152
152
  } @else {
153
153
  @include experimental(transform, $transform,
@@ -174,12 +174,12 @@ $default-skew-y : 5deg !default;
174
174
  //
175
175
  // @include perspective( perspective )
176
176
  //
177
- // where 'perspective' is a uniless number representing the depth of the z-axis
178
- // the higher the perspective, the more exagerated the foreshortening.
177
+ // where 'perspective' is a unitless number representing the depth of the
178
+ // z-axis. The higher the perspective, the more exaggerated 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,
182
- not -moz, -webkit, not -o, not -ms, not -khtml, official
182
+ -moz, -webkit, -o, -ms, not -khtml, official
183
183
  );
184
184
  }
185
185
 
@@ -190,7 +190,7 @@ $default-skew-y : 5deg !default;
190
190
  // where the two arguments represent x/y coordinates
191
191
  @mixin perspective-origin($origin: 50%) {
192
192
  @include experimental(perspective-origin, $origin,
193
- not -moz, -webkit, not -o, not -ms, not -khtml, official
193
+ -moz, -webkit, -o, -ms, not -khtml, official
194
194
  );
195
195
  }
196
196
 
@@ -198,11 +198,11 @@ $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
- not -moz, -webkit, not -o, not -ms, not -khtml, official
205
+ -moz, -webkit, -o, -ms, not -khtml, official
206
206
  );
207
207
  }
208
208
 
@@ -210,11 +210,11 @@ $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
- not -moz, -webkit, not -o, not -ms, not -khtml, official
217
+ -moz, -webkit, -o, -ms, not -khtml, official
218
218
  );
219
219
  }
220
220
 
@@ -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
508
- // They are mainly here for backwards-compatability purposes
507
+ // These are complex and not highly recommended for daily use. They are mainly
508
+ // here for backward-compatibility purposes.
509
509
  //
510
510
  // * they include origin adjustments
511
511
  // * scale takes a multiplier (unitless), rotate and skew take degrees (deg)
@@ -30,9 +30,23 @@ $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($properties: $default-transition-property) {
34
- @if type-of($properties) == string { $properties: unquote($properties); }
35
- @include build-prefix-values(transition-property, $properties);
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;
36
50
  }
37
51
 
38
52
  // One or more durations in seconds
@@ -40,10 +54,21 @@ $transitionable-prefixed-values: transform, transform-origin !default;
40
54
  // * for multiple, use a comma-delimited list
41
55
  // * these durations will affect the properties in the same list position
42
56
 
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
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
47
72
  );
48
73
  }
49
74
 
@@ -53,9 +78,21 @@ $transitionable-prefixed-values: transform, transform-origin !default;
53
78
  // * For multiple, use a comma-delimited list
54
79
  // * These functions will effect the properties in the same list position
55
80
 
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
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
59
96
  );
60
97
  }
61
98
 
@@ -64,10 +101,21 @@ $transitionable-prefixed-values: transform, transform-origin !default;
64
101
  // * for multiple, use a comma-delimited list
65
102
  // * these delays will effect the properties in the same list position
66
103
 
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
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
71
119
  );
72
120
  }
73
121
 
@@ -79,7 +127,7 @@ $transitionable-prefixed-values: transform, transform-origin !default;
79
127
  $function: $default-transition-function,
80
128
  $delay: $default-transition-delay
81
129
  ) {
82
- @include build-prefix-values(transition, compact($property $duration $function, false), $delay);
130
+ @include transition(compact($property $duration $function $delay));
83
131
  }
84
132
 
85
133
  @mixin transition(
@@ -95,60 +143,79 @@ $transitionable-prefixed-values: transform, transform-origin !default;
95
143
  $transition-10: false
96
144
  ) {
97
145
  @if $transition-1 == default {
98
- $transition-1 : (compact($default-transition-property, $default-transition-duration, $default-transition-function, $default-transition-delay));
146
+ $transition-1 : compact($default-transition-property $default-transition-duration $default-transition-function $default-transition-delay);
147
+ }
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));
99
182
  }
100
183
 
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);
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;
103
190
  }
104
191
 
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);
113
-
114
- @each $value in $raw-values {
115
- $value: compact(join($value, false));
116
- $match: false;
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
+ }
117
196
 
118
- @each $prefixed-value in $transitionable-prefixed-values {
119
- @if index($value, $prefixed-value) {
120
- $index: index($value, $prefixed-value);
121
- $match: true;
122
- }
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));
123
203
  }
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);
204
+ @return $new-list;
205
+ } @else {
206
+ @if index($transitionable-prefixed-values, $property) {
207
+ @return #{$prefix}-#{$property};
139
208
  } @else {
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);
209
+ @return $property;
146
210
  }
147
211
  }
212
+ }
148
213
 
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);
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
+ }
154
221
  }