diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index b82f7a31..10c357e0 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -10,8 +10,22 @@ COMPASS CHANGELOG 0.11.alpha.1 (UNRELEASED) ------------------------- +### Deprecations + * Deprecated imports and APIs from v0.10 have been removed. -* Changed defaults for the box-shadow and text-shadow mixin. Previously the horizontal and vertical offset were both 1, which expected a top left light source. They are now set to 0 which assumes a direct light source, a more generic default. +* Changed defaults for the box-shadow and text-shadow mixins. + Previously the horizontal and vertical offset were both 1, which + expected a top left light source. They are now set to 0 which assumes + a direct light source, a more generic default. +* The linear-gradient and radial-gradient mixins have been deprecated. + Instead use the background-image mixin and pass it a gradient function. + The deprecation warning will print out the correct call for you to use. +* The `css3` import is deprecated as well as the following css3 modules: + `box-shadow`, `text-shadow`, and `transform`. Instead import `css3/version-2`, + `box-shadow-v2`, `text-shadow-v2`, and `transform-v2` respectively. + However, you will only get deprecation warnings if you actually use + one of the deprecated mixins. The imports will be restored by 1.0 + with the new, betterer APIs. ### Blueprint diff --git a/frameworks/compass/stylesheets/compass/css3/_gradient.scss b/frameworks/compass/stylesheets/compass/css3/_gradient.scss index 346410a3..7a33154f 100644 --- a/frameworks/compass/stylesheets/compass/css3/_gradient.scss +++ b/frameworks/compass/stylesheets/compass/css3/_gradient.scss @@ -33,7 +33,21 @@ // - Firefox 3.6 // - Opera -@mixin linear-gradient($color-stops, $start: top, $image: false) { +@mixin linear-gradient($color-stops, $start: false, $image: false) { + @if $image { + @if $start { + @warn "The linear-gradient mixin is deprecated. Instead use: @include background-image(#{$image}, linear-gradient(#{$start}, #{$color-stops}))"; + } @else { + @warn "The linear-gradient mixin is deprecated. Instead use: @include background-image(#{$image}, linear-gradient(#{$color-stops}))"; + } + } @else { + @if $start { + @warn "The linear-gradient mixin is deprecated. Instead use: @include background-image(linear-gradient(#{$start}, #{$color-stops}))"; + } @else { + @warn "The linear-gradient mixin is deprecated. Instead use: @include background-image(linear-gradient(#{$color-stops}))"; + } + } + @if not $start { $start: top; } @include background-image($image, linear-gradient($start, $color-stops)); } @@ -73,6 +87,20 @@ // - Firefox 3.6 // - Opera -@mixin radial-gradient($color-stops, $center-position: center center, $image: false) { +@mixin radial-gradient($color-stops, $center-position: false, $image: false) { + @if $image { + @if $center-position { + @warn "The radial-gradient mixin is deprecated. Instead use: @include background-image(#{$image}, radial-gradient(#{$center-position}, #{$color-stops}))"; + } @else { + @warn "The radial-gradient mixin is deprecated. Instead use: @include background-image(#{$image}, radial-gradient(#{$color-stops}))"; + } + } @else { + @if $center-position { + @warn "The radial-gradient mixin is deprecated. Instead use: @include background-image(radial-gradient(#{$center-position}, #{$color-stops}))"; + } @else { + @warn "The radial-gradient mixin is deprecated. Instead use: @include background-image(radial-gradient(#{$color-stops}))"; + } + } + @if not $center-position { $center-position: center center; } @include background-image($image, radial-gradient($center-position, $color-stops)); } diff --git a/test/fixtures/stylesheets/compass/config.rb b/test/fixtures/stylesheets/compass/config.rb index 141d3aed..d99a2b90 100644 --- a/test/fixtures/stylesheets/compass/config.rb +++ b/test/fixtures/stylesheets/compass/config.rb @@ -12,3 +12,5 @@ line_comments = false asset_cache_buster do |path, file| "busted=true" end + +disable_warnings = true