Code Snippet
Custom Radio Buttons
#foo:checked::before,
input[type="checkbox"] {
position:absolute;
clip: rect(0,0,0,0);
clip: rect(0 0 0 0);
}
#foo:checked,
input[type="checkbox"] + label::before {
content: url('checkbox.png');
}
input[type="checkbox"]:checked + label::before {
content: url('checkbox-checked.png');
}
#foo doesn't reference any particular element, it's there purely to prevent browsers from implementing the later selectors if it doesn't understand that (since most browsers will drop the entire selector if any part of it fails).
I use :root pseudoselector to do the same thing.
Thanks! Huge help!
Will this work for wpec?
This is super slick, but I am using this on an iPad 3 retina screen and now I’m not sure how to target the item with any manner to…retinize. Any thoughts?
Thanks – saved my life!
DigWP
A book and blog co-authored by Jeff Starr and myself about the World's most popular publishing platform.
Quotes on Design
Design, like Art, can be an elusive word to define and an awfully fun thing to have opinions about.
HTML-Ipsum
One-click copy to clipboard access to Lorem Ipsum text that comes wrapped in a variety of HTML.
Bookshelf
Hey Chris, what books do you recommend? These, young fertile mind, these.