Getting value of individual box-shadow when set to multiple values
Trying to get an answer to a recent question, I tried to parse the
box-shadow of an element, that had been set as
div {
box-shadow: 0 0 0 5px green, 0 0 0 10px #ff0000, 0 0 0 15px blue;
}
I expected to get that string, do an split(",") on it, and get the array
of box-shadows. (with 3 elements)
My problem is that I get the string as
"rgb (0, 255, 0) 0 0 0 5px, rgb (255, 0, 0) 0 0 0 10px, rgb (0, 0, 255) 0
0 0 15px"
And of course when I split that I get a mess.
Is there an easier way to get the values of the individual box-shadows ?
No comments:
Post a Comment