Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Multi-value properties (text-shadow, box-shadow, etc) #21

pdokas opened this Issue · 2 comments

2 participants


It would be good to support the CSS properties that can contain comma-separated values. A problem in doing so is that there's no defined name for these sub-values in the CSS specs. Names like textShadow0, textShadow1, … textShadowN seem reasonable enough. However, implementing them presents a significant architectural problem.

We'd need to populate $.cssHooks with each textShadowN value (and its subvalues, like textShadow3Color?) but obviously we can't just do that because N is unbounded. It seems like we need to dynamically create the necessary cssHook at the beginning of a get/set/animate call. I've studied the problem and it seems to require support from within jQuery itself but it's also seeming like going beyond reasonable scope.

Any thoughts? Is there need for this sort of thing? I mean, just imagine the fun that could be had on with such an ability ;)


It would be good if someone wanted to changed say the third text shadow in a list of different text shadows.

Although certain browsers, like Opera, only allow a max of 6-9 text shadows. Safari 1 only supports one. It may be best to set a maximum yourself and test to see whether a browser supports 1 or multiple.

More info here (bottom of page):


Indeed. Safari only supported a single shadow until 4.0 as well. “Gecko (Firefox) theoretically supports infinite text-shadows (don't try it).” is a fun sentence.

The worry is that since there's no stated limit to number of shadows, in the spec or generally agreed-upon, we can't assume any specific cap. And without a cap there's no way to prepopulate all the necessary $.cssHooks values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.