123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- /* ============================================================
- SWITCH 3 - YES NO
- ============================================================ */
- gf-form-switch[disabled] {
- .gf-form-switch,
- .gf-form-switch-container {
- cursor: default;
- pointer-events: none !important;
- .gf-form-label {
- color: $text-color-weak;
- }
- }
- }
- .gf-form-switch-container-react {
- display: flex;
- flex-shrink: 0;
- }
- .gf-form-switch-container {
- display: flex;
- cursor: pointer;
- margin-right: $space-xs;
- }
- .gf-form-switch {
- display: flex;
- position: relative;
- width: 56px;
- height: $input-height;
- background: $switch-bg;
- border: 1px solid $input-border-color;
- border-radius: $input-border-radius;
- align-items: center;
- justify-content: center;
- input {
- opacity: 0;
- width: 0;
- height: 0;
- }
- &--transparent {
- background: transparent;
- border: 0;
- width: 40px;
- }
- }
- /* The slider */
- .gf-form-switch__slider {
- background: $switch-slider-off-bg;
- border-radius: 8px;
- height: 16px;
- width: 32px;
- display: block;
- position: relative;
- &::before {
- position: absolute;
- content: '';
- height: 12px;
- width: 12px;
- left: 2px;
- top: 2px;
- background: $switch-slider-color;
- transition: 0.4s;
- border-radius: 50%;
- box-shadow: $switch-slider-shadow;
- }
- }
- input:checked + .gf-form-switch__slider {
- background: $switch-slider-on-bg;
- }
- input:checked + .gf-form-switch__slider::before {
- transform: translateX(16px);
- }
- .gf-form-checkbox {
- position: relative;
- display: flex;
- width: 50px;
- height: $input-height;
- background: $switch-bg;
- border: 1px solid $input-border-color;
- border-left: none;
- border-radius: $input-border-radius;
- align-items: center;
- justify-content: center;
- input {
- opacity: 0;
- width: 0;
- height: 0;
- appearance: none;
- }
- &--transparent {
- background: transparent;
- border: none;
- width: 23px;
- height: auto;
- position: relative;
- padding-left: 8px;
- }
- &--table-cell {
- width: 20px;
- background: transparent;
- height: auto;
- border: none;
- position: relative;
- top: -5px;
- }
- }
- .gf-form-switch__checkbox {
- height: 16px;
- width: 16px;
- border-radius: 3px;
- border: $checkbox-border;
- background: $checkbox-bg;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- input:checked + .gf-form-switch__checkbox::before {
- font-family: 'FontAwesome';
- content: '\f00c';
- color: $checkbox-color;
- }
- input:checked + .gf-form-switch__checkbox {
- background: $checkbox-checked-bg;
- border: none;
- }
|