 Issue 29730644:
  Issue 6514 - IOToggle Custom Element  (Closed)
    
  
    Issue 29730644:
  Issue 6514 - IOToggle Custom Element  (Closed) 
  | Left: | ||
| Right: | 
| OLD | NEW | 
|---|---|
| (Empty) | |
| 1 io-toggle { | |
| 
Thomas Greiner
2018/05/02 11:53:28
I assume this auto-generated file made it into the
 
a.giammarchi
2018/05/02 12:13:57
oooops, dropped.
 | |
| 2 --width: 30px; | |
| 3 --height: 8px; | |
| 4 --translateY: -4px; | |
| 5 --translateX: 14px; | |
| 6 display: inline-block; | |
| 7 width: var(--width); | |
| 8 height: var(--height); | |
| 9 border-radius: 4px; | |
| 10 background-color: #9b9b9b; | |
| 11 transition: background .2s ease-out; | |
| 12 will-change: background; | |
| 13 cursor: pointer; } | |
| 14 | |
| 15 io-toggle[checked] { | |
| 16 background-color: #92d3ea; } | |
| 17 | |
| 18 io-toggle[disabled] { | |
| 19 opacity: 0.5; | |
| 20 cursor: default; } | |
| 21 | |
| 22 io-toggle button { | |
| 23 width: calc(var(--height) * 2); | |
| 24 height: calc(var(--height) * 2); | |
| 25 padding: 0; | |
| 26 border: 2px solid #e1e0e1; | |
| 27 border-radius: var(--height); | |
| 28 transition: border .2s ease-out, box-shadow .2s ease-out, transform .2s ease-o ut, width .2s ease-out; | |
| 29 will-change: border, box-shadow, transform, width; | |
| 30 transform: translateY(var(--translateY)); | |
| 31 outline: none; | |
| 32 cursor: pointer; } | |
| 33 | |
| 34 io-toggle button[aria-checked="false"] { | |
| 35 background-color: #f1f1f1; | |
| 36 box-shadow: 0 1px 2px 0 #e5d1d1; } | |
| 37 | |
| 38 io-toggle button[aria-checked="false"]:hover { | |
| 39 box-shadow: 0 2px 4px 0 #d3b0b0; } | |
| 40 | |
| 41 io-toggle button[aria-checked="true"] { | |
| 42 background-color: #059cd0; | |
| 43 border: 2px solid #059cd0; | |
| 44 box-shadow: 0 1px 2px 0 #a6cede; | |
| 45 transform: translateY(var(--translateY)) translateX(var(--translateX)); } | |
| 46 | |
| 47 io-toggle button[aria-checked="true"]:hover { | |
| 48 box-shadow: 0 2px 4px 0 #a6cede; } | |
| 49 | |
| 50 io-toggle button:focus, | |
| 51 io-toggle button[aria-checked="true"]:focus { | |
| 52 border: 2px solid #87bffe; } | |
| 53 | |
| 54 body[dir="rtl"] io-toggle button[aria-checked="true"] { | |
| 55 transform: translateY(var(--translateY)) translateX(calc(var(--translateX) * - 1)); } | |
| OLD | NEW |