2016-03-21 11:07:37 +01:00
|
|
|
/* ============================================================
|
2016-03-21 13:37:56 +01:00
|
|
|
SWITCH 3 - YES NO
|
2016-03-21 11:07:37 +01:00
|
|
|
============================================================ */
|
|
|
|
|
|
2017-12-19 16:22:41 +01:00
|
|
|
gf-form-switch[disabled] {
|
2018-11-19 17:41:48 +01:00
|
|
|
.gf-form-switch,
|
|
|
|
|
.gf-form-switch-container {
|
2016-08-12 13:19:06 +02:00
|
|
|
cursor: default;
|
|
|
|
|
pointer-events: none !important;
|
2018-11-19 17:41:48 +01:00
|
|
|
.gf-form-label {
|
|
|
|
|
color: $text-color-weak;
|
2017-06-06 11:03:56 +02:00
|
|
|
}
|
2016-08-12 13:19:06 +02:00
|
|
|
}
|
2016-03-21 11:07:37 +01:00
|
|
|
}
|
2018-11-14 13:29:09 -08:00
|
|
|
|
2019-02-19 11:17:40 +01:00
|
|
|
.gf-form-switch-container-react {
|
|
|
|
|
display: flex;
|
2019-06-25 11:38:51 +02:00
|
|
|
flex-shrink: 0;
|
2019-02-19 11:17:40 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-16 13:02:29 +01:00
|
|
|
.gf-form-switch-container {
|
|
|
|
|
display: flex;
|
2018-11-19 17:41:48 +01:00
|
|
|
cursor: pointer;
|
2020-04-13 09:58:40 +02:00
|
|
|
margin-right: $space-xs;
|
2018-11-16 13:02:29 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-14 13:29:09 -08:00
|
|
|
.gf-form-switch {
|
2018-12-25 20:18:38 +01:00
|
|
|
display: flex;
|
2018-11-14 13:29:09 -08:00
|
|
|
position: relative;
|
2019-04-15 16:12:03 +02:00
|
|
|
width: 56px;
|
2019-03-13 09:40:56 +01:00
|
|
|
height: $input-height;
|
2018-11-16 13:02:29 +01:00
|
|
|
background: $switch-bg;
|
2018-11-16 12:45:19 -08:00
|
|
|
border: 1px solid $input-border-color;
|
2018-11-19 17:41:48 +01:00
|
|
|
border-radius: $input-border-radius;
|
2018-12-07 17:15:46 +01:00
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2018-11-14 13:29:09 -08:00
|
|
|
input {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
width: 0;
|
|
|
|
|
height: 0;
|
|
|
|
|
}
|
2018-12-07 17:15:46 +01:00
|
|
|
|
|
|
|
|
&--transparent {
|
|
|
|
|
background: transparent;
|
|
|
|
|
border: 0;
|
|
|
|
|
width: 40px;
|
|
|
|
|
}
|
2018-11-14 13:29:09 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* The slider */
|
|
|
|
|
.gf-form-switch__slider {
|
2018-11-16 13:02:29 +01:00
|
|
|
background: $switch-slider-off-bg;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
height: 16px;
|
2019-04-15 16:12:03 +02:00
|
|
|
width: 32px;
|
2018-12-07 17:15:46 +01:00
|
|
|
display: block;
|
|
|
|
|
position: relative;
|
2018-11-14 13:29:09 -08:00
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
|
position: absolute;
|
|
|
|
|
content: '';
|
2018-11-16 13:02:29 +01:00
|
|
|
height: 12px;
|
|
|
|
|
width: 12px;
|
2019-04-15 16:12:03 +02:00
|
|
|
left: 2px;
|
2018-12-07 17:15:46 +01:00
|
|
|
top: 2px;
|
2018-11-16 13:02:29 +01:00
|
|
|
background: $switch-slider-color;
|
2018-11-14 13:29:09 -08:00
|
|
|
transition: 0.4s;
|
|
|
|
|
border-radius: 50%;
|
2018-11-16 13:02:29 +01:00
|
|
|
box-shadow: $switch-slider-shadow;
|
2018-11-14 13:29:09 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input:checked + .gf-form-switch__slider {
|
2018-11-16 13:02:29 +01:00
|
|
|
background: $switch-slider-on-bg;
|
2018-11-14 13:29:09 -08:00
|
|
|
}
|
|
|
|
|
|
2018-11-16 13:02:29 +01:00
|
|
|
input:checked + .gf-form-switch__slider::before {
|
2019-04-15 16:12:03 +02:00
|
|
|
transform: translateX(16px);
|
2018-11-14 13:29:09 -08:00
|
|
|
}
|
2018-11-16 16:35:04 +01:00
|
|
|
|
2018-11-20 09:39:56 +01:00
|
|
|
.gf-form-checkbox {
|
|
|
|
|
position: relative;
|
2018-12-25 20:18:38 +01:00
|
|
|
display: flex;
|
2018-11-20 09:39:56 +01:00
|
|
|
width: 50px;
|
2019-03-13 09:40:56 +01:00
|
|
|
height: $input-height;
|
2018-11-20 09:39:56 +01:00
|
|
|
background: $switch-bg;
|
|
|
|
|
border: 1px solid $input-border-color;
|
|
|
|
|
border-left: none;
|
|
|
|
|
border-radius: $input-border-radius;
|
2018-11-29 18:39:02 +01:00
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2018-11-20 09:39:56 +01:00
|
|
|
|
|
|
|
|
input {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
width: 0;
|
|
|
|
|
height: 0;
|
2019-03-13 21:38:16 +05:30
|
|
|
appearance: none;
|
2018-11-20 09:39:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--transparent {
|
|
|
|
|
background: transparent;
|
|
|
|
|
border: none;
|
2018-12-14 16:48:13 +01:00
|
|
|
width: 23px;
|
2018-11-20 09:39:56 +01:00
|
|
|
height: auto;
|
|
|
|
|
position: relative;
|
2018-12-14 16:48:13 +01:00
|
|
|
padding-left: 8px;
|
2018-11-20 09:39:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--table-cell {
|
2018-11-29 18:39:02 +01:00
|
|
|
width: 20px;
|
2018-11-20 09:39:56 +01:00
|
|
|
background: transparent;
|
|
|
|
|
height: auto;
|
|
|
|
|
border: none;
|
|
|
|
|
position: relative;
|
|
|
|
|
top: -5px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-16 16:35:04 +01:00
|
|
|
.gf-form-switch__checkbox {
|
|
|
|
|
height: 16px;
|
|
|
|
|
width: 16px;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
border: $checkbox-border;
|
|
|
|
|
background: $checkbox-bg;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2018-11-29 18:39:02 +01:00
|
|
|
justify-content: center;
|
2018-11-16 16:35:04 +01:00
|
|
|
}
|
2018-11-19 17:41:48 +01:00
|
|
|
|
2018-11-16 16:35:04 +01:00
|
|
|
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;
|
|
|
|
|
}
|