2020-06-17 09:53:42 +00:00
|
|
|
.wc-block-components-checkbox {
|
2023-04-21 20:11:10 +00:00
|
|
|
@include reset-color();
|
2020-05-14 09:07:21 +00:00
|
|
|
@include reset-typography();
|
2023-07-04 11:06:48 +00:00
|
|
|
margin-top: em($gap);
|
2020-04-07 15:37:03 +00:00
|
|
|
|
2021-11-22 08:52:43 +00:00
|
|
|
label {
|
|
|
|
align-items: flex-start;
|
|
|
|
display: flex;
|
|
|
|
position: relative;
|
2023-04-20 05:40:02 +00:00
|
|
|
cursor: pointer;
|
2022-11-29 15:42:24 +00:00
|
|
|
@include font-size(small);
|
2023-10-13 11:13:50 +00:00
|
|
|
margin-bottom: 0 !important;
|
2023-04-20 05:40:02 +00:00
|
|
|
|
|
|
|
input[type="checkbox"] {
|
|
|
|
cursor: inherit;
|
|
|
|
}
|
2021-11-22 08:52:43 +00:00
|
|
|
}
|
|
|
|
|
2020-06-17 09:53:42 +00:00
|
|
|
.wc-block-components-checkbox__input[type="checkbox"] {
|
2021-04-12 10:03:36 +00:00
|
|
|
font-size: 1em;
|
2020-04-07 15:37:03 +00:00
|
|
|
appearance: none;
|
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;
|
2023-10-11 16:04:45 +00:00
|
|
|
border-radius: $universal-border-radius;
|
2021-07-22 11:03:00 +00:00
|
|
|
box-sizing: border-box;
|
2021-01-12 09:09:47 +00:00
|
|
|
height: em(24px);
|
|
|
|
width: em(24px);
|
2020-04-07 15:37:03 +00:00
|
|
|
margin: 0;
|
2022-11-29 15:42:24 +00:00
|
|
|
margin-right: em($gap);
|
2021-11-25 14:31:47 +00:00
|
|
|
min-height: em(24px);
|
|
|
|
min-width: em(24px);
|
2020-04-07 15:37:03 +00:00
|
|
|
overflow: hidden;
|
|
|
|
position: static;
|
|
|
|
vertical-align: middle;
|
2020-08-11 08:59:59 +00:00
|
|
|
background-color: #fff;
|
2020-04-07 15:37:03 +00:00
|
|
|
|
|
|
|
&:checked {
|
2021-01-12 09:09:47 +00:00
|
|
|
background: #fff;
|
2020-08-11 08:59:59 +00:00
|
|
|
}
|
2020-04-07 15:37:03 +00:00
|
|
|
|
2021-09-14 11:26:41 +00:00
|
|
|
&:focus {
|
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
|
|
|
outline: 1px solid $universal-border-strong;
|
2021-09-14 11:26:41 +00:00
|
|
|
outline-offset: 2px;
|
|
|
|
}
|
|
|
|
|
2021-04-12 10:03:36 +00:00
|
|
|
&::before,
|
|
|
|
&::after {
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
|
2020-08-11 08:59:59 +00:00
|
|
|
&:not(:checked) + .wc-block-components-checkbox__mark {
|
|
|
|
display: none;
|
2020-04-07 15:37:03 +00:00
|
|
|
}
|
2020-08-14 11:08:16 +00:00
|
|
|
|
|
|
|
.has-dark-controls & {
|
|
|
|
border-color: $controls-border-dark;
|
2021-01-12 09:09:47 +00:00
|
|
|
background-color: $input-background-dark;
|
2020-08-14 11:08:16 +00:00
|
|
|
|
|
|
|
&:checked {
|
2021-01-12 09:09:47 +00:00
|
|
|
background: $input-background-dark;
|
2020-08-14 11:08:16 +00:00
|
|
|
border-color: $controls-border-dark;
|
|
|
|
}
|
2021-09-14 11:26:41 +00:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline: 2px solid $controls-border-dark;
|
|
|
|
outline-offset: 2px;
|
|
|
|
}
|
2020-08-14 11:08:16 +00:00
|
|
|
}
|
2020-03-06 10:26:03 +00:00
|
|
|
}
|
2020-04-07 15:37:03 +00:00
|
|
|
|
2021-07-23 13:21:59 +00:00
|
|
|
&.has-error {
|
|
|
|
color: $alert-red;
|
|
|
|
|
|
|
|
a {
|
|
|
|
color: $alert-red;
|
|
|
|
}
|
|
|
|
.wc-block-components-checkbox__input {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active {
|
|
|
|
border-color: $alert-red;
|
|
|
|
}
|
|
|
|
&:focus {
|
2021-09-14 11:26:41 +00:00
|
|
|
outline: 2px solid $alert-red;
|
2021-07-23 13:21:59 +00:00
|
|
|
outline-offset: 2px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-11 08:59:59 +00:00
|
|
|
.wc-block-components-checkbox__mark {
|
2021-01-12 09:09:47 +00:00
|
|
|
fill: #000;
|
2020-08-11 08:59:59 +00:00
|
|
|
position: absolute;
|
2021-07-22 11:03:00 +00:00
|
|
|
margin-left: em(3px);
|
|
|
|
margin-top: em(1px);
|
2021-01-12 09:09:47 +00:00
|
|
|
width: em(18px);
|
|
|
|
height: em(18px);
|
2021-11-22 08:52:43 +00:00
|
|
|
pointer-events: none;
|
2021-01-12 09:09:47 +00:00
|
|
|
|
|
|
|
.has-dark-controls & {
|
|
|
|
fill: #fff;
|
|
|
|
}
|
2020-08-11 08:59:59 +00:00
|
|
|
}
|
|
|
|
|
2021-07-22 11:03:00 +00:00
|
|
|
> span,
|
2020-08-11 08:59:59 +00:00
|
|
|
.wc-block-components-checkbox__label {
|
2020-04-07 15:37:03 +00:00
|
|
|
vertical-align: middle;
|
2021-07-22 11:03:00 +00:00
|
|
|
line-height: em(24px);
|
2020-03-06 10:26:03 +00:00
|
|
|
}
|
|
|
|
}
|
2020-08-11 08:59:59 +00:00
|
|
|
|
2020-08-14 11:08:16 +00:00
|
|
|
// Hack to hide the check mark in IE11
|
|
|
|
// See comment: https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/2320/#issuecomment-621936576
|
2020-12-01 08:04:52 +00:00
|
|
|
@include ie11() {
|
2020-08-11 08:59:59 +00:00
|
|
|
.wc-block-components-checkbox__mark {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2020-11-23 19:43:36 +00:00
|
|
|
|
|
|
|
.theme-twentytwentyone {
|
2020-11-23 20:20:31 +00:00
|
|
|
.wc-block-components-checkbox__input[type="checkbox"],
|
|
|
|
.has-dark-controls .wc-block-components-checkbox__input[type="checkbox"] {
|
|
|
|
background-color: #fff;
|
2020-11-23 19:43:36 +00:00
|
|
|
border-color: var(--form--border-color);
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2020-11-23 20:20:31 +00:00
|
|
|
.wc-block-components-checkbox__input[type="checkbox"]:checked,
|
2021-04-12 10:03:36 +00:00
|
|
|
.has-dark-controls
|
|
|
|
.wc-block-components-checkbox__input[type="checkbox"]:checked {
|
2020-11-23 19:43:36 +00:00
|
|
|
background-color: #fff;
|
|
|
|
border-color: var(--form--border-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-checkbox__mark {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|