2020-06-17 09:53:42 +00:00
|
|
|
.wc-block-components-checkbox {
|
2020-05-14 09:07:21 +00:00
|
|
|
@include reset-typography();
|
2021-07-22 11:03:00 +00:00
|
|
|
align-items: flex-start;
|
2020-07-31 15:17:01 +00:00
|
|
|
display: flex;
|
2020-04-07 15:37:03 +00:00
|
|
|
position: relative;
|
2021-09-16 12:16:21 +00:00
|
|
|
margin-top: em($gap-large);
|
2020-04-07 15:37:03 +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;
|
2021-01-12 09:09:47 +00:00
|
|
|
border: 2px solid $input-border-gray;
|
2020-08-11 08:59:59 +00:00
|
|
|
border-radius: 2px;
|
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;
|
2021-01-12 09:09:47 +00:00
|
|
|
min-height: 24px;
|
|
|
|
min-width: 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;
|
|
|
|
border-color: $input-border-gray;
|
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 {
|
|
|
|
outline: 2px solid $input-border-gray;
|
|
|
|
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);
|
|
|
|
|
|
|
|
.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 {
|
2021-01-12 09:09:47 +00:00
|
|
|
padding-left: $gap;
|
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;
|
|
|
|
}
|
|
|
|
}
|