woocommerce/packages/js/components/src/segmented-selection/style.scss

74 lines
1.4 KiB
SCSS

.woocommerce-segmented-selection {
width: 100%;
color: $gray-700;
}
.woocommerce-segmented-selection__container {
width: 100%;
grid-template-columns: 1fr 1fr;
display: grid;
border-top: 1px solid $gray-400;
border-bottom: 1px solid $gray-400;
background-color: $gray-400;
}
.woocommerce-segmented-selection__item {
&:nth-child(2n) {
border-left: 1px solid $gray-400;
border-top: 1px solid $gray-400;
}
&:nth-child(2n + 1) {
border-top: 1px solid $gray-400;
}
&:nth-child(-n + 2) {
border-top: 0;
}
}
.woocommerce-segmented-selection__label {
background-color: $gray-100;
padding: $gap-small $gap-small $gap-small $gap-larger;
position: relative;
display: block;
height: 100%;
&:active {
background-color: $gray-200;
}
&:hover {
background-color: $gray-200;
}
}
.woocommerce-segmented-selection__input {
opacity: 0;
position: absolute;
left: -9999px;
&:active + label .woocommerce-segmented-selection__label {
background-color: $gray-200;
}
&:checked + label .woocommerce-segmented-selection__label {
background-color: $studio-white;
font-weight: 600;
&::before {
content: '';
width: 8px;
height: 8px;
background-color: var(--wp-admin-theme-color);
position: absolute;
top: 50%;
transform: translate(-20px, -50%);
}
}
&:focus + label .woocommerce-segmented-selection__label {
box-shadow: inset 0 0 0 1px $wp-admin-sidebar;
}
}