mirror of
https://github.com/kevquirk/simple.css.git
synced 2026-11-30 16:48:18 +01:00
Fix missing checkbox and radio button styles.
This commit is contained in:
+48
-2
@@ -224,8 +224,12 @@ input[type="submit"]:enabled:hover,
|
||||
input[type="reset"]:focus,
|
||||
input[type="reset"]:enabled:hover,
|
||||
input[type="button"]:focus,
|
||||
input[type="button"]:enabled:hover {
|
||||
opacity: .8;
|
||||
input[type="button"]:enabled:hover,
|
||||
input[type="checkbox"]:focus,
|
||||
input[type="checkbox"]:enabled:hover,
|
||||
input[type="radio"]:focus,
|
||||
input[type="radio"]:enabled:hover{
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
/* Format the expanding box */
|
||||
@@ -308,6 +312,48 @@ input {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/* checkbox and radio button style */
|
||||
input[type="checkbox"], input[type="radio"]{
|
||||
vertical-align: bottom;
|
||||
position: relative;
|
||||
}
|
||||
input[type="radio"]{
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked,
|
||||
input[type="radio"]:checked {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked::after {
|
||||
/* Creates a rectangle with colored right and bottom borders which is rotated to look like a check mark */
|
||||
content: ' ';
|
||||
width: 0.1em;
|
||||
height: 0.25em;
|
||||
border-radius: 0;
|
||||
position: absolute;
|
||||
top: 0.05em;
|
||||
left: 0.18em;
|
||||
background: transparent;
|
||||
border-right: solid var(--bg) 0.08em;
|
||||
border-bottom: solid var(--bg) 0.08em;
|
||||
font-size: 1.8em;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
input[type="radio"]:checked::after {
|
||||
/* creates a colored circle for the checked radio button */
|
||||
content: ' ';
|
||||
width: .25em;
|
||||
height: .25em;
|
||||
border-radius: 100%;
|
||||
position: absolute;
|
||||
top: 0.125em;
|
||||
background: var(--bg);
|
||||
left: 0.125em;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
/* Make the textarea wider than other inputs */
|
||||
textarea {
|
||||
width: 80%
|
||||
|
||||
Reference in New Issue
Block a user