I\'m assuming the answer to this question is that it\'s impossible, but I\'m asking anyway in the hopes that someone knows of a clever workaround.
Let\'s say I have the
One way would be to determine the current box-shadow, superimpose the required parts to it and apply it back (not sure if it'll be worth the trouble but..).
window.getComputedStyle(element).boxShadow
will give you a string formatted like:
- for example: rgb(102, 102, 102) 5px 5px 5px 0px
Once you have the above string in a variable:
s = s.split(' ');
s = s.join(' ');
elem.style.boxShadow = s;
NOTE: This works in ff and chrome (since the returned string format is the same). But i think this is too much of an overkill to actually try in a production version. Moreover, it'll take even more work to superimpose styles from a class you've written in your css.