Skip to content

Instantly share code, notes, and snippets.

@feross
Created December 28, 2012 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feross/4396663 to your computer and use it in GitHub Desktop.
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.
/*
* 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