Support disabled state
This commit is contained in:
@ -331,31 +331,76 @@ Alright, this one doesn't simplify anything, it just adds a CRT-like effect arou
|
||||
### Form Input (`<input>`)
|
||||
|
||||
```html
|
||||
<input type="checkbox" /><label>Checkbox</label>
|
||||
<input type="checkbox" />
|
||||
<label>Checkbox</label>
|
||||
```
|
||||
|
||||
<ul>
|
||||
<li><input type="checkbox" /><label> Milk</label></li>
|
||||
<li><input type="checkbox" /><label> Eggs</label></li>
|
||||
<li><input type="checkbox" /><label> Flour</label></li>
|
||||
<li><input type="checkbox" checked /><label> Coffee</label></li>
|
||||
<li><input type="checkbox" disabled /><label> Combustible lemons</label></li>
|
||||
<li>
|
||||
<input type="checkbox" />
|
||||
<label> Milk</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" />
|
||||
<label> Eggs</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" />
|
||||
<label> Flour</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" checked />
|
||||
<label> Coffee</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" disabled />
|
||||
<label> Combustible lemons</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
With `radio` type:
|
||||
|
||||
```html
|
||||
<input type="radio" name="test" /><label>Radio</label>
|
||||
<input type="radio" name="test" />
|
||||
<label>Radio</label>
|
||||
```
|
||||
|
||||
<ul>
|
||||
<li><input type="radio" name="test" /><label> Milk</label></li>
|
||||
<li><input type="radio" name="test" /><label> Eggs</label></li>
|
||||
<li><input type="radio" name="test" /><label> Flour</label></li>
|
||||
<li><input type="radio" name="test" checked /><label> Coffee</label></li>
|
||||
<li><input type="radio" name="test" disabled /><label> Combustible lemons</label></li>
|
||||
<li>
|
||||
<input type="radio" name="test" />
|
||||
<label> Milk</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="test" />
|
||||
<label> Eggs</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="test" />
|
||||
<label> Flour</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="test" checked />
|
||||
<label> Coffee</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="test" disabled />
|
||||
<label> Combustible lemons</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
With `color` type:
|
||||
|
||||
```html
|
||||
<label>Color:</label>
|
||||
<input type="color" value="#000000" />
|
||||
```
|
||||
|
||||
<label for="color">Color:</label>
|
||||
<input id="color" type="color" value="#b57edc" />
|
||||
|
||||
<label for="color">Disabled:</label>
|
||||
<input id="color" type="color" value="#b57edc" disabled />
|
||||
|
||||
### Figure Captions (`<figcaption>`)
|
||||
|
||||
```markdown
|
||||
|
@ -53,7 +53,7 @@ input[type="color"] {
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
vertical-align: -0.1875em;
|
||||
vertical-align: -0.1875em;
|
||||
border-radius: 50%;
|
||||
|
||||
&::before {
|
||||
@ -66,7 +66,7 @@ input[type="radio"] {
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
vertical-align: -0.1875em;
|
||||
vertical-align: -0.1875em;
|
||||
border-radius: calc(var(--rounded-corner-small) / 2);
|
||||
|
||||
&::before {
|
||||
@ -85,27 +85,32 @@ input[type="checkbox"] {
|
||||
}
|
||||
|
||||
input[type="color"] {
|
||||
vertical-align: -0.375em;
|
||||
border: 0.25rem solid var(--fg-muted-2);
|
||||
border-radius: var(--rounded-corner-small);
|
||||
padding: 0;
|
||||
width: 3rem;
|
||||
height: 2rem;
|
||||
vertical-align: -0.375em;
|
||||
border: 0.25rem solid var(--fg-muted-2);
|
||||
border-radius: var(--rounded-corner-small);
|
||||
padding: 0;
|
||||
width: 3rem;
|
||||
height: 2rem;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--fg-muted-2);
|
||||
}
|
||||
&:hover {
|
||||
background-color: var(--fg-muted-2);
|
||||
}
|
||||
|
||||
&::-moz-color-swatch {
|
||||
border: none;
|
||||
border-radius: calc(var(--rounded-corner-small) / 2);
|
||||
}
|
||||
&:disabled {
|
||||
border: 0.25rem solid var(--fg-muted-2);
|
||||
background-color: var(--fg-muted-1);
|
||||
}
|
||||
|
||||
&::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
&::-moz-color-swatch {
|
||||
border: none;
|
||||
border-radius: calc(var(--rounded-corner-small) / 2);
|
||||
}
|
||||
|
||||
&::-webkit-color-swatch {
|
||||
border-radius: calc(var(--rounded-corner-small) / 2);
|
||||
}
|
||||
&::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&::-webkit-color-swatch {
|
||||
border-radius: calc(var(--rounded-corner-small) / 2);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user