Remove deprecated forms of the box-shadow, text-shadow, and transition mixins.

This commit is contained in:
Chris Eppstein 2011-11-11 09:19:43 -08:00
parent ebd758a799
commit 730acb62f4
6 changed files with 21 additions and 67 deletions

View File

@ -26,6 +26,8 @@ The Documentation for the [latest preview release](http://beta.compass-style.org
* Removed `-khtml` prefixes by default you can still enable them but setting `$experimental-support-for-khtml:true;`
* Improved rails 3.1 integration
* `true` and `false` are now valid sprite names
* Removed deprecated forms of the box-shadow, text-shadow, and transform
mixins.
0.12.alpha.0 (8/30/2011)
------------------------

View File

@ -40,22 +40,6 @@ $default-box-shadow-inset : false !default;
$shadow-9 : false,
$shadow-10: false
) {
// This has to be on a single line due to a bug in the scss parser: https://github.com/nex3/sass/issues/issue/26
$legacy: (type-of($shadow-1) == color and type-of(if($shadow-2, $shadow-2, 0)) == number and type-of(if($shadow-3, $shadow-3, 0)) == number and type-of(if($shadow-4, $shadow-4, 0)) == number and type-of(if($shadow-5, $shadow-5, 0)) == number and ($shadow-6 == inset or type-of($shadow-6) == bool) and ($shadow-2 or $shadow-3 or $shadow-4 or $shadow-5 or $shadow-6));
@if $legacy {
@warn "Passing separate arguments for a single shadow to box-shadow is deprecated. " +
"Pass the values as a single space-separated list, or use the single-box-shadow mixin. " +
"See http://beta.compass-style.org/help/tutorials/upgrading/antares/ for more info.";
@include single-box-shadow(
if($shadow-1, $shadow-1, $default-box-shadow-color),
if($shadow-2, $shadow-2, $default-box-shadow-h-offset),
if($shadow-3, $shadow-3, $default-box-shadow-v-offset),
if($shadow-4, $shadow-4, $default-box-shadow-blur),
if($shadow-5, $shadow-5, $default-box-shadow-spread),
if($shadow-6, $shadow-6, $default-box-shadow-inset)
);
}
@else {
@if $shadow-1 == default {
$shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color));
}
@ -63,7 +47,6 @@ $default-box-shadow-inset : false !default;
@include experimental(box-shadow, $shadow,
-moz, -webkit, -o, not -ms, not -khtml, official
);
}
}
// Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.

View File

@ -23,26 +23,12 @@ $default-text-shadow-blur: 1px !default;
$shadow-9 : false,
$shadow-10: false
) {
// This has to be on a single line due to a bug in the scss parser: https://github.com/nex3/sass/issues/issue/26
$legacy: type-of($shadow-1) == color and type-of(if($shadow-2, $shadow-2, 0)) == number and type-of(if($shadow-3, $shadow-3, 0)) == number and type-of(if($shadow-4, $shadow-4, 0)) == number and ($shadow-2 or $shadow-3 or $shadow-4) and not($shadow-5 or $shadow-6 or $shadow-7 or $shadow-8 or $shadow-9 or $shadow-10);
@if $legacy {
@warn "Passing separate arguments for a single shadow to text-shadow is deprecated. " +
"Pass the values as a single space-separated list, or use the single-text-shadow mixin. " +
"See http://beta.compass-style.org/help/tutorials/upgrading/antares/ for more info.";
@include single-text-shadow(
$shadow-1,
if($shadow-2, $shadow-2, $default-text-shadow-h-offset),
if($shadow-3, $shadow-3, $default-text-shadow-v-offset),
if($shadow-4, $shadow-4, $default-text-shadow-blur)
);
} @else {
@if $shadow-1 == default {
$shadow-1: $default-text-shadow-color $default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur;
}
text-shadow: compact($shadow-1, $shadow-2, $shadow-3,
$shadow-4, $shadow-5, $shadow-6,
$shadow-7, $shadow-8, $shadow-9, $shadow-10);
}
}
// Provides a single cross-browser CSS text shadow.

View File

@ -123,18 +123,6 @@ $default-transition-delay: false !default;
$transition-9 : false,
$transition-10: false
) {
$legacy: (type-of($transition-1) == string and type-of(if($transition-2, $transition-2, 0)) == number and type-of(if($transition-3, $transition-3, '')) == string and type-of(if($transition-4, $transition-4, 0)) == number and ($transition-2 or $transition-3 or $transition-4));
@if $legacy {
@warn "Passing separate arguments for a single transition to transition is deprecated. " +
"Pass the values as a single space-separated list, or use the single-transition mixin.";
@include single-transition(
if($transition-1, $transition-1, $default-transition-property),
if($transition-2, $transition-2, $default-transition-duration),
if($transition-3, $transition-3, $default-transition-function),
if($transition-4, $transition-4, $default-transition-delay)
);
}
@else {
@if $transition-1 == default {
$transition-1 : -compass-space-list(compact($default-transition-property, $default-transition-duration, $default-transition-function, $default-transition-delay));
}
@ -142,5 +130,4 @@ $default-transition-delay: false !default;
@include experimental(transition, $transition,
-moz, -webkit, -o, not -ms, not -khtml, official
);
}
}

View File

@ -1,6 +1,3 @@
.legacy-text-shadow {
text-shadow: #777777 5px 5px 10px; }
.single-text-shadow {
text-shadow: #aaaaaa 0px 0px 1px; }

View File

@ -1,6 +1,5 @@
@import "compass/css3/text-shadow";
.legacy-text-shadow { @include text-shadow(#777, 5px, 5px, 10px); }
.single-text-shadow { @include single-text-shadow;}
.default-text-shadow { @include text-shadow;}
.multiple-text-shadows-with-default { @include text-shadow(default, 2px 2px 5px #222);}