From 0bcbd2b2fd8c6adc6802571d9738282f2ac7e577 Mon Sep 17 00:00:00 2001 From: Eric Meyer Date: Fri, 16 Jul 2010 16:11:26 -0600 Subject: [PATCH] added support for spread and inset --- .../stylesheets/compass/css3/_box-shadow.scss | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss b/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss index cbf94019..76b78b91 100644 --- a/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +++ b/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss @@ -17,21 +17,33 @@ $default-box-shadow-v-offset: 1px !default; // The default blur length. $default-box-shadow-blur: 5px !default; +// The default spread length. +$default-box-shadow-spread : 0 !default; + +// The default shadow instet: inset or false (for standard shadow). +$default-box-shadow-inset : false !default; + // Provides cross-browser CSS box shadows for Webkit, Gecko, and CSS3. -// Arguments are color, horizontal offset, vertical offset, and blur length. +// Arguments are color, horizontal offset, vertical offset, blur length, spread length, and inset. @mixin box-shadow( - $color: $default-box-shadow-color, - $hoff: $default-box-shadow-h-offset, - $voff: $default-box-shadow-v-offset, - $blur: $default-box-shadow-blur + $color : $default-box-shadow-color, + $hoff : $default-box-shadow-h-offset, + $voff : $default-box-shadow-v-offset, + $blur : $default-box-shadow-blur, + $spread : $default-box-shadow-spread, + $inset : $default-box-shadow-inset ) { + $full : $color $hoff $voff $blur $spread; + @if $inset { + $full: $full $inset; + } @if $color == none { @include experimental(box-shadow, none, -moz, -webkit, -o, not -ms, not -khtml, official ); - } @else { - @include experimental(box-shadow, $color $hoff $voff $blur, + } @else { + @include experimental(box-shadow, $full, -moz, -webkit, -o, not -ms, not -khtml, official ); }