Is it possible to retrieve only a single property from a CSS class?
        Posted  
        
            by werner5471
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by werner5471
        
        
        
        Published on 2010-06-10T07:59:52Z
        Indexed on 
            2010/06/10
            8:02 UTC
        
        
        Read the original article
        Hit count: 232
        
Example CSS File:
.testClass {
color: black;
background: red; }
Now in an HTML file, I would like to have something like
<span class="testClass:color">Text in black but without red background</span>
to only apply the color property of that class.
Is there a way to do this?
The purpose behind it (for people asking themselves "Why the hell would he want that, that's not clean CSS usage!") is that I use jQuery UI themes, and I would like the entire page to fit a theme upon change. As not all kinds of elements (e.g. the color of a link) are covered by those themes, in those cases I would like to "steal" the color property (but not more) of some other CSS class of the jQuery UI theme. If there is another way to do this, of course I'm glad to hear it as well!
© Stack Overflow or respective owner