compass 0.12.2.rc.0 → 0.12.2.rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. data/README.markdown +2 -0
  2. data/VERSION.yml +1 -1
  3. data/bin/compass +2 -1
  4. data/frameworks/compass/stylesheets/compass/_css3.scss +2 -1
  5. data/frameworks/compass/stylesheets/compass/_support.scss +4 -0
  6. data/frameworks/compass/stylesheets/compass/css3/_columns.scss +77 -0
  7. data/frameworks/compass/stylesheets/compass/css3/_hyphenation.scss +77 -0
  8. data/frameworks/compass/stylesheets/compass/css3/_images.scss +2 -0
  9. data/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +13 -7
  10. data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +52 -13
  11. data/frameworks/compass/stylesheets/compass/css3/_transform.scss +14 -14
  12. data/frameworks/compass/stylesheets/compass/css3/_transition.scss +129 -58
  13. data/frameworks/compass/stylesheets/compass/typography/text/_replacement.scss +10 -4
  14. data/lib/compass/commands/update_project.rb +1 -1
  15. data/lib/compass/exec/project_options_parser.rb +4 -0
  16. data/lib/compass/sass_extensions/functions/constants.rb +9 -0
  17. data/lib/compass/sass_extensions/functions/gradient_support.rb +10 -0
  18. data/lib/compass/sprite_importer.rb +1 -1
  19. data/test/fixtures/stylesheets/blueprint/css/single-imports/buttons.css +6 -8
  20. data/test/fixtures/stylesheets/compass/css/columns.css +92 -0
  21. data/test/fixtures/stylesheets/compass/css/gradients.css +0 -6
  22. data/test/fixtures/stylesheets/compass/css/hyphenation.css +16 -0
  23. data/test/fixtures/stylesheets/compass/css/lists.css +6 -8
  24. data/test/fixtures/stylesheets/compass/css/replacement.css +59 -0
  25. data/test/fixtures/stylesheets/compass/css/text_shadow.css +22 -4
  26. data/test/fixtures/stylesheets/compass/css/transition.css +78 -0
  27. data/test/fixtures/stylesheets/compass/sass/columns.scss +17 -0
  28. data/test/fixtures/stylesheets/compass/sass/hyphenation.scss +11 -0
  29. data/test/fixtures/stylesheets/compass/sass/replacement.scss +22 -0
  30. data/test/fixtures/stylesheets/compass/sass/text_shadow.scss +6 -1
  31. data/test/fixtures/stylesheets/compass/sass/transition.scss +12 -0
  32. data/test/helpers/test_case.rb +8 -1
  33. data/test/units/compass_module_test.rb +1 -1
  34. data/test/units/regressions_test.rb +35 -0
  35. metadata +87 -185
  36. data/bin/compass.compiled.rbc +0 -707
  37. data/lib/compass.rbc +0 -796
  38. data/lib/compass/actions.rbc +0 -2736
  39. data/lib/compass/app_integration.rbc +0 -836
  40. data/lib/compass/app_integration/merb.rbc +0 -106
  41. data/lib/compass/app_integration/rails.rbc +0 -2096
  42. data/lib/compass/app_integration/rails/configuration_defaults.rbc +0 -2430
  43. data/lib/compass/app_integration/rails/installer.rbc +0 -3677
  44. data/lib/compass/app_integration/stand_alone.rbc +0 -589
  45. data/lib/compass/app_integration/stand_alone/configuration_defaults.rbc +0 -721
  46. data/lib/compass/app_integration/stand_alone/installer.rbc +0 -1487
  47. data/lib/compass/browser_support.rbc +0 -1144
  48. data/lib/compass/commands.rbc +0 -307
  49. data/lib/compass/commands/base.rbc +0 -1044
  50. data/lib/compass/commands/clean_project.rbc +0 -1856
  51. data/lib/compass/commands/create_project.rbc +0 -2691
  52. data/lib/compass/commands/default.rbc +0 -1677
  53. data/lib/compass/commands/generate_grid_background.rbc +0 -1939
  54. data/lib/compass/commands/help.rbc +0 -1921
  55. data/lib/compass/commands/imports.rbc +0 -969
  56. data/lib/compass/commands/installer_command.rbc +0 -807
  57. data/lib/compass/commands/interactive.rbc +0 -1341
  58. data/lib/compass/commands/list_frameworks.rbc +0 -1111
  59. data/lib/compass/commands/print_version.rbc +0 -2478
  60. data/lib/compass/commands/project_base.rbc +0 -2085
  61. data/lib/compass/commands/project_stats.rbc +0 -4202
  62. data/lib/compass/commands/registry.rbc +0 -1350
  63. data/lib/compass/commands/sprite.rbc +0 -2212
  64. data/lib/compass/commands/stamp_pattern.rbc +0 -2011
  65. data/lib/compass/commands/unpack_extension.rbc +0 -2348
  66. data/lib/compass/commands/update_project.rbc +0 -3002
  67. data/lib/compass/commands/validate_project.rbc +0 -1686
  68. data/lib/compass/commands/watch_project.rbc +0 -4155
  69. data/lib/compass/commands/write_configuration.rbc +0 -2896
  70. data/lib/compass/compiler.rbc +0 -4913
  71. data/lib/compass/configuration.rbc +0 -1398
  72. data/lib/compass/configuration/adapters.rbc +0 -2088
  73. data/lib/compass/configuration/comments.rbc +0 -843
  74. data/lib/compass/configuration/data.rbc +0 -2633
  75. data/lib/compass/configuration/defaults.rbc +0 -3617
  76. data/lib/compass/configuration/file_data.rbc +0 -643
  77. data/lib/compass/configuration/helpers.rbc +0 -3500
  78. data/lib/compass/configuration/inheritance.rbc +0 -3592
  79. data/lib/compass/configuration/paths.rbc +0 -412
  80. data/lib/compass/configuration/serialization.rbc +0 -1996
  81. data/lib/compass/dependencies.rbc +0 -232
  82. data/lib/compass/errors.rbc +0 -176
  83. data/lib/compass/exec.rbc +0 -500
  84. data/lib/compass/exec/command_option_parser.rbc +0 -676
  85. data/lib/compass/exec/global_options_parser.rbc +0 -1306
  86. data/lib/compass/exec/helpers.rbc +0 -758
  87. data/lib/compass/exec/project_options_parser.rbc +0 -1515
  88. data/lib/compass/exec/sub_command_ui.rbc +0 -1191
  89. data/lib/compass/frameworks.rbc +0 -3640
  90. data/lib/compass/grid_builder.rbc +0 -0
  91. data/lib/compass/installers.rbc +0 -152
  92. data/lib/compass/installers/bare_installer.rbc +0 -939
  93. data/lib/compass/installers/base.rbc +0 -4427
  94. data/lib/compass/installers/manifest.rbc +0 -3335
  95. data/lib/compass/installers/manifest_installer.rbc +0 -1591
  96. data/lib/compass/installers/template_context.rbc +0 -1030
  97. data/lib/compass/logger.rbc +0 -2317
  98. data/lib/compass/quick_cache.rbc +0 -324
  99. data/lib/compass/sass_extensions.rbc +0 -213
  100. data/lib/compass/sass_extensions/functions.rbc +0 -808
  101. data/lib/compass/sass_extensions/functions/colors.rbc +0 -1279
  102. data/lib/compass/sass_extensions/functions/constants.rbc +0 -1921
  103. data/lib/compass/sass_extensions/functions/cross_browser_support.rbc +0 -1966
  104. data/lib/compass/sass_extensions/functions/display.rbc +0 -1227
  105. data/lib/compass/sass_extensions/functions/enumerate.rbc +0 -446
  106. data/lib/compass/sass_extensions/functions/env.rbc +0 -299
  107. data/lib/compass/sass_extensions/functions/font_files.rbc +0 -821
  108. data/lib/compass/sass_extensions/functions/gradient_support.rbc +0 -14147
  109. data/lib/compass/sass_extensions/functions/image_size.rbc +0 -3152
  110. data/lib/compass/sass_extensions/functions/inline_image.rbc +0 -1678
  111. data/lib/compass/sass_extensions/functions/lists.rbc +0 -2601
  112. data/lib/compass/sass_extensions/functions/selectors.rbc +0 -1592
  113. data/lib/compass/sass_extensions/functions/sprites.rbc +0 -3792
  114. data/lib/compass/sass_extensions/functions/trig.rbc +0 -811
  115. data/lib/compass/sass_extensions/functions/urls.rbc +0 -5248
  116. data/lib/compass/sass_extensions/monkey_patches.rbc +0 -134
  117. data/lib/compass/sass_extensions/monkey_patches/browser_support.rbc +0 -2169
  118. data/lib/compass/sass_extensions/monkey_patches/traversal.rbc +0 -660
  119. data/lib/compass/sass_extensions/sprites.rbc +0 -363
  120. data/lib/compass/sass_extensions/sprites/base.rbc +0 -4529
  121. data/lib/compass/sass_extensions/sprites/engines.rbc +0 -662
  122. data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rbc +0 -1074
  123. data/lib/compass/sass_extensions/sprites/image.rbc +0 -2961
  124. data/lib/compass/sass_extensions/sprites/image_methods.rbc +0 -900
  125. data/lib/compass/sass_extensions/sprites/image_row.rbc +0 -1168
  126. data/lib/compass/sass_extensions/sprites/layout_methods.rbc +0 -3236
  127. data/lib/compass/sass_extensions/sprites/row_fitter.rbc +0 -2067
  128. data/lib/compass/sass_extensions/sprites/sprite_map.rbc +0 -1991
  129. data/lib/compass/sass_extensions/sprites/sprite_methods.rbc +0 -3190
  130. data/lib/compass/sass_extensions/sprites/sprites.rbc +0 -1573
  131. data/lib/compass/sprite_importer.rbc +0 -3573
  132. data/lib/compass/util.rbc +0 -552
  133. data/lib/compass/version.rbc +0 -1245
  134. data/test/helpers/command_line.rbc +0 -2820
  135. data/test/helpers/diff.rbc +0 -1104
  136. data/test/helpers/io.rbc +0 -962
  137. data/test/helpers/rails.rbc +0 -1116
  138. data/test/helpers/test_case.rbc +0 -1255
  139. data/test/integrations/compass_test.rbc +0 -6589
  140. data/test/integrations/rails_integration_test.rbc +0 -1342
  141. data/test/integrations/sprites_test.rbc +0 -6192
  142. data/test/test_helper.rbc +0 -1694
  143. data/test/units/actions_test.rbc +0 -644
  144. data/test/units/command_line_test.rbc +0 -1532
  145. data/test/units/compass_png_test.rbc +0 -0
  146. data/test/units/configuration_test.rbc +0 -3833
  147. data/test/units/rails_configuration_test.rbc +0 -1032
  148. data/test/units/sass_extensions_test.rbc +0 -3586
  149. data/test/units/sprites/engine_test.rbc +0 -962
  150. data/test/units/sprites/image_row_test.rbc +0 -1578
  151. data/test/units/sprites/image_test.rbc +0 -2836
  152. data/test/units/sprites/importer_test.rbc +0 -2620
  153. data/test/units/sprites/row_fitter_test.rbc +0 -1479
  154. data/test/units/sprites/sprite_command_test.rbc +0 -1147
  155. data/test/units/sprites/sprite_map_test.rbc +0 -6515
@@ -2,6 +2,8 @@
2
2
 
3
3
  Build Status: ![Build Status](https://secure.travis-ci.org/chriseppstein/compass.png)
4
4
 
5
+ Code Quality: [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/chriseppstein/compass)
6
+
5
7
  ## Resources
6
8
 
7
9
  * [Compass Homepage](http://compass-style.org/)
@@ -3,5 +3,5 @@
3
3
  :minor: 12
4
4
  :build: 2
5
5
  :state: rc
6
- :iteration: 0
6
+ :iteration: 1
7
7
  :name: Alnilam
@@ -22,7 +22,8 @@ fallback_load_path(File.join(File.dirname(__FILE__), '..', 'lib')) do
22
22
  end
23
23
 
24
24
  if defined?(Bundler)
25
- Bundler.require :assets
25
+ require 'bundler/shared_helpers'
26
+ Bundler.require :assets if Bundler::SharedHelpers.in_bundle?
26
27
  end
27
28
 
28
29
  runner = Proc.new do
@@ -14,4 +14,5 @@
14
14
  @import "css3/transform";
15
15
  @import "css3/transition";
16
16
  @import "css3/appearance";
17
- @import "css3/regions";
17
+ @import "css3/regions";
18
+ @import "css3/hyphenation";
@@ -16,6 +16,10 @@ $legacy-support-for-ie8: $legacy-support-for-ie !default;
16
16
  // this combined variable.
17
17
  $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
18
18
 
19
+ // Whether to output legacy support for mozilla.
20
+ // Usually this means hacks to support Firefox 3.6 or earlier.
21
+ $legacy-support-for-mozilla: true;
22
+
19
23
  // Support for mozilla in experimental css3 properties (-moz).
20
24
  $experimental-support-for-mozilla : true !default;
21
25
  // Support for webkit in experimental css3 properties (-webkit).
@@ -69,3 +69,80 @@
69
69
  -moz, -webkit, -o, -ms, not -khtml, official
70
70
  );
71
71
  }
72
+
73
+ // Mixin for setting column-break-before
74
+ //
75
+ // * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
76
+ //
77
+ // Example:
78
+ // h2.before {@include column-break-before(always);}
79
+ //
80
+ // Which generates:
81
+ //
82
+ // h2.before {
83
+ // -webkit-column-break-before: always;
84
+ // column-break-before: always;}
85
+ @mixin column-break-before($value: auto){
86
+ @include experimental(column-break-before, $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
87
+ }
88
+
89
+ // Mixin for setting column-break-after
90
+ //
91
+ // * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
92
+ //
93
+ // Example:
94
+ // h2.after {@include column-break-after(always); }
95
+ //
96
+ // Which generates:
97
+ //
98
+ // h2.after {
99
+ // -webkit-column-break-after: always;
100
+ // column-break-after: always; }
101
+ @mixin column-break-after($value: auto){
102
+ @include experimental(column-break-after, $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
103
+ }
104
+
105
+ // Mixin for setting column-break-inside
106
+ //
107
+ // * legal values are auto, avoid, avoid-page, avoid-column
108
+ //
109
+ // Example:
110
+ // h2.inside {@include column-break-inside();}
111
+ // Which generates:
112
+ //
113
+ // h2.inside {
114
+ // -webkit-column-break-inside: auto;
115
+ // column-break-inside: auto;}
116
+ @mixin column-break-inside($value: auto){
117
+ @include experimental(column-break-inside, $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
118
+ }
119
+
120
+ // All-purpose mixin for setting column breaks.
121
+ //
122
+ // * legal values for $type : before, after, inside
123
+ // * legal values for '$value' are dependent on $type
124
+ // * when $type = before, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
125
+ // * when $type = after, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
126
+ // * when $type = inside, legal values are auto, avoid, avoid-page, avoid-column
127
+ //
128
+ // Examples:
129
+ // h2.before {@include column-break(before, always);}
130
+ // h2.after {@include column-break(after, always); }
131
+ // h2.inside {@include column-break(inside); }
132
+ //
133
+ // Which generates:
134
+ // h2.before {
135
+ // -webkit-column-break-before: always;
136
+ // column-break-before: always;}
137
+ //
138
+ // h2.after {
139
+ // -webkit-column-break-after: always;
140
+ // column-break-after: always; }
141
+ //
142
+ // h2.inside {
143
+ // -webkit-column-break-inside: auto;
144
+ // column-break-inside: auto;}
145
+
146
+ @mixin column-break($type: before, $value: auto){
147
+ @include experimental("column-break-#{$type}", $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
148
+ }
@@ -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
+ }
@@ -80,6 +80,8 @@
80
80
  // For use in IE 6 - 8. Best practice would have you apply this via a
81
81
  // conditional IE stylesheet, but if you must, you should place this before
82
82
  // any background-image properties that you have specified.
83
+ //
84
+ // For the `$orientation` parameter, you can pass `vertical` or `horizontal`.
83
85
  @mixin filter-gradient($start-color, $end-color, $orientation: vertical) {
84
86
  @include has-layout;
85
87
  $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
  }
@@ -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
  }
@@ -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 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,
@@ -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
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,24 @@ $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-microsoft { -ms-transition-property : prefixed-for-transition(-ms, $properties); }
49
+ @if $experimental-support-for-opera { -o-transition-property : prefixed-for-transition(-o, $properties); }
50
+ transition-property : $properties;
36
51
  }
37
52
 
38
53
  // One or more durations in seconds
@@ -40,9 +55,20 @@ $transitionable-prefixed-values: transform, transform-origin !default;
40
55
  // * for multiple, use a comma-delimited list
41
56
  // * these durations will affect the properties in the same list position
42
57
 
43
- @mixin transition-duration($duration: $default-transition-duration) {
44
- @if type-of($duration) == string { $duration: unquote($duration); }
45
- @include experimental(transition-duration, $duration,
58
+ @mixin transition-duration($duration-1: $default-transition-duration,
59
+ $duration-2 : false,
60
+ $duration-3 : false,
61
+ $duration-4 : false,
62
+ $duration-5 : false,
63
+ $duration-6 : false,
64
+ $duration-7 : false,
65
+ $duration-8 : false,
66
+ $duration-9 : false,
67
+ $duration-10: false
68
+ ) {
69
+ @if type-of($duration-1) == string { $duration-1: unquote($duration-1); }
70
+ $durations: compact($duration-1, $duration-2, $duration-3, $duration-4, $duration-5, $duration-6, $duration-7, $duration-8, $duration-9, $duration-10);
71
+ @include experimental(transition-duration, $durations,
46
72
  -moz, -webkit, -o, -ms, not -khtml, official
47
73
  );
48
74
  }
@@ -53,8 +79,20 @@ $transitionable-prefixed-values: transform, transform-origin !default;
53
79
  // * For multiple, use a comma-delimited list
54
80
  // * These functions will effect the properties in the same list position
55
81
 
56
- @mixin transition-timing-function($function: $default-transition-function) {
57
- @include experimental(transition-timing-function, unquote($function),
82
+ @mixin transition-timing-function($function-1: $default-transition-function,
83
+ $function-2 : false,
84
+ $function-3 : false,
85
+ $function-4 : false,
86
+ $function-5 : false,
87
+ $function-6 : false,
88
+ $function-7 : false,
89
+ $function-8 : false,
90
+ $function-9 : false,
91
+ $function-10: false
92
+ ) {
93
+ $function-1: unquote($function-1);
94
+ $functions: compact($function-1, $function-2, $function-3, $function-4, $function-5, $function-6, $function-7, $function-8, $function-9, $function-10);
95
+ @include experimental(transition-timing-function, $functions,
58
96
  -moz, -webkit, -o, -ms, not -khtml, official
59
97
  );
60
98
  }
@@ -64,9 +102,20 @@ $transitionable-prefixed-values: transform, transform-origin !default;
64
102
  // * for multiple, use a comma-delimited list
65
103
  // * these delays will effect the properties in the same list position
66
104
 
67
- @mixin transition-delay($delay: $default-transition-delay) {
68
- @if type-of($delay) == string { $delay: unquote($delay); }
69
- @include experimental(transition-delay, $delay,
105
+ @mixin transition-delay($delay-1: $default-transition-delay,
106
+ $delay-2 : false,
107
+ $delay-3 : false,
108
+ $delay-4 : false,
109
+ $delay-5 : false,
110
+ $delay-6 : false,
111
+ $delay-7 : false,
112
+ $delay-8 : false,
113
+ $delay-9 : false,
114
+ $delay-10: false
115
+ ) {
116
+ @if type-of($delay-1) == string { $delay-1: unquote($delay-1); }
117
+ $delays: compact($delay-1, $delay-2, $delay-3, $delay-4, $delay-5, $delay-6, $delay-7, $delay-8, $delay-9, $delay-10);
118
+ @include experimental(transition-delay, $delays,
70
119
  -moz, -webkit, -o, -ms, not -khtml, official
71
120
  );
72
121
  }
@@ -79,7 +128,7 @@ $transitionable-prefixed-values: transform, transform-origin !default;
79
128
  $function: $default-transition-function,
80
129
  $delay: $default-transition-delay
81
130
  ) {
82
- @include build-prefix-values(transition, compact($property $duration $function, false), $delay);
131
+ @include transition(compact($property $duration $function $delay));
83
132
  }
84
133
 
85
134
  @mixin transition(
@@ -95,60 +144,82 @@ $transitionable-prefixed-values: transform, transform-origin !default;
95
144
  $transition-10: false
96
145
  ) {
97
146
  @if $transition-1 == default {
98
- $transition-1 : (compact($default-transition-property, $default-transition-duration, $default-transition-function, $default-transition-delay));
147
+ $transition-1 : compact($default-transition-property $default-transition-duration $default-transition-function $default-transition-delay);
148
+ }
149
+ $transitions: false;
150
+ @if type-of($transition-1) == list and type-of(nth($transition-1,1)) == list {
151
+ $transitions: join($transition-1, compact($transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10), comma);
152
+ } @else {
153
+ $transitions : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10);
154
+ }
155
+ $delays: comma-list();
156
+ $has-delays: false;
157
+ $webkit-value: comma-list();
158
+ $moz-value: comma-list();
159
+ $ms-value: comma-list();
160
+ $o-value: comma-list();
161
+
162
+ // This block can be made considerably simpler at the point in time that
163
+ // we no longer need to deal with the differences in how delays are treated.
164
+ @each $transition in $transitions {
165
+ // Extract the values from the list
166
+ // (this would be cleaner if nth took a 3rd argument to provide a default value).
167
+ $property: nth($transition, 1);
168
+ $duration: false;
169
+ $timing-function: false;
170
+ $delay: false;
171
+ @if length($transition) > 1 { $duration: nth($transition, 2); }
172
+ @if length($transition) > 2 { $timing-function: nth($transition, 3); }
173
+ @if length($transition) > 3 { $delay: nth($transition, 4); $has-delays: true; }
174
+
175
+ // If a delay is provided without a timing function
176
+ @if is-time($timing-function) and not $delay { $delay: $timing-function; $timing-function: false; $has-delays: true; }
177
+
178
+ // Keep a list of delays in case one is specified
179
+ $delays: append($delays, if($delay, $delay, 0s));
180
+
181
+ $webkit-value: append($webkit-value, compact(prefixed-for-transition(-webkit, $property) $duration $timing-function));
182
+ $moz-value: append( $moz-value, compact(prefixed-for-transition( -moz, $property) $duration $timing-function $delay));
183
+ $ms-value: append( $ms-value, compact(prefixed-for-transition( -ms, $property) $duration $timing-function $delay));
184
+ $o-value: append( $o-value, compact(prefixed-for-transition( -o, $property) $duration $timing-function $delay));
99
185
  }
100
186
 
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);
187
+ @if $experimental-support-for-webkit { -webkit-transition : $webkit-value;
188
+ // old webkit doesn't support the delay parameter in the shorthand so we progressively enhance it.
189
+ @if $has-delays { -webkit-transition-delay : $delays; } }
190
+ @if $experimental-support-for-mozilla { -moz-transition : $moz-value; }
191
+ @if $experimental-support-for-microsoft { -ms-transition : $ms-value; }
192
+ @if $experimental-support-for-opera { -o-transition : $o-value; }
193
+ transition : $transitions;
103
194
  }
104
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);
113
-
114
- @each $value in $raw-values {
115
- $value: compact(join($value, false));
116
- $match: false;
196
+ // coerce a list to be comma delimited or make a new, empty comma delimited list.
197
+ @function comma-list($list: ()) {
198
+ @return join((), $list, comma);
199
+ }
117
200
 
118
- @each $prefixed-value in $transitionable-prefixed-values {
119
- @if index($value, $prefixed-value) {
120
- $index: index($value, $prefixed-value);
121
- $match: true;
122
- }
201
+ // Returns `$property` with the given prefix if it is found in `$transitionable-prefixed-values`.
202
+ @function prefixed-for-transition($prefix, $property) {
203
+ @if type-of($property) == list {
204
+ $new-list: comma-list();
205
+ @each $v in $property {
206
+ $new-list: append($new-list, prefixed-for-transition($prefix, $v));
123
207
  }
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
+ @return $new-list;
209
+ } @else {
210
+ @if index($transitionable-prefixed-values, $property) {
211
+ @return #{$prefix}-#{$property};
139
212
  } @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);
213
+ @return $property;
146
214
  }
147
215
  }
216
+ }
148
217
 
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);
218
+ // Checks if the value given is a unit of time.
219
+ @function is-time($value) {
220
+ @if type-of($value) == number {
221
+ @return not not index(s ms, unit($value));
222
+ } @else {
223
+ @return false;
224
+ }
154
225
  }