OLD | NEW |
(Empty) | |
| 1 io-toggle { |
| 2 display: inline-block; |
| 3 display: inline-block; |
| 4 width: 30px; |
| 5 height: 8px; |
| 6 border-radius: 4px; |
| 7 background-color: #9b9b9b; |
| 8 transition: background .2s ease-out; |
| 9 will-change: background; |
| 10 transform: translateY(4px); |
| 11 cursor: pointer; |
| 12 } |
| 13 |
| 14 io-toggle[checked] { |
| 15 background-color: #92d3ea; |
| 16 } |
| 17 |
| 18 io-toggle[disabled] { |
| 19 opacity: 0.5; |
| 20 cursor: default; |
| 21 } |
| 22 |
| 23 io-toggle button { |
| 24 width: 16px; |
| 25 height: 16px; |
| 26 padding: 0; |
| 27 border: 2px solid #e1e0e1; |
| 28 border-radius: 8px; |
| 29 transition: border .2s ease-out, box-shadow .2s ease-out, |
| 30 transform .2s ease-out, width .2s ease-out; |
| 31 will-change: border, box-shadow, transform, width; |
| 32 transform: translateY(-4px); |
| 33 outline: none; |
| 34 cursor: pointer; |
| 35 } |
| 36 |
| 37 io-toggle button[aria-checked="false"] |
| 38 { |
| 39 background-color: #f1f1f1; |
| 40 box-shadow: 0 1px 2px 0 #e5d1d1; |
| 41 } |
| 42 |
| 43 io-toggle button[aria-checked="false"]:hover |
| 44 { |
| 45 box-shadow: 0 2px 4px 0 #d3b0b0; |
| 46 } |
| 47 |
| 48 io-toggle button[aria-checked="true"] |
| 49 { |
| 50 background-color: #059cd0; |
| 51 border: 2px solid #059cd0; |
| 52 box-shadow: 0 1px 2px 0 #a6cede; |
| 53 transform: translateY(-4px) translateX(14px); |
| 54 } |
| 55 |
| 56 io-toggle button[aria-checked="true"]:hover |
| 57 { |
| 58 box-shadow: 0 2px 4px 0 #a6cede; |
| 59 } |
| 60 |
| 61 io-toggle button:focus, |
| 62 io-toggle button[aria-checked="true"]:focus |
| 63 { |
| 64 border: 2px solid #87bffe; |
| 65 } |
| 66 |
| 67 /* in case we will need to switch active/disabled direction |
| 68 body[dir="rtl"] io-toggle button[aria-checked="true"] |
| 69 { |
| 70 transform: translateY(-4px) translateX(-14px); |
| 71 } |
| 72 */ |
OLD | NEW |