/* stylelint-disable */
@mixin thumb {
background-color: transparent;
background-position: 0 0;
box-sizing: content-box;
width: 12px;
height: 12px;
border: 2px solid $gray-900;
border-radius: 100%;
padding: 0;
margin: 0;
vertical-align: top;
cursor: pointer;
z-index: 20;
pointer-events: auto;
background: $white;
transition: transform .2s ease-in-out;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
&:hover {
@include thumbFocus;
}
@mixin thumbFocus {
background: $gray-900;
/* stylelint-enable */
@mixin track {
cursor: default;
height: 1px; /* Required for Samsung internet based browsers */
outline: 0;
@mixin reset {
/* Use !important to prevent theme input styles from breaking the component.
Reference https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/3902
*/
padding: 0 !important;
border: 0 !important;
outline: none;
background: transparent;
.wc-block-components-price-slider {
margin-bottom: $gap-large;
&.is-loading.is-disabled {
.wc-block-components-price-slider__range-input-wrapper,
.wc-block-components-filter-reset-button,
.wc-block-components-filter-submit-button {
@include placeholder();
box-shadow: none;
.wc-block-components-price-slider__amount {
display: none;
&.is-disabled:not(.is-loading) {
.wc-block-components-price-slider__amount,
.wc-block-components-price-slider__button {
animation: none;
.wc-block-components-price-slider__range-input-wrapper {
@include reset;
background: $gray-300;
border-radius: 4px;
clear: both;
flex-grow: 1;
height: 4px;
margin: 15px 0;
position: relative;
.wc-block-components-price-slider__range-input-progress {
left: 0;
position: absolute;
top: 0;
width: 100%;
--track-background: linear-gradient(to right, transparent var(--low), var(--range-color) 0, var(--range-color) var(--high), transparent 0) no-repeat 0 100% / 100% 100%;
--range-color: #{$gray-900};
/*rtl:ignore*/
background: var(--track-background);
.wc-block-components-price-slider__controls {
align-items: center;
display: flex;
gap: $gap-smaller;
justify-content: space-between;
margin: $gap-large 0;
border-width: 1px;
width: auto;
max-width: 100px;
min-width: 0;
padding: $gap-smaller;
.wc-block-components-price-slider__range-text {
.wc-block-components-price-slider__actions {
gap: $gap;
justify-content: flex-end;
margin-left: 0;
.wc-block-components-price-slider__range-input {
height: 0;
display: block;
pointer-events: none;
outline: none !important;
&::-webkit-slider-runnable-track {
@include track;
&::-webkit-slider-thumb {
@include thumb;
margin: -5px 0 0 0;
&::-webkit-slider-progress {
&::-moz-focus-outer {
border: 0;
&::-moz-range-track {
&::-moz-range-progress {
&::-moz-range-thumb {
&::-ms-thumb {
&:focus {
&.wc-block-components-price-slider__range-input--min {
z-index: 21;
margin-left: -2px;
background-position-x: left;
transform: translate(-2px, 2px);
&.wc-block-components-price-slider__range-input--max {
background-position-x: right;
margin-left: 2px;
transform: translate(2px, 2px);
.rtl {
--track-background: linear-gradient(to left, transparent var(--low), var(--range-color) 0, var(--range-color) var(--high), transparent 0) no-repeat 0 100% / 100% 100%;
--range-color: #{$studio-woocommerce-purple-30};
@mixin ie-fixes() {
height: 24px;
background: #{$studio-woocommerce-purple-30};
top: 7px;
&::-ms-track {
/*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
/*leave room for the larger thumb to overflow with a transparent border */
border-color: transparent;
border-width: 7px 0;
/*remove default tick marks*/
color: transparent;
&::-ms-fill-lower {
background: #e1e1e1;
box-shadow: 0 0 0 1px inset #b8b8b8;
&::-ms-fill-upper {
&::-ms-tooltip {
transform: translate(1px, 0);
.wc-block-components-price-slider__range-input--max {
/* IE 11 will not support multi-range slider due to poor pointer-events support on the thumb. Reverts to 2 sliders. */
@include ie11() {
@include ie-fixes();
// Targets Edge <= 18.
@supports (-ms-ime-align:auto) {
.theme-twentytwentyone {
$border-width: 3px;
border: $border-width solid currentColor;
box-sizing: border-box;
--range-color: currentColor;
margin: -$border-width;
.wc-block-price-filter__range-input {
width: calc(100% + #{$border-width * 2});
&:hover,
filter: none;
margin-top: -9px;
&.wc-block-components-price-slider__range-input--max::-moz-range-thumb {
transform: translate(2px, 1px);
&.wc-block-components-price-slider__range-input--min::-moz-range-thumb {
transform: translate(-2px, 1px);
border-color: transparent !important;
height: auto;
height: 50px;
height: 100%;