9.2 #Input.switch Switch button
On/off button that displaces a bit and lights up (with color
var(--theme-color-adot5)
) when pressed down.
Note: the checked
state selector requires a generic <input>
, without
enforcing any particular type
(so by switch button I don't refer to an
<input>
with type="button"
nor to a <button>
, but to a generic <input>
).
Example
Markup
<div class="switch-button">
<input id="checkbox" type="checkbox" class="hidden">
<label for="checkbox">Press me</label>
</div>
Source:
css/modules/input/switch.css
, line 1