![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/app/design/frontend/Cnc/default/web/scss/common/forms/ |
// ============================================== // FORMS - Radios // ============================================== // // Configuration // _____________________________________________ $radio-width: 12px; $radio-height: 12px; $radio-border-weight: 1px; $radio-checked-color: $c-pink; $op-radio-width: 14px; $op-radio-height: 14px; $op-radio-border-weight: 1px; $op-radio-border-color: #979797; .choice { input[type="radio"] { & + label { font-size: 1.4rem; } } } // Exept for the checkout body:not(.checkout-index-index){ input[type="radio"] { @extend .visually-hidden; & + label { position: relative; display: inline-block; padding-left: 24px; min-height: 20px; line-height: 1.4; cursor: pointer; &::before, &::after { position: absolute; content: ""; cursor: pointer; border-radius: 100%; transition: all .2s; margin-top: 2px; } // Fake radio &::before { left: 0; top: 0; width: $radio-width; height: $radio-height; border: $radio-border-weight solid $c-grey; background-color: $c-white; } // Round &::after { width: calc(#{$radio-width} - 4px); height: calc(#{$radio-height} - 4px); left: calc(calc(#{$radio-width} + #{$radio-border-weight} * 2) / 2); top: calc(calc(#{$radio-height} + #{$radio-border-weight} * 2) / 2); background-color: $radio-checked-color; opacity: 0; transform: scale(0.5) translate(-100%, -100%); } } &:hover { & + label { // Fake radio &::before { border-color: $c-blue-dark; transition: all .2s; } } } &:checked { & + label { // Fake radio &::before { border-color: $c-blue-dark; transition: all .2s; } // Round &::after { opacity: 1; transform: scale(1) translate(-50%, -50%); transition: all .2s; } } } } } // Input Radio on Onepage checkout (design like input checkbox) .checkout-index-index .opc-wrapper{ input[type="radio"] { @extend .visually-hidden; & + label { position: relative; display: flex; margin-top: 2px; padding-top: 1px; padding-left: 35px; min-height: 24px; line-height: 1.4; font-size: 1.4rem; font-weight: $fw-roboto-bold; cursor: pointer; &::before, &::after { position: absolute; content: ""; cursor: pointer; transition: all .2s; margin-top: 2px; } // Fake checkbox &::before { left: 0; top: 0; width: $op-radio-width; height: $op-radio-height; border: $op-radio-border-weight solid $op-radio-border-color; border-radius: $radius-input / 2; background-color: $c-white; } // Check icon &::after { @extend %icon-icomoon; content: "\e92e"; left: calc(calc(#{$op-radio-width} - #{$op-radio-border-weight * 2 })); top: calc(calc(#{$op-radio-height}) / 2); opacity: 0; font-size: 1.7rem; color: $c-blue; transform: scale(0.5) translate(-100%, -100%); } } &:hover { & + label { // Fake checkbox &::before { border-color: $c-blue; transition: all .2s; } } } &:checked { & + label { // Fake checkbox &::before { border-color: $c-blue; background-color: $c-white; transition: all .2s; } // Check icon &::after { opacity: 1; transform: scale(1) translate(-50%, -50%); transition: all .2s; } } } } }