Add extractor and builder

Tested and working
This commit is contained in:
Angelos Chalaris
2019-08-22 14:04:18 +03:00
parent 343f8fd4c7
commit a8818b1998
101 changed files with 18465 additions and 9908 deletions

View File

@ -5,14 +5,10 @@ tags: visual, interactivity,intermediate
Creates a toggle switch with CSS only.
#### HTML
```html
<input type="checkbox" id="toggle" class="offscreen" /> <label for="toggle" class="switch"></label>
```
#### CSS
```css
.switch {
position: relative;
@ -50,8 +46,6 @@ input[type='checkbox']:checked + .switch {
}
```
#### Demo
#### Explanation
This effect is styling only the `<label>` element to look like a toggle switch, and hiding the actual `<input>` checkbox by positioning it offscreen. When clicking the label associated with the `<input>` element, it sets the `<input>` checkbox into the `:checked` state.
@ -69,7 +63,3 @@ This effect is styling only the `<label>` element to look like a toggle switch,
<span class="snippet__support-note">⚠️ Requires prefixes for full support.</span>
- https://caniuse.com/#feat=transforms2d
<!-- date: 2018-10-03 -->