Pixate / pixate-freestyle-ios

Pixate Freestyle for iOS
Apache License 2.0
849 stars 134 forks source link

Unable to set icon for UIButton selected state #33

Open pcolton opened 10 years ago

pcolton commented 10 years ago

The following CSS does not work:

#gpbutton:selected icon{  
    background-image: url(logo-gplus-white.png);  
    background-size: 20px;  
}  
#gpbutton:normal icon{  
    background-image: url(logo-gplus.png);  
    background-size: 20px;  
}

This is due to the fact that the framework processes pseudo-classes on the last element only. We need to make an exception for virtual children to allow this case to work properly.

graham-perks-binocular commented 10 years ago

Glad you wrote up this bug. My CSS looks almost identical and I've been pulling out my hair trying to understand what's wrong. Happened across your bug report... now I can try another approach.