Error states for checkboxes/radios
This commit is contained in:
parent
fbec69f110
commit
1be22b2c47
@ -45,7 +45,13 @@
|
|||||||
fieldset {
|
fieldset {
|
||||||
input[type='radio'] {
|
input[type='radio'] {
|
||||||
+ label::before {
|
+ label::before {
|
||||||
box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px $color-red;
|
box-shadow: 0 0 0 1px $color-white, 0 0 0 3px $color-red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type='checkbox'] {
|
||||||
|
+ label::before {
|
||||||
|
box-shadow: 0 0 0 2px $color-red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,6 +109,10 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.usa-input__message {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
&.usa-input__choices--inline {
|
&.usa-input__choices--inline {
|
||||||
label {
|
label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -212,7 +212,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='form-col'>
|
<div class='form-col'>
|
||||||
<div class='usa-input'>
|
<div class='usa-input usa-input--error'>
|
||||||
<fieldset class='usa-input__choices usa-input__choices--inline'>
|
<fieldset class='usa-input__choices usa-input__choices--inline'>
|
||||||
<legend>Inline Checkboxes</legend>
|
<legend>Inline Checkboxes</legend>
|
||||||
<input type='checkbox' id='checkbox-4' checked/>
|
<input type='checkbox' id='checkbox-4' checked/>
|
||||||
@ -223,6 +223,8 @@
|
|||||||
|
|
||||||
<input type='checkbox' id='checkbox-6' disabled />
|
<input type='checkbox' id='checkbox-6' disabled />
|
||||||
<label for='checkbox-6'>Checkbox Six</label>
|
<label for='checkbox-6'>Checkbox Six</label>
|
||||||
|
|
||||||
|
<span class='usa-input__message'>This is an error</span>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user