|
3 | 3 | * |
4 | 4 | * |
5 | 5 | * Bootstrap 4 Component - Custom switch |
6 | | - * Version: 1.0.6 |
| 6 | + * Version: 1.0.7 |
7 | 7 | * Copyright (c) 2017 Martin Haubek |
8 | 8 | * |
9 | 9 | * |
|
36 | 36 | height: 38px; |
37 | 37 | margin: 0; |
38 | 38 | padding: 4px; |
39 | | - background: #eceeef; |
| 39 | + background: #ced4da; |
40 | 40 | border-radius: 76px; |
41 | 41 | transition: all 300ms ease; } |
42 | 42 | .custom-switch .custom-switch-input + .custom-switch-btn:after, .custom-switch .custom-switch-input + .custom-switch-btn:before { |
|
53 | 53 | .custom-switch .custom-switch-input + .custom-switch-btn:before { |
54 | 54 | display: none; } |
55 | 55 | .custom-switch .custom-switch-input:checked + .custom-switch-btn { |
56 | | - background: #5cb85c; } |
| 56 | + background: #28a745; } |
57 | 57 | .custom-switch .custom-switch-input:checked + .custom-switch-btn:after { |
58 | 58 | left: 30px; } |
59 | 59 | .custom-switch .custom-switch-input:checked + .custom-switch-btn ~ .custom-switch-content-checked { |
|
72 | 72 | height: auto; } |
73 | 73 |
|
74 | 74 | .custom-switch.custom-switch-label-io .custom-switch-input + .custom-switch-btn { |
75 | | - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='38'%3E%3Ctext x='42.5' y='23.75' font-size='12px' font-family='-apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif' fill='%23fff'%3EO%3C/text%3E%3C/svg%3E"); } |
| 75 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='38'%3E%3Ctext x='42.5' 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' fill='%23fff'%3EO%3C/text%3E%3C/svg%3E"); } |
76 | 76 |
|
77 | 77 | .custom-switch.custom-switch-label-io .custom-switch-input:checked + .custom-switch-btn { |
78 | | - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='38'%3E%3Ctext x='18.13333' y='23.75' font-size='12px' font-family='-apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif' fill='%23fff'%3EI%3C/text%3E%3C/svg%3E"); } |
| 78 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='38'%3E%3Ctext x='18.13333' 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' fill='%23fff'%3EI%3C/text%3E%3C/svg%3E"); } |
79 | 79 |
|
80 | 80 | .custom-switch.custom-switch-label-onoff .custom-switch-input + .custom-switch-btn { |
81 | | - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='38'%3E%3Ctext x='38.85714' y='23.75' font-size='12px' font-family='-apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif' fill='%23fff'%3EOff%3C/text%3E%3C/svg%3E"); } |
| 81 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' 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' fill='%23fff'%3EOff%3C/text%3E%3C/svg%3E"); } |
82 | 82 |
|
83 | 83 | .custom-switch.custom-switch-label-onoff .custom-switch-input:checked + .custom-switch-btn { |
84 | | - 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, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif' fill='%23fff'%3EOn%3C/text%3E%3C/svg%3E"); } |
| 84 | + 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' fill='%23fff'%3EOn%3C/text%3E%3C/svg%3E"); } |
85 | 85 |
|
86 | 86 | .custom-switch.custom-switch-label-yesno .custom-switch-input + .custom-switch-btn { |
87 | | - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='38'%3E%3Ctext x='38.85714' y='23.75' font-size='12px' font-family='-apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif' fill='%23fff'%3ENo%3C/text%3E%3C/svg%3E"); } |
| 87 | + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' 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' fill='%23fff'%3ENo%3C/text%3E%3C/svg%3E"); } |
88 | 88 |
|
89 | 89 | .custom-switch.custom-switch-label-yesno .custom-switch-input:checked + .custom-switch-btn { |
90 | | - 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, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif' fill='%23fff'%3EYes%3C/text%3E%3C/svg%3E"); } |
| 90 | + 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' fill='%23fff'%3EYes%3C/text%3E%3C/svg%3E"); } |
91 | 91 |
|
92 | 92 | .custom-switch.custom-switch-label-status .custom-switch-input + .custom-switch-btn { |
93 | 93 | width: 88px; |
94 | | - 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, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif' fill='%23fff'%3EDisabled%3C/text%3E%3C/svg%3E"); } |
| 94 | + 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' fill='%23fff'%3EDisabled%3C/text%3E%3C/svg%3E"); } |
95 | 95 |
|
96 | 96 | .custom-switch.custom-switch-label-status .custom-switch-input:checked + .custom-switch-btn { |
97 | | - 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, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif' fill='%23fff'%3EEnabled%3C/text%3E%3C/svg%3E"); } |
| 97 | + 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' fill='%23fff'%3EEnabled%3C/text%3E%3C/svg%3E"); } |
98 | 98 | .custom-switch.custom-switch-label-status .custom-switch-input:checked + .custom-switch-btn:after { |
99 | 99 | left: 50px; } |
0 commit comments