textshadow icon indicating copy to clipboard operation
textshadow copied to clipboard

@mixin jquery-text-shadow outputs "false" for undefined shadows, breaking the text-shadow declaration

Open isGabe opened this issue 11 years ago • 5 comments

Using your example

@include jquery-text-shadow(1px 1px 2px rgba(255, 0, 0, 0.5), 3px 3px 2px rgba(0, 255, 0, 0.5), 5px 5px 2px rgba(0, 0, 255, 0.5), 7px 7px 2px rgba(0, 0, 0, 0.5));

I get the following CSS output, which does not work.

text-shadow: 1px 1px 2px rgba(255, 0, 0, 0.5), 3px 3px 2px rgba(0, 255, 0, 0.5), 5px 5px 2px rgba(0, 0, 255, 0.5), 7px 7px 2px rgba(0, 0, 0, 0.5), false, false, false, false, false, false

The mixin seems to be outputting the false arguments for any of the 10 $shadow- variables left undefined:

@mixin jquery-text-shadow($shadow-1: default, $shadow-2: false, $shadow-3: false, $shadow-4: false, $shadow-5: false, $shadow-6: false, $shadow-7: false, $shadow-8: false, $shadow-9: false, $shadow-10: false) {

SASS docs show that multiple variable arguments can be defined like this:

@mixin text-shadow($shadows...) {text-shadow: $shadows}

so that: @include text-shadow(0px 4px 5px #666, 2px 6px 10px #999);

will output to: `text-shadow: 0px 4px 5px #666, 2px 6px 10px #999;

But your mixin is much more complex, so I'm not sure if that would work. In any case I'm wondering if it's a Compass/SASS version issue.

I am running SASS v3.2.7 and Compass v0.13.alpha.4

isGabe avatar Jun 26 '13 17:06 isGabe