woocommerce/plugins/woocommerce-admin/client/components/split-button/style.scss

153 lines
4.3 KiB
SCSS

/** @format */
.woocommerce-split-button {
display: flex;
align-items: center;
padding: $gap-smallest 0 $gap-smallest 0;
.woocommerce-split-button__menu {
padding: 0;
}
.woocommerce-split-button__main-action,
.woocommerce-split-button__menu-toggle {
line-height: 26px;
height: 42px;
border-radius: 3px;
white-space: nowrap;
border-width: 1px;
border-style: solid;
color: $core-grey-dark-500;
border-color: $core-grey-light-800;
background: $core-grey-light-200;
box-shadow: inset 0 -1px 0 $core-grey-light-800;
vertical-align: top;
}
.woocommerce-split-button__main-action {
padding: 0 $gap-small;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: 0;
height: 32px;
}
.woocommerce-split-button__menu-toggle {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding: $gap-smallest;
height: 32px;
width: 32px;
}
.woocommerce-split-button__menu-popover.is-mobile {
top: 46px;
}
.woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled='true']):not(.is-default):hover,
.woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled='true']):not(.is-default):hover {
background-color: $button-hover;
border-color: $core-grey-dark-200;
box-shadow: inset 0 -1px 0 $core-grey-light-800;
}
.woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled='true']):not(.is-default):focus,
.woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled='true']):not(.is-default):focus {
background-color: $button-hover;
border: 1px solid $core-grey-dark-500;
box-shadow: inset 0 -1px 0 $core-grey-dark-300, 0 0 0 2px #bfe7f3;
}
.woocommerce-split-button__main-action.components-button .gridicon,
.woocommerce-split-button__main-action.components-button .dashicon {
width: 18px;
height: 18px;
}
&.has-label {
.woocommerce-split-button__main-action.components-button .gridicon,
.woocommerce-split-button__main-action.components-button .dashicon {
margin-right: $gap-smallest * 2;
}
}
.woocommerce-split-button__menu-wrapper {
width: 100%;
padding: $gap-smallest;
.components-button,
.components-icon-button {
color: $core-grey-dark-500;
margin-top: $gap-smallest;
margin-bottom: $gap-smallest;
}
.components-button:not(:disabled):not([aria-disabled='true']):not(.is-default):hover {
background-color: $white;
color: $black;
box-shadow: inset 0 0 0 1px $core-grey-light-500, inset 0 0 0 2px $white,
0 1px 1px rgba(25, 30, 35, 0.2);
}
}
.woocommerce-split-button__menu-item {
width: 100%;
padding: $gap-smallest;
border-radius: 0;
outline: none;
cursor: pointer;
.dashicon {
margin-right: $gap-smallest * 2;
}
}
.dashicons-arrow-down {
fill: $core-grey-dark-500;
height: 20px;
width: 20px;
}
.woocommerce-split-button__menu-toggle.is-active,
.woocommerce-split-button__menu-toggle.is-active:hover,
.woocommerce-split-button__menu-toggle.is-active > svg,
.woocommerce-split-button__menu-toggle.is-active:hover > svg {
background: initial;
}
.woocommerce-split-button__menu-toggle.is-active,
.woocommerce-split-button__menu-toggle.is-active:hover {
border-color: $core-grey-light-800;
}
}
.woocommerce-split-button.is-primary {
.woocommerce-split-button__main-action,
.woocommerce-split-button__menu-toggle {
background: $woocommerce;
color: $white;
border-color: $woocommerce-600;
box-shadow: inset 0 -1px 0 $woocommerce-600;
}
.woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled='true']):not(.is-default):hover,
.woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled='true']):not(.is-default):hover {
color: $white;
background-color: $woocommerce-600;
border-color: $woocommerce-700;
box-shadow: inset 0 -1px 0 $woocommerce-700;
}
.woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled='true']):not(.is-default):focus,
.woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled='true']):not(.is-default):focus {
color: $white;
background-color: $woocommerce-600;
box-shadow: inset 0 -1px 0 $woocommerce-700, 0 0 0 2px $woocommerce-100;
border: 1px solid $woocommerce-700;
}
.dashicons-arrow-down {
fill: $white;
}
}