| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- $switch-border-radius: 1rem;
- $switch-width: 3.5rem;
- $switch-height: 1.5rem;
- /* ============================================================
- SWITCH 3 - YES NO
- ============================================================ */
- .gf-form-switch {
- position: relative;
- max-width: 4.5rem;
- flex-grow: 1;
- min-width: 4.0rem;
- input {
- position: absolute;
- margin-left: -9999px;
- visibility: hidden;
- display: none;
- }
- input + label {
- display: block;
- position: relative;
- cursor: pointer;
- outline: none;
- user-select: none;
- width: 100%;
- height: 2.65rem;
- background-color: $page-bg;
- }
- input + label:before, input + label:after {
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- color: #fff;
- font-size: $font-size-sm;
- text-align: center;
- line-height: 2.8rem;
- font-size: 150%;
- }
- input + label:before {
- @include buttonBackground($input-bg, lighten($input-bg, 5%));
- //content: attr(data-off);
- font-family: 'FontAwesome';
- //content: "\f00c";
- //content: "\f096"; // square-o
- content: "\f046"; // check-square-o
- color: darken($text-color-weak, 17%);
- transition: transform 0.4s;
- backface-visibility: hidden;
- text-shadow: 0px 0px 5px rgb(45, 45, 45);
- }
- input + label:after {
- @include buttonBackground($input-bg, lighten($input-bg, 5%));
- //@include buttonBackground($btn-secondary-bg, $btn-secondary-bg-hl);
- //content: attr(data-on);
- //content: "\f00c";
- content: "\f046"; // check-square-o
- color: #FF8600;
- text-shadow: 0px 0px 5px rgb(45, 45, 45);
- font-family: 'FontAwesome';
- transition: transform 0.4s;
- transform: rotateY(180deg);
- backface-visibility: hidden;
- }
- input:checked + label:before {
- transform: rotateY(180deg);
- }
- input:checked + label:after {
- transform: rotateY(0);
- }
- }
|