2020-02-26 13:02:48 +00:00
|
|
|
@mixin radio-control-styles {
|
|
|
|
.wc-block-radio-control__option {
|
2020-05-14 09:07:21 +00:00
|
|
|
@include reset-typography();
|
2020-02-26 13:02:48 +00:00
|
|
|
border-bottom: 1px solid $core-grey-light-600;
|
|
|
|
display: block;
|
2020-04-24 12:23:25 +00:00
|
|
|
padding: $gap-small $gap-small 0 #{$gap-larger * 2};
|
2020-02-26 13:02:48 +00:00
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-radio-control__option-layout {
|
2020-05-12 14:17:02 +00:00
|
|
|
display: table;
|
|
|
|
width: 100%;
|
2020-02-26 13:02:48 +00:00
|
|
|
border-bottom: 1px solid $core-grey-light-600;
|
2020-02-27 18:28:36 +00:00
|
|
|
padding-bottom: $gap-small;
|
2020-02-26 13:02:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-radio-control__option .wc-block-radio-control__option-layout {
|
|
|
|
border-bottom: 0;
|
|
|
|
}
|
|
|
|
|
2020-04-14 11:43:10 +00:00
|
|
|
.wc-block-radio-control__input {
|
2020-04-24 12:23:25 +00:00
|
|
|
left: $gap-large;
|
2020-04-14 11:43:10 +00:00
|
|
|
position: absolute;
|
2020-04-24 12:23:25 +00:00
|
|
|
top: $gap-small;
|
2020-03-09 11:28:26 +00:00
|
|
|
}
|
|
|
|
|
2020-05-12 14:17:02 +00:00
|
|
|
.wc-block-radio-control__label-group,
|
|
|
|
.wc-block-radio-control__description-group {
|
|
|
|
display: table-row;
|
|
|
|
|
|
|
|
> span {
|
|
|
|
display: table-cell;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-radio-control__secondary-label,
|
|
|
|
.wc-block-radio-control__secondary-description {
|
|
|
|
text-align: right;
|
|
|
|
min-width: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-09 11:28:26 +00:00
|
|
|
.wc-block-radio-control__label,
|
|
|
|
.wc-block-radio-control__secondary-label {
|
2020-04-24 12:23:25 +00:00
|
|
|
line-height: 20px;
|
|
|
|
// Currently, max() CSS function calls need to be wrapped with unquote.
|
|
|
|
// See: https://github.com/sass/sass/issues/2378#issuecomment-367490840
|
|
|
|
line-height: unquote("max(1rem, 20px)");
|
2020-03-09 11:28:26 +00:00
|
|
|
color: $core-grey-dark-600;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-radio-control__description,
|
|
|
|
.wc-block-radio-control__secondary-description {
|
2020-05-29 10:16:33 +00:00
|
|
|
@include font-size(small);
|
2020-03-09 11:28:26 +00:00
|
|
|
line-height: 20px;
|
|
|
|
color: $core-grey-dark-400;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin radio-control-input-styles {
|
2020-05-14 09:07:21 +00:00
|
|
|
// Extra class for specificity.
|
|
|
|
.wc-block-radio-control {
|
|
|
|
.wc-block-radio-control__input {
|
|
|
|
appearance: none;
|
|
|
|
background: #fff;
|
|
|
|
border: 2px solid currentColor;
|
2020-02-26 13:02:48 +00:00
|
|
|
border-radius: 50%;
|
2020-05-14 09:07:21 +00:00
|
|
|
display: inline-block;
|
|
|
|
height: 1.25rem;
|
|
|
|
min-height: 20px;
|
|
|
|
min-width: 20px;
|
|
|
|
width: 1.25rem;
|
|
|
|
|
|
|
|
&:checked::before {
|
|
|
|
background: currentColor;
|
|
|
|
border-radius: 50%;
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
height: 0.625em;
|
|
|
|
left: 50%;
|
|
|
|
margin: 0;
|
|
|
|
min-height: 10px;
|
|
|
|
min-width: 10px;
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
width: 0.625em;
|
|
|
|
}
|
2020-04-24 12:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-05-14 09:07:21 +00:00
|
|
|
@include breakpoint( ">782px" ) {
|
|
|
|
.wc-block-radio-control__input {
|
|
|
|
height: 1rem;
|
|
|
|
margin-top: 2px;
|
|
|
|
min-height: 16px;
|
|
|
|
min-width: 16px;
|
|
|
|
width: 1rem;
|
2020-04-24 12:23:25 +00:00
|
|
|
|
2020-05-14 09:07:21 +00:00
|
|
|
&:checked::before {
|
|
|
|
height: 0.5em;
|
|
|
|
min-height: 8px;
|
|
|
|
min-width: 8px;
|
|
|
|
width: 0.5em;
|
|
|
|
}
|
2020-04-24 12:23:25 +00:00
|
|
|
}
|
2020-02-26 13:02:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|