Created
December 28, 2012 10:23
-
-
Save feross/4396663 to your computer and use it in GitHub Desktop.
Text shadow with conditional IE support for Stylus Looks terrible in IE, and may have bugs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Text shadow with conditional IE support. | |
* | |
* Examples: | |
* text-shadow: none | |
* text-shadow: <color>? <offset-x> <offset-y> <blur-radius>? | |
* text-shadow: <offset-x> <offset-y> <blur-radius>? <color>? | |
*/ | |
// TODO: Convert color to hex | |
text-shadow() | |
if support-for-ie | |
if arguments[0] is a 'color' | |
color = arguments[0] | |
x = unit(arguments[1], '') | |
y = unit(arguments[2], '') | |
else if arguments[length(arguments) - 1] is a 'color' | |
color = arguments[length(arguments) - 1] | |
x = unit(arguments[0], '') | |
y = unit(arguments[1], '') | |
-ms-filter: 'progid:DXImageTransform.Microsoft.DropShadow(Color=%s, OffX=%s, OffY=%s)' % (color x y) | |
text-shadow: arguments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment