Created
May 17, 2011 23:42
-
-
Save rjz/977673 to your computer and use it in GitHub Desktop.
16px styling for autocheckbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Some default styling for our new checkbox elements. We'll need to style | |
* two states -- when the box is checked (.checked) and when it isn't | |
* (no class). For both states, we'll need both a default appearance and | |
* an appearance that's used when the checkbox is being hovered over/focused | |
* on. Here goes nothing: | |
*/ | |
.p-checkbox, | |
.p-radio { | |
width:16px; | |
height:16px; | |
display:inline-block; | |
background:url('../images/sprites_16.png') 0 0 no-repeat; | |
cursor:pointer; | |
} | |
.p-checkbox:hover, | |
.p-checkbox:focus { background-position:0 -16px; } | |
.p-checkbox:active { background-position:0 -32px; } | |
.p-checkbox.checked { background-position:0 -32px; } | |
/* | |
.p-checkbox.checked:hover, | |
.p-checkbox.checked:focus { background-position:0 -64px; } | |
.p-checkbox.checked:active { background-position:0 -80px; } | |
*/ | |
.p-radio { background-position:-16px 0; } | |
.p-radio:hover, | |
.p-radio:focus { background-position:-16px -16px; } | |
.p-radio:active { background-position:-16px -32px; } | |
.p-radio.checked { background-position:-16px -32px; } | |
/* | |
.p-radio.checked:hover, | |
.p-radio.checked:focus { background-position:-16px -64px; } | |
.p-radio.checked:active { background-position:-16px -80px; } | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment