woocommerce/plugins/woocommerce-admin/packages/components/src/segmented-selection/style.scss

76 lines
1.5 KiB
SCSS
Raw Normal View History

2018-05-17 04:44:58 +00:00
/** @format */
.woocommerce-segmented-selection {
2018-05-17 04:44:58 +00:00
width: 100%;
2018-06-29 00:34:17 +00:00
color: $core-grey-dark-500;
2018-05-28 10:55:19 +00:00
}
.woocommerce-segmented-selection__container {
width: 100%;
2018-05-17 04:44:58 +00:00
grid-template-columns: 1fr 1fr;
display: grid;
2018-06-29 00:34:17 +00:00
border-top: 1px solid $core-grey-light-700;
border-bottom: 1px solid $core-grey-light-700;
background-color: $core-grey-light-700;
2018-05-17 04:44:58 +00:00
}
.woocommerce-segmented-selection__item {
&:nth-child(2n) {
border-left: 1px solid $core-grey-light-700;
border-top: 1px solid $core-grey-light-700;
}
&:nth-child(2n + 1) {
border-top: 1px solid $core-grey-light-700;
}
&:nth-child(-n + 2) {
border-top: 0;
}
}
.woocommerce-segmented-selection__label {
2018-06-29 00:34:17 +00:00
background-color: $core-grey-light-100;
2018-08-23 18:21:04 +00:00
padding: $gap-small $gap-small $gap-small $gap-larger;
2018-05-17 04:44:58 +00:00
position: relative;
display: block;
height: 100%;
2018-06-29 00:34:17 +00:00
&:active {
background-color: $core-grey-light-200;
2018-06-29 00:34:17 +00:00
}
&:hover {
background-color: $core-grey-light-200;
}
2018-05-17 04:44:58 +00:00
}
.woocommerce-segmented-selection__input {
2018-05-17 04:44:58 +00:00
opacity: 0;
position: absolute;
left: -9999px;
2018-06-29 00:34:17 +00:00
&:active + label .woocommerce-segmented-selection__label {
background-color: $core-grey-light-200;
2018-06-29 00:34:17 +00:00
}
&:checked + label .woocommerce-segmented-selection__label {
2018-06-29 00:34:17 +00:00
background-color: $white;
font-weight: 600;
2018-05-17 04:44:58 +00:00
&::before {
content: '';
width: 8px;
height: 8px;
2018-06-29 00:34:17 +00:00
background-color: $woocommerce;
2018-05-17 04:44:58 +00:00
position: absolute;
top: 50%;
transform: translate(-20px, -50%);
2018-05-17 04:44:58 +00:00
}
}
&:focus + label .woocommerce-segmented-selection__label {
box-shadow: inset 0 0 0 1px $black;
2018-05-17 04:44:58 +00:00
}
}