2024-04-10 09:54:05 +00:00
|
|
|
.wc-block-components-radio-control--highlight-checked {
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
div.wc-block-components-radio-control-accordion-option {
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
// This ::after element is to fake a transparent border-top on each option.
|
|
|
|
// We can't just use border-top on the option itself because of the border around the entire accordion.
|
|
|
|
// Both borders have transparency so there's an overlap where the border is darker (due to adding two
|
|
|
|
// transparent colours together). Doing it with an ::after lets us bring the "border" in by one pixel on each
|
|
|
|
// side to avoid the overlap.
|
|
|
|
&::after {
|
|
|
|
content: "";
|
|
|
|
background: $universal-border-light;
|
|
|
|
height: 1px;
|
|
|
|
right: 1px;
|
|
|
|
left: 1px;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
|
2024-09-23 12:11:43 +00:00
|
|
|
.has-dark-controls & {
|
|
|
|
&::after {
|
|
|
|
background: $input-border-dark;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-10 09:54:05 +00:00
|
|
|
// The first child doesn't need a fake border-top because it's handled by its parent's border-top. This stops
|
|
|
|
// a double border.
|
|
|
|
&:first-child::after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// This rule removes the fake border-top from the selected element to prevent a double border.
|
|
|
|
&.wc-block-components-radio-control-accordion-option--checked-option-highlighted + div.wc-block-components-radio-control-accordion-option::after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Adds a "border" around the selected option. This is done with a box-shadow to prevent a double border on the left
|
|
|
|
// and right of the selected element, and top and bottom of the first/last elements.
|
|
|
|
label.wc-block-components-radio-control__option--checked-option-highlighted,
|
|
|
|
.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
|
2024-09-23 12:11:43 +00:00
|
|
|
box-shadow: 0 0 0 1.5px currentColor inset;
|
2024-04-10 09:54:05 +00:00
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Defines a border around the radio control. Cannot be done with normal CSS borders or outlines because when
|
|
|
|
// selecting an item we get a double border on the left and right. It's not possible to remove the outer border just
|
|
|
|
// for the selected element, but using a pseudo element gives us more control.
|
|
|
|
&::after {
|
|
|
|
content: "";
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
pointer-events: none;
|
|
|
|
position: absolute;
|
|
|
|
border: 1px solid $universal-border-light;
|
|
|
|
border-radius: 4px;
|
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
2024-09-23 12:11:43 +00:00
|
|
|
.has-dark-controls & {
|
|
|
|
&::after {
|
|
|
|
border-color: $input-border-dark;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-10 09:54:05 +00:00
|
|
|
// Remove the top border when the first element is selected, this is so we don't get a double border with the
|
|
|
|
// box-shadow.
|
|
|
|
&.wc-block-components-radio-control--highlight-checked--first-selected::after {
|
|
|
|
border-top: 0;
|
|
|
|
margin-top: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove the bottom border when the last element is selected, this is so we don't get a double border with the
|
|
|
|
// box-shadow.
|
|
|
|
&.wc-block-components-radio-control--highlight-checked--last-selected::after {
|
|
|
|
margin-bottom: 2px;
|
|
|
|
border-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove the fake border-top from the item after the selected element, this is to prevent a double border with the
|
|
|
|
// selected element's box-shadow.
|
|
|
|
.wc-block-components-radio-control__option--checked-option-highlighted + .wc-block-components-radio-control__option::after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-radio-control__option {
|
|
|
|
// Add a fake border to the top of each radio option. This is because using CSS borders would result in an
|
|
|
|
// overlap and two transparent borders combining to make a darker pixel. This fake border allows us to bring the
|
|
|
|
// border in by one pixel on each side to avoid the overlap.
|
|
|
|
&::after {
|
|
|
|
content: "";
|
|
|
|
background: $universal-border-light;
|
|
|
|
height: 1px;
|
|
|
|
right: 1px;
|
|
|
|
left: 1px;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
|
2024-09-23 12:11:43 +00:00
|
|
|
.has-dark-controls & {
|
|
|
|
&::after {
|
|
|
|
background: $input-border-dark;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-10 09:54:05 +00:00
|
|
|
// The first child doesn't need a fake border-top because it's handled by its parent's border-top.
|
|
|
|
&:first-child::after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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%;
|
|
|
|
}
|
|
|
|
|
2024-06-03 11:46:08 +00:00
|
|
|
.wc-block-components-radio-control__option
|
|
|
|
.wc-block-components-radio-control__option-layout {
|
2020-11-23 16:30:27 +00:00
|
|
|
&::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);
|
2024-05-08 10:58:09 +00:00
|
|
|
line-height: 1.55;
|
2020-11-23 16:30:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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;
|
Update the border colors in the Cart and Checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/11474)
* Change border color to Gutenberg 100 for Cart and Checkout blocks
* Change form input color to Gutenberg 900 for Cart and Checkout blocks
* Fix additional border colors of Checkout block
* Update borders and form field colors in Cart Block
* Change border color to $universal-border-light
* Change border color for cart line items to $universal-border-light
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix colors of text area border and form steps
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix form steps
* Update universal dark border rgba value
- Update universal dark border rgba value from rgba(0, 0, 0, 0.882) to rgba(17, 17, 17, .80) to keep it consistent with universal-border colors
* Update $universal-border-light color
* Update the opacity of the borders
* Update the border color to rgba (17, 17, 17, 0.12)
* Roll back $universal-border-light value to the original value: 0.115
* Remove Opacity and pass it as argument in with-translucent-border
- We have with-translucent-border option that accepts border and opacity for pseudo elements.
* Remove additional spaces
* Replace with-translucent-border with normal border
- Since we're are not mixing the opacity to the border color so we don't need to use mixin with-translucent-border.
* Fix applied css and add low contrast Color usage details
- Fix minor CSS as per the standards.
- Add comments for universal border colors that they're low contrast colors and should be used for decorative elements only
* Fix border gap and double border for multiple shipping packages
* Fix payment method borders and Cart line items borders
- Change border bottom to border-top for cart line items.
- Fix payment method radio control borders.
* Fix local pickup border
- Local pickup was using with-translucent-borders so it has some opacity, changed it to border-bottom.
* Add border-bottom to cart items
* Remove additional border from Cart items
* Fix radio and checkbox borders as per the design
* Fix shipping method borders and background color as per the design.
* Force align left on the description for the local pickup options.
* Update border color in quantity selector component
* Fix Shipping options radio selection alignment
- Add left padding to wc-block-components-shipping-rates-control__package element.
* Update colors and variables
* Change checkbox and radio button colors
- Change checkbox and radio button colors from rgba(25, 23, 17, 0.3) to rgba(25, 23, 17, 0.48).
* Remove bottom property from express payment style
2023-12-07 17:37:48 +00:00
|
|
|
border: 1px solid $universal-border-medium;
|
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;
|
Update the border colors in the Cart and Checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/11474)
* Change border color to Gutenberg 100 for Cart and Checkout blocks
* Change form input color to Gutenberg 900 for Cart and Checkout blocks
* Fix additional border colors of Checkout block
* Update borders and form field colors in Cart Block
* Change border color to $universal-border-light
* Change border color for cart line items to $universal-border-light
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix colors of text area border and form steps
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix form steps
* Update universal dark border rgba value
- Update universal dark border rgba value from rgba(0, 0, 0, 0.882) to rgba(17, 17, 17, .80) to keep it consistent with universal-border colors
* Update $universal-border-light color
* Update the opacity of the borders
* Update the border color to rgba (17, 17, 17, 0.12)
* Roll back $universal-border-light value to the original value: 0.115
* Remove Opacity and pass it as argument in with-translucent-border
- We have with-translucent-border option that accepts border and opacity for pseudo elements.
* Remove additional spaces
* Replace with-translucent-border with normal border
- Since we're are not mixing the opacity to the border color so we don't need to use mixin with-translucent-border.
* Fix applied css and add low contrast Color usage details
- Fix minor CSS as per the standards.
- Add comments for universal border colors that they're low contrast colors and should be used for decorative elements only
* Fix border gap and double border for multiple shipping packages
* Fix payment method borders and Cart line items borders
- Change border bottom to border-top for cart line items.
- Fix payment method radio control borders.
* Fix local pickup border
- Local pickup was using with-translucent-borders so it has some opacity, changed it to border-bottom.
* Add border-bottom to cart items
* Remove additional border from Cart items
* Fix radio and checkbox borders as per the design
* Fix shipping method borders and background color as per the design.
* Force align left on the description for the local pickup options.
* Update border color in quantity selector component
* Fix Shipping options radio selection alignment
- Add left padding to wc-block-components-shipping-rates-control__package element.
* Update colors and variables
* Change checkbox and radio button colors
- Change checkbox and radio button colors from rgba(25, 23, 17, 0.3) to rgba(25, 23, 17, 0.48).
* Remove bottom property from express payment style
2023-12-07 17:37:48 +00:00
|
|
|
left: $gap;
|
2021-01-12 09:09:47 +00:00
|
|
|
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;
|
Update the border colors in the Cart and Checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/11474)
* Change border color to Gutenberg 100 for Cart and Checkout blocks
* Change form input color to Gutenberg 900 for Cart and Checkout blocks
* Fix additional border colors of Checkout block
* Update borders and form field colors in Cart Block
* Change border color to $universal-border-light
* Change border color for cart line items to $universal-border-light
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix colors of text area border and form steps
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix form steps
* Update universal dark border rgba value
- Update universal dark border rgba value from rgba(0, 0, 0, 0.882) to rgba(17, 17, 17, .80) to keep it consistent with universal-border colors
* Update $universal-border-light color
* Update the opacity of the borders
* Update the border color to rgba (17, 17, 17, 0.12)
* Roll back $universal-border-light value to the original value: 0.115
* Remove Opacity and pass it as argument in with-translucent-border
- We have with-translucent-border option that accepts border and opacity for pseudo elements.
* Remove additional spaces
* Replace with-translucent-border with normal border
- Since we're are not mixing the opacity to the border color so we don't need to use mixin with-translucent-border.
* Fix applied css and add low contrast Color usage details
- Fix minor CSS as per the standards.
- Add comments for universal border colors that they're low contrast colors and should be used for decorative elements only
* Fix border gap and double border for multiple shipping packages
* Fix payment method borders and Cart line items borders
- Change border bottom to border-top for cart line items.
- Fix payment method radio control borders.
* Fix local pickup border
- Local pickup was using with-translucent-borders so it has some opacity, changed it to border-bottom.
* Add border-bottom to cart items
* Remove additional border from Cart items
* Fix radio and checkbox borders as per the design
* Fix shipping method borders and background color as per the design.
* Force align left on the description for the local pickup options.
* Update border color in quantity selector component
* Fix Shipping options radio selection alignment
- Add left padding to wc-block-components-shipping-rates-control__package element.
* Update colors and variables
* Change checkbox and radio button colors
- Change checkbox and radio button colors from rgba(25, 23, 17, 0.3) to rgba(25, 23, 17, 0.48).
* Remove bottom property from express payment style
2023-12-07 17:37:48 +00:00
|
|
|
&:checked {
|
2024-07-11 17:00:49 +00:00
|
|
|
border: 1px solid $universal-border-strong;
|
Update the border colors in the Cart and Checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/11474)
* Change border color to Gutenberg 100 for Cart and Checkout blocks
* Change form input color to Gutenberg 900 for Cart and Checkout blocks
* Fix additional border colors of Checkout block
* Update borders and form field colors in Cart Block
* Change border color to $universal-border-light
* Change border color for cart line items to $universal-border-light
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix colors of text area border and form steps
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix form steps
* Update universal dark border rgba value
- Update universal dark border rgba value from rgba(0, 0, 0, 0.882) to rgba(17, 17, 17, .80) to keep it consistent with universal-border colors
* Update $universal-border-light color
* Update the opacity of the borders
* Update the border color to rgba (17, 17, 17, 0.12)
* Roll back $universal-border-light value to the original value: 0.115
* Remove Opacity and pass it as argument in with-translucent-border
- We have with-translucent-border option that accepts border and opacity for pseudo elements.
* Remove additional spaces
* Replace with-translucent-border with normal border
- Since we're are not mixing the opacity to the border color so we don't need to use mixin with-translucent-border.
* Fix applied css and add low contrast Color usage details
- Fix minor CSS as per the standards.
- Add comments for universal border colors that they're low contrast colors and should be used for decorative elements only
* Fix border gap and double border for multiple shipping packages
* Fix payment method borders and Cart line items borders
- Change border bottom to border-top for cart line items.
- Fix payment method radio control borders.
* Fix local pickup border
- Local pickup was using with-translucent-borders so it has some opacity, changed it to border-bottom.
* Add border-bottom to cart items
* Remove additional border from Cart items
* Fix radio and checkbox borders as per the design
* Fix shipping method borders and background color as per the design.
* Force align left on the description for the local pickup options.
* Update border color in quantity selector component
* Fix Shipping options radio selection alignment
- Add left padding to wc-block-components-shipping-rates-control__package element.
* Update colors and variables
* Change checkbox and radio button colors
- Change checkbox and radio button colors from rgba(25, 23, 17, 0.3) to rgba(25, 23, 17, 0.48).
* Remove bottom property from express payment style
2023-12-07 17:37:48 +00:00
|
|
|
}
|
2020-11-23 16:30:27 +00:00
|
|
|
|
2023-10-12 02:31:55 +00:00
|
|
|
&:focus {
|
2024-07-11 17:00:49 +00:00
|
|
|
outline: 1px solid $universal-border-strong;
|
2023-10-12 02:31:55 +00:00
|
|
|
outline-offset: 2px;
|
|
|
|
}
|
|
|
|
|
2020-11-23 16:30:27 +00:00
|
|
|
&:checked::before {
|
2024-07-11 17:00:49 +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
|
|
|
|
2024-09-23 12:11:43 +00:00
|
|
|
&:checked {
|
|
|
|
border-color: $input-text-dark;
|
|
|
|
}
|
|
|
|
|
2020-11-23 16:30:27 +00:00
|
|
|
&:checked::before {
|
|
|
|
background: $input-text-dark;
|
|
|
|
}
|
2024-09-23 12:11:43 +00:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline: 1px solid $input-text-dark;
|
|
|
|
outline-offset: 1px;
|
|
|
|
}
|
2020-11-23 16:30:27 +00:00
|
|
|
}
|
2023-08-08 10:56:19 +00:00
|
|
|
|
2024-06-21 09:23:19 +00:00
|
|
|
&[aria-disabled="true"],
|
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 {
|
2024-06-03 11:46:08 +00:00
|
|
|
.wc-block-components-radio-control
|
|
|
|
.wc-block-components-radio-control__input {
|
2020-11-23 16:30:27 +00:00
|
|
|
&: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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|