Remove deprecated forms of the box-shadow, text-shadow, and transition mixins.
This commit is contained in:
parent
ebd758a799
commit
730acb62f4
@ -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;`
|
* Removed `-khtml` prefixes by default you can still enable them but setting `$experimental-support-for-khtml:true;`
|
||||||
* Improved rails 3.1 integration
|
* Improved rails 3.1 integration
|
||||||
* `true` and `false` are now valid sprite names
|
* `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)
|
0.12.alpha.0 (8/30/2011)
|
||||||
------------------------
|
------------------------
|
||||||
|
@ -40,30 +40,13 @@ $default-box-shadow-inset : false !default;
|
|||||||
$shadow-9 : false,
|
$shadow-9 : false,
|
||||||
$shadow-10: 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
|
@if $shadow-1 == default {
|
||||||
$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));
|
$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));
|
||||||
@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));
|
|
||||||
}
|
|
||||||
$shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10);
|
|
||||||
@include experimental(box-shadow, $shadow,
|
|
||||||
-moz, -webkit, -o, not -ms, not -khtml, official
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
$shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10);
|
||||||
|
@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.
|
// Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.
|
||||||
@ -90,4 +73,4 @@ $default-box-shadow-inset : false !default;
|
|||||||
@if $inset { $full: inset $full; }
|
@if $inset { $full: inset $full; }
|
||||||
@include box-shadow($full);
|
@include box-shadow($full);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,26 +23,12 @@ $default-text-shadow-blur: 1px !default;
|
|||||||
$shadow-9 : false,
|
$shadow-9 : false,
|
||||||
$shadow-10: 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
|
@if $shadow-1 == default {
|
||||||
$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);
|
$shadow-1: $default-text-shadow-color $default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur;
|
||||||
@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);
|
|
||||||
}
|
}
|
||||||
|
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.
|
// Provides a single cross-browser CSS text shadow.
|
||||||
@ -57,6 +43,6 @@ $default-text-shadow-blur: 1px !default;
|
|||||||
@if $color == none {
|
@if $color == none {
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
} @else {
|
} @else {
|
||||||
text-shadow: $color $hoff $voff $blur;
|
text-shadow: $color $hoff $voff $blur;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,24 +123,11 @@ $default-transition-delay: false !default;
|
|||||||
$transition-9 : false,
|
$transition-9 : false,
|
||||||
$transition-10: 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 $transition-1 == default {
|
||||||
@if $legacy {
|
$transition-1 : -compass-space-list(compact($default-transition-property, $default-transition-duration, $default-transition-function, $default-transition-delay));
|
||||||
@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));
|
|
||||||
}
|
|
||||||
$transition : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10);
|
|
||||||
@include experimental(transition, $transition,
|
|
||||||
-moz, -webkit, -o, not -ms, not -khtml, official
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
$transition : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10);
|
||||||
|
@include experimental(transition, $transition,
|
||||||
|
-moz, -webkit, -o, not -ms, not -khtml, official
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
.legacy-text-shadow {
|
|
||||||
text-shadow: #777777 5px 5px 10px; }
|
|
||||||
|
|
||||||
.single-text-shadow {
|
.single-text-shadow {
|
||||||
text-shadow: #aaaaaa 0px 0px 1px; }
|
text-shadow: #aaaaaa 0px 0px 1px; }
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
@import "compass/css3/text-shadow";
|
@import "compass/css3/text-shadow";
|
||||||
|
|
||||||
.legacy-text-shadow { @include text-shadow(#777, 5px, 5px, 10px); }
|
|
||||||
.single-text-shadow { @include single-text-shadow;}
|
.single-text-shadow { @include single-text-shadow;}
|
||||||
.default-text-shadow { @include text-shadow;}
|
.default-text-shadow { @include text-shadow;}
|
||||||
.multiple-text-shadows-with-default { @include text-shadow(default, 2px 2px 5px #222);}
|
.multiple-text-shadows-with-default { @include text-shadow(default, 2px 2px 5px #222);}
|
||||||
|
Loading…
Reference in New Issue
Block a user