|
3 | 3 | * |
4 | 4 | * |
5 | 5 | * Bootstrap 4 Component - Custom switch |
6 | | - * Version: 1.0.10 |
| 6 | + * Version: 1.0.11 |
7 | 7 | * Copyright (c) 2017-18 Martin Haubek |
8 | 8 | * |
9 | 9 | * |
|
102 | 102 | background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='38'%3E%3Ctext x='9.71429' y='23.75' font-size='12px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EYes%3C/text%3E%3C/svg%3E"); } |
103 | 103 |
|
104 | 104 | .custom-switch.custom-switch-label-status .custom-switch-input + .custom-switch-btn { |
105 | | - width: 88px; |
106 | | - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='38'%3E%3Ctext x='38.85714' y='23.75' font-size='12px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EDisabled%3C/text%3E%3C/svg%3E"); } |
| 105 | + width: 96px; |
| 106 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='38'%3E%3Ctext x='38.85714' y='23.75' font-size='12px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EDisabled%3C/text%3E%3C/svg%3E"); } |
107 | 107 |
|
108 | 108 | .custom-switch.custom-switch-label-status .custom-switch-input:checked + .custom-switch-btn { |
109 | | - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='38'%3E%3Ctext x='9.71429' y='23.75' font-size='12px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EEnabled%3C/text%3E%3C/svg%3E"); } |
| 109 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='38'%3E%3Ctext x='9.71429' y='23.75' font-size='12px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EEnabled%3C/text%3E%3C/svg%3E"); } |
110 | 110 | .custom-switch.custom-switch-label-status .custom-switch-input:checked + .custom-switch-btn:after { |
111 | | - left: 50px; } |
| 111 | + left: 58px; } |
| 112 | + |
| 113 | +.custom-switch-sm .custom-switch-input + .custom-switch-btn { |
| 114 | + width: 60px; |
| 115 | + height: 31px; |
| 116 | + padding: 3.26316px; |
| 117 | + border-radius: 62px; } |
| 118 | + .custom-switch-sm .custom-switch-input + .custom-switch-btn:after, .custom-switch-sm .custom-switch-input + .custom-switch-btn:before { |
| 119 | + width: 25px; |
| 120 | + height: 25px; } |
| 121 | + .custom-switch-sm .custom-switch-input + .custom-switch-btn:after { |
| 122 | + left: 1px; } |
| 123 | + |
| 124 | +.custom-switch-sm .custom-switch-input:checked + .custom-switch-btn:after { |
| 125 | + left: 29px; } |
| 126 | + |
| 127 | +.custom-switch-sm .custom-switch-form-text { |
| 128 | + height: 31px; |
| 129 | + margin-left: .5rem; |
| 130 | + line-height: 31px; } |
| 131 | + |
| 132 | +.custom-switch-sm.custom-switch-label-io .custom-switch-input + .custom-switch-btn { |
| 133 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='31'%3E%3Ctext x='37.5' y='19.375' font-size='11px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EO%3C/text%3E%3C/svg%3E"); } |
| 134 | + |
| 135 | +.custom-switch-sm.custom-switch-label-io .custom-switch-input:checked + .custom-switch-btn { |
| 136 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='31'%3E%3Ctext x='16' y='19.375' font-size='11px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EI%3C/text%3E%3C/svg%3E"); } |
| 137 | + |
| 138 | +.custom-switch-sm.custom-switch-label-onoff .custom-switch-input + .custom-switch-btn { |
| 139 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='31'%3E%3Ctext x='32.87671' y='19.375' font-size='11px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EOff%3C/text%3E%3C/svg%3E"); } |
| 140 | + |
| 141 | +.custom-switch-sm.custom-switch-label-onoff .custom-switch-input:checked + .custom-switch-btn { |
| 142 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='31'%3E%3Ctext x='8.57143' y='19.375' font-size='11px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EOn%3C/text%3E%3C/svg%3E"); } |
| 143 | + |
| 144 | +.custom-switch-sm.custom-switch-label-yesno .custom-switch-input + .custom-switch-btn { |
| 145 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='31'%3E%3Ctext x='32.87671' y='19.375' font-size='11px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3ENo%3C/text%3E%3C/svg%3E"); } |
| 146 | + |
| 147 | +.custom-switch-sm.custom-switch-label-yesno .custom-switch-input:checked + .custom-switch-btn { |
| 148 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='31'%3E%3Ctext x='8.57143' y='19.375' font-size='11px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EYes%3C/text%3E%3C/svg%3E"); } |
| 149 | + |
| 150 | +.custom-switch-sm.custom-switch-label-status .custom-switch-input + .custom-switch-btn { |
| 151 | + width: 88px; |
| 152 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='31'%3E%3Ctext x='32.87671' y='19.375' font-size='11px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EDisabled%3C/text%3E%3C/svg%3E"); } |
| 153 | + |
| 154 | +.custom-switch-sm.custom-switch-label-status .custom-switch-input:checked + .custom-switch-btn { |
| 155 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='31'%3E%3Ctext x='8.57143' y='19.375' font-size='11px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EEnabled%3C/text%3E%3C/svg%3E"); } |
| 156 | + .custom-switch-sm.custom-switch-label-status .custom-switch-input:checked + .custom-switch-btn:after { |
| 157 | + left: 57px; } |
| 158 | + |
| 159 | +.custom-switch-xs .custom-switch-input + .custom-switch-btn { |
| 160 | + width: 48px; |
| 161 | + height: 24px; |
| 162 | + padding: 2.52632px; |
| 163 | + border-radius: 48px; } |
| 164 | + .custom-switch-xs .custom-switch-input + .custom-switch-btn:after, .custom-switch-xs .custom-switch-input + .custom-switch-btn:before { |
| 165 | + width: 18px; |
| 166 | + height: 18px; } |
| 167 | + .custom-switch-xs .custom-switch-input + .custom-switch-btn:after { |
| 168 | + left: 1px; } |
| 169 | + |
| 170 | +.custom-switch-xs .custom-switch-input:checked + .custom-switch-btn:after { |
| 171 | + left: 24px; } |
| 172 | + |
| 173 | +.custom-switch-xs .custom-switch-form-text { |
| 174 | + height: 24px; |
| 175 | + margin-left: .5rem; |
| 176 | + line-height: 24px; } |
| 177 | + |
| 178 | +.custom-switch-xs.custom-switch-label-io .custom-switch-input + .custom-switch-btn { |
| 179 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Ctext x='27.42857' y='15' font-size='10px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EO%3C/text%3E%3C/svg%3E"); } |
| 180 | + |
| 181 | +.custom-switch-xs.custom-switch-label-io .custom-switch-input:checked + .custom-switch-btn { |
| 182 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Ctext x='12.8' y='15' font-size='10px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EI%3C/text%3E%3C/svg%3E"); } |
| 183 | + |
| 184 | +.custom-switch-xs.custom-switch-label-onoff .custom-switch-input + .custom-switch-btn { |
| 185 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Ctext x='25.6' y='15' font-size='10px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EOff%3C/text%3E%3C/svg%3E"); } |
| 186 | + |
| 187 | +.custom-switch-xs.custom-switch-label-onoff .custom-switch-input:checked + .custom-switch-btn { |
| 188 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Ctext x='6.85714' y='15' font-size='10px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EOn%3C/text%3E%3C/svg%3E"); } |
| 189 | + |
| 190 | +.custom-switch-xs.custom-switch-label-yesno .custom-switch-input + .custom-switch-btn { |
| 191 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Ctext x='25.6' y='15' font-size='10px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3ENo%3C/text%3E%3C/svg%3E"); } |
| 192 | + |
| 193 | +.custom-switch-xs.custom-switch-label-yesno .custom-switch-input:checked + .custom-switch-btn { |
| 194 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Ctext x='6.85714' y='15' font-size='10px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EYes%3C/text%3E%3C/svg%3E"); } |
| 195 | + |
| 196 | +.custom-switch-xs.custom-switch-label-status .custom-switch-input + .custom-switch-btn { |
| 197 | + width: 76px; |
| 198 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='76' height='24'%3E%3Ctext x='25.6' y='15' font-size='10px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EDisabled%3C/text%3E%3C/svg%3E"); } |
| 199 | + |
| 200 | +.custom-switch-xs.custom-switch-label-status .custom-switch-input:checked + .custom-switch-btn { |
| 201 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='76' height='24'%3E%3Ctext x='6.85714' y='15' font-size='10px' font-family='-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji' fill='%23fff'%3EEnabled%3C/text%3E%3C/svg%3E"); } |
| 202 | + .custom-switch-xs.custom-switch-label-status .custom-switch-input:checked + .custom-switch-btn:after { |
| 203 | + left: 52px; } |
0 commit comments