| 1 |
@mixin switch($res: 'sm') { |
| 2 |
$index: 1rem; |
| 3 |
$mainVal: 1rem; |
| 4 |
$lh: 1rem; |
| 5 |
$mr: 0; |
| 6 |
|
| 7 |
@if $res == 'md' { |
| 8 |
$index: 1.6rem; |
| 9 |
$mainVal: 1.3rem; |
| 10 |
$lh: 1.8rem; |
| 11 |
$mr: 0.5rem; |
| 12 |
} @else if $res == 'lg' { |
| 13 |
$index: 2rem; |
| 14 |
$mainVal: 1.5rem; |
| 15 |
$lh: 1.8rem; |
| 16 |
$mr: 0.5rem; |
| 17 |
} @else if $res == 'xl' { |
| 18 |
$index: 3rem; |
| 19 |
$mainVal: 2rem; |
| 20 |
$lh: 2.4rem; |
| 21 |
$mr: 0.5rem; |
| 22 |
} |
| 23 |
|
| 24 |
line-height: $lh; |
| 25 |
|
| 26 |
|
| 27 |
.form-check-input { |
| 28 |
height: $mainVal; |
| 29 |
width: calc(#{$index} + 0.75rem); |
| 30 |
margin-right: $mr; |
| 31 |
} |
| 32 |
|
| 33 |
.form-check-input::before{ |
| 34 |
content: none; |
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
// YOU CAN PUT ALL RESOLUTION HERE |
| 39 |
// sm - DEFAULT, md, lg, xl |
| 40 |
.form-switch.custom-switch-sm { |
| 41 |
@include switch(); |
| 42 |
} |
| 43 |
|
| 44 |
.form-switch.custom-switch-md { |
| 45 |
@include switch('md'); |
| 46 |
} |
| 47 |
|
| 48 |
.form-switch.custom-switch-lg { |
| 49 |
@include switch('lg'); |
| 50 |
} |
| 51 |
|
| 52 |
.form-switch.custom-switch-xl { |
| 53 |
@include switch('xl'); |
| 54 |
} |