Sass has an if function now. removing compass's version.

This commit is contained in:
Chris Eppstein 2010-11-27 12:16:50 -08:00
parent b17450e5e2
commit 6e30099473
4 changed files with 3 additions and 13 deletions

View File

@ -54,7 +54,7 @@ $default-box-shadow-inset : false !default;
}
@else {
@if $shadow-1 == default {
$shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color));
$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,

View File

@ -110,7 +110,7 @@ $default-skew-y : 5deg !default;
$origin-x: $default-origin-x,
$origin-y: $default-origin-y,
$origin-z: false,
$only3d: if($origin-z)
$only3d: if($origin-z, true, false)
) {
$origin: unquote('');
@if $origin-x or $origin-y or $origin-z {

View File

@ -2,7 +2,7 @@ module Compass::SassExtensions::Functions
end
%w(
selectors enumerate urls display if
selectors enumerate urls display
inline_image image_size constants gradient_support
font_files lists colors trig
).each do |func|
@ -22,7 +22,6 @@ module Sass::Script::Functions
include Compass::SassExtensions::Functions::Lists
include Compass::SassExtensions::Functions::Colors
include Compass::SassExtensions::Functions::Trig
include Compass::SassExtensions::Functions::If
end
# Wierd that this has to be re-included to pick up sub-modules. Ruby bug?

View File

@ -1,9 +0,0 @@
module Compass::SassExtensions::Functions::If
def if(truth, if_true = nil, if_false = nil)
if truth.to_bool
if_true || Sass::Script::Bool.new(true)
else
if_false || Sass::Script::Bool.new(false)
end
end
end