2020-11-23 16:30:27 +00:00
|
|
|
.wc-block-components-radio-control__option {
|
2023-04-21 20:11:10 +00:00
|
|
|
@include reset-color();
|
2020-11-23 16:30:27 +00:00
|
|
|
@include reset-typography();
|
|
|
|
display: block;
|
2021-02-09 08:10:45 +00:00
|
|
|
margin: em($gap) 0;
|
2023-07-20 11:40:40 +00:00
|
|
|
margin-top: 0;
|
2022-12-15 23:52:03 +00:00
|
|
|
padding: 0 0 0 em($gap-larger);
|
2021-02-09 08:10:45 +00:00
|
|
|
position: relative;
|
2023-04-20 05:40:02 +00:00
|
|
|
cursor: pointer;
|
2021-02-09 08:10:45 +00:00
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2020-11-23 16:30:27 +00:00
|
|
|
}
|
2019-12-16 22:13:41 +00:00
|
|
|
|
2020-11-23 16:30:27 +00:00
|
|
|
.wc-block-components-radio-control__option-layout {
|
|
|
|
display: table;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-radio-control__option .wc-block-components-radio-control__option-layout {
|
|
|
|
&::after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-radio-control__label-group,
|
|
|
|
.wc-block-components-radio-control__description-group {
|
|
|
|
display: table-row;
|
|
|
|
|
|
|
|
> span {
|
|
|
|
display: table-cell;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-radio-control__secondary-label,
|
|
|
|
.wc-block-components-radio-control__secondary-description {
|
|
|
|
text-align: right;
|
|
|
|
min-width: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-radio-control__label,
|
|
|
|
.wc-block-components-radio-control__secondary-label {
|
|
|
|
// Currently, max() CSS function calls need to be wrapped with unquote.
|
|
|
|
// See: https://github.com/sass/sass/issues/2378#issuecomment-367490840
|
2021-01-12 09:09:47 +00:00
|
|
|
// These values should be the same as the control input height.
|
2022-03-28 13:00:20 +00:00
|
|
|
line-height: string.unquote("max(1.5rem, 24px)");
|
2020-11-23 16:30:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-radio-control__description,
|
|
|
|
.wc-block-components-radio-control__secondary-description {
|
2021-10-11 13:18:32 +00:00
|
|
|
@include font-size(small);
|
2020-11-23 16:30:27 +00:00
|
|
|
line-height: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Extra class for specificity.
|
|
|
|
.wc-block-components-radio-control {
|
|
|
|
.wc-block-components-radio-control__input {
|
|
|
|
appearance: none;
|
2021-01-12 09:09:47 +00:00
|
|
|
background: #fff;
|
|
|
|
border: 2px solid $input-border-gray;
|
2020-11-23 16:30:27 +00:00
|
|
|
border-radius: 50%;
|
|
|
|
display: inline-block;
|
2021-01-12 09:09:47 +00:00
|
|
|
height: em(24px); // =1.5rem
|
|
|
|
min-height: 24px;
|
|
|
|
min-width: 24px;
|
|
|
|
width: em(24px);
|
|
|
|
// The code belows centers the input vertically.
|
2020-11-23 16:30:27 +00:00
|
|
|
position: absolute;
|
2021-01-12 09:09:47 +00:00
|
|
|
left: 0;
|
|
|
|
top: 50%;
|
2023-05-15 10:46:42 +00:00
|
|
|
transform: translate(0, -45%);
|
|
|
|
margin: inherit;
|
2023-04-20 05:40:02 +00:00
|
|
|
cursor: pointer;
|
2020-11-23 16:30:27 +00:00
|
|
|
|
2023-10-12 02:31:55 +00:00
|
|
|
&:focus {
|
|
|
|
outline: 2px solid $input-border-gray;
|
|
|
|
outline-offset: 2px;
|
|
|
|
}
|
|
|
|
|
2020-11-23 16:30:27 +00:00
|
|
|
&:checked::before {
|
2021-01-12 09:09:47 +00:00
|
|
|
background: #000;
|
2020-11-23 16:30:27 +00:00
|
|
|
border-radius: 50%;
|
|
|
|
content: "";
|
|
|
|
display: block;
|
2021-01-12 09:09:47 +00:00
|
|
|
height: em(12px);
|
2020-11-23 16:30:27 +00:00
|
|
|
left: 50%;
|
|
|
|
margin: 0;
|
2021-01-12 09:09:47 +00:00
|
|
|
min-height: 12px;
|
|
|
|
min-width: 12px;
|
2020-11-23 16:30:27 +00:00
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
2021-01-12 09:09:47 +00:00
|
|
|
width: em(12px);
|
2020-11-23 16:30:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.has-dark-controls & {
|
|
|
|
border-color: $controls-border-dark;
|
2021-01-12 09:09:47 +00:00
|
|
|
background-color: $input-background-dark;
|
2020-11-23 16:30:27 +00:00
|
|
|
|
|
|
|
&:checked::before {
|
|
|
|
background: $input-text-dark;
|
|
|
|
}
|
|
|
|
}
|
2023-08-08 10:56:19 +00:00
|
|
|
|
|
|
|
&[disabled] {
|
|
|
|
cursor: not-allowed;
|
|
|
|
opacity: 0.5;
|
|
|
|
transition: opacity 200ms ease;
|
|
|
|
}
|
2020-11-23 16:30:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.theme-twentytwentyone {
|
|
|
|
.wc-block-components-radio-control .wc-block-components-radio-control__input {
|
|
|
|
&:checked {
|
|
|
|
border-width: 2px;
|
2020-11-23 19:43:36 +00:00
|
|
|
|
|
|
|
&::before {
|
|
|
|
background-color: var(--form--color-text);
|
|
|
|
}
|
2020-11-23 16:30:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|