Gaurav
Gaurav

Reputation: 8487

Access text-shadow property value

I want to access text-shadow property just like we access padding property. Means ,

       div{
          padding : 10px 10px 10px 10px;
       }

so we can access its each part individually like:

          $('div').css("padding-left"); etc..

Now how i can access horizontalShadow, verticalShadow, Blur, shadowColor of a textshadow property individually?

Upvotes: 2

Views: 129

Answers (2)

Paul Rouget
Paul Rouget

Reputation: 12170

text-shadow is not a shorthand property like padding is, so you can't get the subvalues like that. You'll have to parse it manually.

Upvotes: 1

Quentin
Quentin

Reputation: 943142

You can't. The specification only defines the text-shadow property. It is not a shorthand property.

If you want to change part of a text-shadow rule, then you must take the existing rule and modify it.

Upvotes: 4

Related Questions