tags:

views:

168

answers:

1

Note: CSS novice here. Be gentle. ;-)

I have the following CSS:

 ...
 -webkit-box-shadow: inset 0px 0px 2px #a00;
 -moz-box-shadow: inset 0px 0px 2px #a00;
 ...

Now I am trying to extract that color to make the page colors "skinnable". Is there any way of doing this? Simply removing the color, and then using the same key again later overwrites the original rule.

There doesn't seem to be a -webkit-box-shadow-color, at least Google turns nothing up.

+1  A: 

No:

http://dev.w3.org/csswg/css3-background/#the-box-shadow

You can verify this in Chrome and Firefox by checking the list of computed styles. Other properties that have shorthand methods (like border-radius) have their variations defined in the spec.

In order to achieve what you're trying to do, you will have to parse out the colour value from the property and replace it with something else (e.g. with JavaScript's string.prototype.replace method).

Andy E