Deprecate the radial-gradient mixin, linear-gradient mixin, and add
deprecation notices to the changelog.
This commit is contained in:
parent
8e2b5f4d1c
commit
d34cf1de85
@ -10,8 +10,22 @@ COMPASS CHANGELOG
|
|||||||
0.11.alpha.1 (UNRELEASED)
|
0.11.alpha.1 (UNRELEASED)
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
### Deprecations
|
||||||
|
|
||||||
* Deprecated imports and APIs from v0.10 have been removed.
|
* 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
|
### Blueprint
|
||||||
|
|
||||||
|
@ -33,7 +33,21 @@
|
|||||||
// - Firefox 3.6
|
// - Firefox 3.6
|
||||||
// - Opera
|
// - 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));
|
@include background-image($image, linear-gradient($start, $color-stops));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +87,20 @@
|
|||||||
// - Firefox 3.6
|
// - Firefox 3.6
|
||||||
// - Opera
|
// - 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));
|
@include background-image($image, radial-gradient($center-position, $color-stops));
|
||||||
}
|
}
|
||||||
|
2
test/fixtures/stylesheets/compass/config.rb
vendored
2
test/fixtures/stylesheets/compass/config.rb
vendored
@ -12,3 +12,5 @@ line_comments = false
|
|||||||
asset_cache_buster do |path, file|
|
asset_cache_buster do |path, file|
|
||||||
"busted=true"
|
"busted=true"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
disable_warnings = true
|
||||||
|
Loading…
Reference in New Issue
Block a user