compass 0.10.0.rc4 → 0.10.0.rc5

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 (52) hide show
  1. data/VERSION.yml +1 -1
  2. data/examples/css3/extensions/fancy-fonts/templates/project/Prociono.otf +0 -0
  3. data/examples/css3/extensions/fancy-fonts/templates/project/bgrove.otf +0 -0
  4. data/examples/css3/extensions/fancy-fonts/templates/project/bgrove.ttf +0 -0
  5. data/examples/css3/extensions/fancy-fonts/templates/project/fancy-fonts.sass +7 -4
  6. data/examples/css3/extensions/fancy-fonts/templates/project/manifest.rb +5 -4
  7. data/examples/css3/gradients.html.haml +8 -0
  8. data/examples/css3/images/button_bg.png +0 -0
  9. data/examples/css3/images/example.png +0 -0
  10. data/examples/css3/src/fancy-fonts.scss +9 -3
  11. data/examples/css3/src/gradients.scss +35 -26
  12. data/examples/css3/src/main.scss +3 -3
  13. data/features/command_line.feature +4 -3
  14. data/frameworks/compass/stylesheets/compass/_reset.scss +1 -1
  15. data/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +12 -12
  16. data/frameworks/compass/stylesheets/compass/css3/_background-origin.scss +12 -12
  17. data/frameworks/compass/stylesheets/compass/css3/_background-size.scss +1 -1
  18. data/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +12 -12
  19. data/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +6 -2
  20. data/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss +3 -1
  21. data/frameworks/compass/stylesheets/compass/css3/_box.scss +27 -9
  22. data/frameworks/compass/stylesheets/compass/css3/_columns.scss +33 -7
  23. data/frameworks/compass/stylesheets/compass/css3/_gradient.scss +25 -7
  24. data/frameworks/compass/stylesheets/compass/css3/_opacity.scss +18 -8
  25. data/frameworks/compass/stylesheets/compass/css3/_shared.scss +14 -14
  26. data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +12 -13
  27. data/frameworks/compass/stylesheets/compass/css3/_transform.scss +6 -2
  28. data/frameworks/compass/stylesheets/compass/css3/_transition.scss +12 -4
  29. data/frameworks/compass/stylesheets/compass/reset/_utilities.scss +133 -0
  30. data/frameworks/compass/stylesheets/compass/utilities/_text.scss +1 -0
  31. data/frameworks/compass/stylesheets/compass/utilities/general/_reset.scss +2 -122
  32. data/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.scss +1 -1
  33. data/frameworks/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss +4 -4
  34. data/frameworks/compass/stylesheets/compass/utilities/text/_ellipsis.scss +22 -9
  35. data/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.scss +1 -2
  36. data/frameworks/compass/stylesheets/compass/utilities/text/_replacement.scss +19 -8
  37. data/frameworks/compass/templates/ellipsis/ellipsis.sass +3 -0
  38. data/lib/compass.rb +0 -7
  39. data/lib/compass/app_integration/rails/configuration_defaults.rb +1 -1
  40. data/lib/compass/app_integration/rails/templates/compass-install-rails.rb +10 -26
  41. data/lib/compass/commands/help.rb +1 -1
  42. data/lib/compass/commands/project_base.rb +1 -0
  43. data/lib/compass/commands/update_project.rb +5 -2
  44. data/lib/compass/commands/watch_project.rb +1 -0
  45. data/lib/compass/sass_extensions/functions/display.rb +2 -1
  46. data/lib/compass/sass_extensions/functions/gradient_support.rb +11 -0
  47. data/lib/compass/version.rb +9 -0
  48. data/test/fixtures/stylesheets/compass/css/reset.css +0 -4
  49. metadata +11 -8
  50. data/examples/css3/extensions/fancy-fonts/templates/project/Vtks Revolt.ttf +0 -0
  51. data/examples/css3/extensions/fancy-fonts/templates/project/angelina.ttf +0 -0
  52. data/examples/css3/images/fresh-peas.jpg +0 -0
@@ -1,29 +1,55 @@
1
1
  @import "shared";
2
2
 
3
3
  // Specify the number of columns
4
- @mixin column-count($n) { @include experimental(column-count, $n); }
4
+ @mixin column-count($n) {
5
+ @include experimental(column-count, $n,
6
+ -moz, -webkit, -o, not -ms, not -khtml, official
7
+ );
8
+ }
5
9
 
6
10
  // Specify the gap between columns e.g. `20px`
7
- @mixin column-gap($u) { @include experimental(column-gap, $u); }
11
+ @mixin column-gap($u) {
12
+ @include experimental(column-gap, $u,
13
+ -moz, -webkit, -o, not -ms, not -khtml, official
14
+ );
15
+ }
8
16
 
9
17
  // Specify the width of columns e.g. `100px`
10
- @mixin column-width($u) { @include experimental(column-width, $u); }
18
+ @mixin column-width($u) {
19
+ @include experimental(column-width, $u,
20
+ -moz, -webkit, -o, not -ms, not -khtml, official
21
+ );
22
+ }
11
23
 
12
24
  // Specify the width of the rule between columns e.g. `1px`
13
- @mixin column-rule-width($w) { @include experimental(rule-width, $w); }
25
+ @mixin column-rule-width($w) {
26
+ @include experimental(rule-width, $w,
27
+ -moz, -webkit, -o, not -ms, not -khtml, official
28
+ );
29
+ }
14
30
 
15
31
  // Specify the style of the rule between columns e.g. `dotted`.
16
32
  // This works like border-style.
17
- @mixin column-rule-style($s) { @include experimental(rule-style, $s); }
33
+ @mixin column-rule-style($s) {
34
+ @include experimental(rule-style, $s,
35
+ -moz, -webkit, -o, not -ms, not -khtml, official
36
+ );
37
+ }
18
38
 
19
39
  // Specify the style of the rule between columns e.g. `dotted`.
20
40
  // This works like border-color.
21
41
 
22
- @mixin column-rule-color($c) { @include experimental(rule-color, $s); }
42
+ @mixin column-rule-color($c) {
43
+ @include experimental(rule-color, $s,
44
+ -moz, -webkit, -o, not -ms, not -khtml, official
45
+ );
46
+ }
23
47
 
24
48
  // Mixin encompassing all column rule rules
25
49
  // For example:
26
50
  // +column-rule(1px, solid, #c00)
27
51
  @mixin column-rule($w, $s: solid, $c: black) {
28
- @include experimental(column-rule, $w $s $c);
52
+ @include experimental(column-rule, $w $s $c,
53
+ -moz, -webkit, -o, not -ms, not -khtml, official
54
+ );
29
55
  }
@@ -22,18 +22,28 @@
22
22
  //
23
23
  // +linear-gradient(color-stops(white, blue 33%, black 67%))
24
24
  //
25
+ // This yields a linear gradient on top of a background image
26
+ //
27
+ // +linear-gradient(color_stops(white,black), "top", image-url('noise.png'))
25
28
  // Browsers Supported:
26
29
  //
27
30
  // - Chrome
28
31
  // - Safari
29
32
  // - Firefox 3.6
30
33
 
31
- @mixin linear-gradient($color-stops, $start: top) {
34
+ @mixin linear-gradient($color-stops, $start: top, $image: false) {
32
35
  // Firefox's gradient api is nice.
33
36
  // Webkit's gradient api sucks -- hence these backflips:
37
+ $background: unquote("");
38
+ @if $image { $background : $image + unquote(", "); }
34
39
  $end: grad-opposite-position($start);
35
- background-image: -webkit-gradient(linear, #{grad-point($start)}, #{grad-point($end)}, #{grad-color-stops($color-stops)});
36
- background-image: -moz-linear-gradient(#{$start}, #{$color-stops}); }
40
+ @if $experimental-support-for-webkit {
41
+ background-image: #{$background}-webkit-gradient(linear, grad-point($start), grad-point($end), grad-color-stops($color-stops));
42
+ }
43
+ @if $experimental-support-for-mozilla {
44
+ background-image: #{$background}-moz-linear-gradient($start, $color-stops);
45
+ }
46
+ }
37
47
 
38
48
  // Due to limitation's of webkit, the radial gradient mixin works best if you use
39
49
  // pixel-based color stops.
@@ -46,14 +56,22 @@
46
56
  // +radial-gradient(color-stops(#c00, #00c), "top left")
47
57
  // // Three colors, ending at 50px and passing thru #fff at 25px
48
58
  // +radial-gradient(color-stops(#c00, #fff, #00c 50px))
49
- //
59
+ // // gradient on top of a background image
60
+ // +radial-gradient(color_stops(#c00, #fff), "top left", image-url("noise.png")))
50
61
  // Browsers Supported:
51
62
  //
52
63
  // - Chrome
53
64
  // - Safari
54
65
  // - Firefox 3.6
55
66
 
56
- @mixin radial-gradient($color-stops, $center-position: unquote("center center")) {
67
+ @mixin radial-gradient($color-stops, $center-position: center center, $image: false) {
57
68
  $end-pos: grad-end-position($color-stops, true);
58
- background-image: -webkit-gradient(radial, #{grad-point($center-position)}, 0, #{grad-point($center-position)}, #{$end-pos}, #{grad-color-stops($color-stops)});
59
- background-image: -moz-radial-gradient(#{$center-position}, circle, #{$color-stops}); }
69
+ $background: unquote("");
70
+ @if $image { $background: $image + unquote(", "); }
71
+ @if $experimental-support-for-webkit {
72
+ background-image: #{$background}-webkit-gradient(radial, grad-point($center-position), 0, grad-point($center-position), $end-pos, grad-color-stops($color-stops));
73
+ }
74
+ @if $experimental-support-for-mozilla {
75
+ background-image: #{$background}-moz-radial-gradient($center-position, circle, $color-stops);
76
+ }
77
+ }
@@ -6,16 +6,26 @@
6
6
  // A number between 0 and 1, where 0 is transparent and 1 is opaque.
7
7
 
8
8
  @mixin opacity($opacity) {
9
+ // XXX consider only using the official property. I think -moz, -webkit, and -o support it.
9
10
  @include experimental(opacity, $opacity,
10
- $experimental-support-for-mozilla,
11
- $experimental-support-for-webkit,
12
- $experimental-support-for-opera,
13
- false, // microsoft uses filters below instead
14
- $experimental-support-for-khtml,
15
- true // official
11
+ -moz,
12
+ -webkit,
13
+ -o,
14
+ not -ms, // microsoft uses the filters below instead
15
+ -khtml,
16
+ official
16
17
  );
17
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})";
18
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)});
18
+ @if $experimental-support-for-microsoft {
19
+ $value: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})");
20
+ @include experimental(filter, $value,
21
+ not -moz,
22
+ not -webkit,
23
+ not -o,
24
+ -ms,
25
+ not -khtml,
26
+ official // even though filter is not an official css3 property, IE 6/7 expect it.
27
+ );
28
+ }
19
29
  }
20
30
 
21
31
  // Make an element completely transparent.
@@ -3,11 +3,11 @@ $experimental-support-for-mozilla : true !default;
3
3
  // Support for webkit in experimental css3 properties.
4
4
  $experimental-support-for-webkit : true !default;
5
5
  // Support for opera in experimental css3 properties.
6
- $experimental-support-for-opera : false !default;
6
+ $experimental-support-for-opera : true !default;
7
7
  // Support for microsoft in experimental css3 properties.
8
8
  $experimental-support-for-microsoft : true !default;
9
9
  // Support for khtml in experimental css3 properties.
10
- $experimental-support-for-khtml : false !default;
10
+ $experimental-support-for-khtml : true !default;
11
11
 
12
12
  // This mixin provides basic support for CSS3 properties and
13
13
  // their corresponding experimental CSS2 properties when
@@ -21,12 +21,12 @@ $experimental-support-for-khtml : false !default;
21
21
  $khtml : $experimental-support-for-khtml,
22
22
  $official : true
23
23
  ) {
24
- @if $moz { -moz-#{$property} : $value; }
25
- @if $webkit { -webkit-#{$property} : $value; }
26
- @if $o { -o-#{$property} : $value; }
27
- @if $ms { -ms-#{$property} : $value; }
28
- @if $khtml { -khtml-#{$property} : $value; }
29
- @if $official { #{$property} : $value; }
24
+ @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
25
+ @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
26
+ @if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
27
+ @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
28
+ @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
29
+ @if $official { #{$property} : $value; }
30
30
  }
31
31
 
32
32
  // Same as experimental(), but for cases when the property is the same and the value is vendorized
@@ -38,10 +38,10 @@ $experimental-support-for-khtml : false !default;
38
38
  $khtml : $experimental-support-for-khtml,
39
39
  $official : true
40
40
  ) {
41
- @if $moz { #{$property} : -moz-#{$value}; }
42
- @if $webkit { #{$property} : -webkit-#{$value}; }
43
- @if $o { #{$property} : -o-#{$value}; }
44
- @if $ms { #{$property} : -ms-#{$value}; }
45
- @if $khtml { #{$property} : -khtml-#{$value}; }
46
- @if $official { #{$property} : #{$value}; }
41
+ @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
42
+ @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
43
+ @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
44
+ @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
45
+ @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
46
+ @if $official { #{$property} : #{$value}; }
47
47
  }
@@ -1,26 +1,25 @@
1
1
  @import "shared";
2
2
 
3
- // Provides CSS text shadows.
4
- //
5
- // Arguments are color, horizontal offset, vertical offset, and blur
6
-
7
3
  // These defaults make the arguments optional for this mixin
8
- //
9
4
  // If you like, set different defaults in your project
10
5
 
11
- $default-text-shadow-color: #aaaaaa !default;
12
-
13
- $default-text-shadow-h-offset: 1px !default;
14
-
15
- $default-text-shadow-v-offset: 1px !default;
16
-
17
- $default-text-shadow-blur: 1px !default;
6
+ $default-text-shadow-color: #aaa !default;
7
+ $default-text-shadow-h-offset: 1px !default;
8
+ $default-text-shadow-v-offset: 1px !default;
9
+ $default-text-shadow-blur: 1px !default;
18
10
 
11
+ // Provides CSS text shadows.
12
+ // Arguments are color, horizontal offset, vertical offset, and blur
19
13
  @mixin text-shadow(
20
14
  $color: $default-text-shadow-color,
21
15
  $hoff: $default-text-shadow-h-offset,
22
16
  $voff: $default-text-shadow-v-offset,
23
17
  $blur: $default-text-shadow-blur
24
18
  ) {
25
- text-shadow: $color $hoff $voff $blur;
19
+ // XXX I'm surprised we don't need experimental support for this property.
20
+ @if $color == none {
21
+ text-shadow: none;
22
+ } @else {
23
+ text-shadow: $color $hoff $voff $blur;
24
+ }
26
25
  }
@@ -5,13 +5,17 @@
5
5
  // Apply a transform sent as a complete string.
6
6
 
7
7
  @mixin apply-transform($transform) {
8
- @include experimental(transform, $transform);
8
+ @include experimental(transform, $transform,
9
+ -moz, -webkit, -o, not -ms, not -khtml, official
10
+ );
9
11
  }
10
12
 
11
13
  // Apply a transform-origin sent as a complete string.
12
14
 
13
15
  @mixin apply-origin($origin) {
14
- @include experimental(transform-origin, $origin);
16
+ @include experimental(transform-origin, $origin,
17
+ -moz, -webkit, -o, not -ms, not -khtml, official
18
+ );
15
19
  }
16
20
 
17
21
  // transform-origin requires x and y coordinates
@@ -29,7 +29,9 @@ $default-transition-delay: false !default;
29
29
  // * also accepts "all" or "none"
30
30
 
31
31
  @mixin transition-property($properties: $default-transition-property) {
32
- @include experimental(transition-property, $properties);
32
+ @include experimental(transition-property, $properties,
33
+ -moz, -webkit, -o, not -ms, not -khtml, official
34
+ );
33
35
  }
34
36
 
35
37
  // One or more durations in seconds
@@ -38,7 +40,9 @@ $default-transition-delay: false !default;
38
40
  // * these durations will affect the properties in the same list position
39
41
 
40
42
  @mixin transition-duration($duration: $default-transition-duration) {
41
- @include experimental(transition-duration, $duration);
43
+ @include experimental(transition-duration, $duration,
44
+ -moz, -webkit, -o, not -ms, not -khtml, official
45
+ );
42
46
  }
43
47
 
44
48
  // One or more timing functions
@@ -48,7 +52,9 @@ $default-transition-delay: false !default;
48
52
  // * These functions will effect the properties in the same list position
49
53
 
50
54
  @mixin transition-timing-function($function: $default-transition-function) {
51
- @include experimental(transition-timing-function, $function);
55
+ @include experimental(transition-timing-function, $function,
56
+ -moz, -webkit, -o, not -ms, not -khtml, official
57
+ );
52
58
  }
53
59
 
54
60
  // One or more transition-delays in seconds
@@ -57,7 +63,9 @@ $default-transition-delay: false !default;
57
63
  // * these delays will effect the properties in the same list position
58
64
 
59
65
  @mixin transition-delay($delay: $default-transition-delay) {
60
- @include experimental(transition-delay, $delay);
66
+ @include experimental(transition-delay, $delay,
67
+ -moz, -webkit, -o, not -ms, not -khtml, official
68
+ );
61
69
  }
62
70
 
63
71
  // Transition all-in-one shorthand
@@ -0,0 +1,133 @@
1
+ // Based on [Eric Meyer's reset](http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/)
2
+ // Global reset rules.
3
+ // For more specific resets, use the reset mixins provided below
4
+ //
5
+ // *Please Note*: tables still need `cellspacing="0"` in the markup.
6
+ @mixin global-reset {
7
+ html, body, div, span, applet, object, iframe,
8
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
9
+ a, abbr, acronym, address, big, cite, code,
10
+ del, dfn, em, font, img, ins, kbd, q, s, samp,
11
+ small, strike, strong, sub, sup, tt, var,
12
+ dl, dt, dd, ol, ul, li,
13
+ fieldset, form, label, legend,
14
+ table, caption, tbody, tfoot, thead, tr, th, td {
15
+ @include reset-box-model;
16
+ @include reset-font; }
17
+ body {
18
+ @include reset-body; }
19
+ ol, ul {
20
+ @include reset-list-style; }
21
+ table {
22
+ @include reset-table; }
23
+ caption, th, td {
24
+ @include reset-table-cell; }
25
+ q, blockquote {
26
+ @include reset-quotation; }
27
+ a img {
28
+ @include reset-image-anchor-border; } }
29
+
30
+ // Reset all elements within some selector scope. To reset the selector itself,
31
+ // mixin the appropriate reset mixin for that element type as well. This could be
32
+ // useful if you want to style a part of your page in a dramatically different way.
33
+ //
34
+ // *Please Note*: tables still need `cellspacing="0"` in the markup.
35
+ @mixin nested-reset {
36
+ div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
37
+ pre, a, abbr, acronym, address, code, del, dfn, em, img,
38
+ dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr {
39
+ @include reset-box-model;
40
+ @include reset-font; }
41
+ table {
42
+ @include reset-table; }
43
+ caption, th, td {
44
+ @include reset-table-cell; }
45
+ q, blockquote {
46
+ @include reset-quotation; }
47
+ a img {
48
+ @include reset-image-anchor-border; } }
49
+
50
+ // Reset the box model measurements.
51
+ @mixin reset-box-model {
52
+ margin: 0;
53
+ padding: 0;
54
+ border: 0;
55
+ outline: 0; }
56
+
57
+ // Reset the font and vertical alignment.
58
+ @mixin reset-font {
59
+ font: {
60
+ weight: inherit;
61
+ style: inherit;
62
+ size: 100%;
63
+ family: inherit; };
64
+ vertical-align: baseline; }
65
+
66
+ // Resets the outline when focus.
67
+ // For accessibility you need to apply some styling in its place.
68
+ @mixin reset-focus {
69
+ outline: 0; }
70
+
71
+ // Reset a body element.
72
+ @mixin reset-body {
73
+ line-height: 1;
74
+ color: black;
75
+ background: white; }
76
+
77
+ // Reset the list style of an element.
78
+ @mixin reset-list-style {
79
+ list-style: none; }
80
+
81
+ // Reset a table
82
+ @mixin reset-table {
83
+ border-collapse: separate;
84
+ border-spacing: 0;
85
+ vertical-align: middle; }
86
+
87
+ // Reset a table cell (`th`, `td`)
88
+ @mixin reset-table-cell {
89
+ text-align: left;
90
+ font-weight: normal;
91
+ vertical-align: middle; }
92
+
93
+ // Reset a quotation (`q`, `blockquote`)
94
+ @mixin reset-quotation {
95
+ quotes: "" "";
96
+ &:before, &:after {
97
+ content: ""; } }
98
+
99
+ // Resets the border.
100
+ @mixin reset-image-anchor-border {
101
+ border: none; }
102
+
103
+ // Unrecognized elements are displayed inline.
104
+ // This reset provides a basic reset for html5 elements
105
+ // so they are rendered correctly in browsers that don't recognize them.
106
+ @mixin reset-html5 {
107
+ section, article, aside, header, footer, nav, dialog, figure {
108
+ display: block; } }
109
+
110
+ // Resets the display of inline and block elements to their default display
111
+ // according to their tag type. Elements that have a default display that varies across
112
+ // versions of html or browser are not handled here, but this covers the 90% use case.
113
+ // Usage Example:
114
+ //
115
+ // // Turn off the display for both of these classes
116
+ // .unregistered-only, .registered-only
117
+ // display: none
118
+ // // Now turn only one of them back on depending on some other context.
119
+ // body.registered
120
+ // +reset-display(".registered-only")
121
+ // body.unregistered
122
+ // +reset-display(".unregistered-only")
123
+ @mixin reset-display($selector: "", $important: false) {
124
+ #{append-selector(elements-of-type("inline"), $selector)} {
125
+ @if $important {
126
+ display: inline !important; }
127
+ @else {
128
+ display: inline; } }
129
+ #{append-selector(elements-of-type("block"), $selector)} {
130
+ @if $important {
131
+ display: block !important; }
132
+ @else {
133
+ display: block; } } }
@@ -1,2 +1,3 @@
1
+ @import "text/ellipsis";
1
2
  @import "text/nowrap";
2
3
  @import "text/replacement";