2019-11-01 13:56:14 +00:00
|
|
|
/* stylelint-disable */
|
|
|
|
@mixin thumb {
|
|
|
|
background-color: transparent;
|
|
|
|
background-position: 0 0;
|
2022-08-16 17:58:55 +00:00
|
|
|
box-sizing: content-box;
|
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
|
|
|
border: 2px solid $gray-900;
|
|
|
|
border-radius: 100%;
|
2019-11-01 13:56:14 +00:00
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
vertical-align: top;
|
|
|
|
cursor: pointer;
|
|
|
|
z-index: 20;
|
|
|
|
pointer-events: auto;
|
2022-08-16 17:58:55 +00:00
|
|
|
background: $white;
|
2019-11-01 13:56:14 +00:00
|
|
|
transition: transform .2s ease-in-out;
|
|
|
|
-webkit-appearance: none;
|
|
|
|
-moz-appearance: none;
|
|
|
|
appearance: none;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
@include thumbFocus;
|
|
|
|
}
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2019-11-01 13:56:14 +00:00
|
|
|
@mixin thumbFocus {
|
2022-08-16 17:58:55 +00:00
|
|
|
background: $gray-900;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2019-11-01 13:56:14 +00:00
|
|
|
/* stylelint-enable */
|
|
|
|
@mixin track {
|
|
|
|
cursor: default;
|
|
|
|
height: 1px; /* Required for Samsung internet based browsers */
|
|
|
|
outline: 0;
|
|
|
|
-webkit-appearance: none;
|
|
|
|
-moz-appearance: none;
|
|
|
|
appearance: none;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2019-11-01 13:56:14 +00:00
|
|
|
@mixin reset {
|
|
|
|
margin: 0;
|
2021-11-05 14:29:30 +00:00
|
|
|
/* 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;
|
2019-11-01 13:56:14 +00:00
|
|
|
outline: none;
|
|
|
|
background: transparent;
|
|
|
|
-webkit-appearance: none;
|
|
|
|
-moz-appearance: none;
|
|
|
|
appearance: none;
|
|
|
|
}
|
|
|
|
|
2020-06-17 09:53:42 +00:00
|
|
|
.wc-block-components-price-slider {
|
2019-12-03 13:39:11 +00:00
|
|
|
margin-bottom: $gap-large;
|
|
|
|
|
2022-03-22 22:38:53 +00:00
|
|
|
&.is-loading.is-disabled {
|
2020-10-22 10:40:32 +00:00
|
|
|
.wc-block-components-price-slider__range-input-wrapper,
|
2022-08-16 17:58:55 +00:00
|
|
|
.wc-block-components-filter-reset-button,
|
|
|
|
.wc-block-components-filter-submit-button {
|
2020-10-22 10:40:32 +00:00
|
|
|
@include placeholder();
|
|
|
|
box-shadow: none;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2022-08-16 17:58:55 +00:00
|
|
|
|
|
|
|
.wc-block-components-price-slider__amount {
|
|
|
|
display: none;
|
|
|
|
}
|
2020-10-22 10:40:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.is-disabled:not(.is-loading) {
|
|
|
|
.wc-block-components-price-slider__range-input-wrapper,
|
|
|
|
.wc-block-components-price-slider__amount,
|
|
|
|
.wc-block-components-price-slider__button {
|
|
|
|
animation: none;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2020-10-22 10:40:32 +00:00
|
|
|
}
|
|
|
|
}
|
2019-11-01 13:56:14 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
.wc-block-components-price-slider__range-input-wrapper {
|
|
|
|
@include reset;
|
2022-08-16 17:58:55 +00:00
|
|
|
background: $gray-300;
|
|
|
|
border-radius: 4px;
|
2020-10-22 10:40:32 +00:00
|
|
|
clear: both;
|
2022-08-16 17:58:55 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
height: 4px;
|
2020-10-22 10:40:32 +00:00
|
|
|
margin: 15px 0;
|
2022-08-16 17:58:55 +00:00
|
|
|
position: relative;
|
2022-09-02 13:52:52 +00:00
|
|
|
|
|
|
|
&.is-loading {
|
|
|
|
@include placeholder();
|
|
|
|
height: em(9px);
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
2020-10-22 10:40:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-price-slider__range-input-progress {
|
2022-08-16 17:58:55 +00:00
|
|
|
height: 4px;
|
2020-10-22 10:40:32 +00:00
|
|
|
left: 0;
|
2022-08-16 17:58:55 +00:00
|
|
|
position: absolute;
|
2020-10-22 10:40:32 +00:00
|
|
|
top: 0;
|
2022-08-16 17:58:55 +00:00
|
|
|
width: 100%;
|
2020-10-22 10:40:32 +00:00
|
|
|
--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%;
|
2022-08-16 17:58:55 +00:00
|
|
|
--range-color: #{$gray-900};
|
2020-10-22 10:40:32 +00:00
|
|
|
/*rtl:ignore*/
|
|
|
|
background: var(--track-background);
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-price-slider__controls {
|
2022-08-16 17:58:55 +00:00
|
|
|
align-items: center;
|
2020-10-22 10:40:32 +00:00
|
|
|
display: flex;
|
2022-08-16 17:58:55 +00:00
|
|
|
gap: $gap-smaller;
|
|
|
|
justify-content: space-between;
|
2022-08-23 10:38:39 +00:00
|
|
|
margin: $gap 0;
|
2020-10-22 10:40:32 +00:00
|
|
|
|
|
|
|
.wc-block-components-price-slider__amount {
|
|
|
|
margin: 0;
|
|
|
|
border-radius: 4px;
|
2022-08-16 17:58:55 +00:00
|
|
|
border-width: 1px;
|
2020-10-22 10:40:32 +00:00
|
|
|
width: auto;
|
2022-08-23 10:38:39 +00:00
|
|
|
max-width: 80px;
|
2020-10-22 10:40:32 +00:00
|
|
|
min-width: 0;
|
2022-08-16 17:58:55 +00:00
|
|
|
padding: $gap-smaller;
|
2022-08-24 09:10:21 +00:00
|
|
|
|
|
|
|
.wc-block-components-price-slider--is-input-inline & {
|
|
|
|
max-width: 60px;
|
|
|
|
}
|
2022-09-02 13:52:52 +00:00
|
|
|
|
|
|
|
&.is-loading {
|
|
|
|
@include placeholder();
|
|
|
|
border-radius: 0 !important;
|
|
|
|
width: max-content;
|
|
|
|
}
|
2022-08-16 17:58:55 +00:00
|
|
|
}
|
|
|
|
}
|
2020-10-22 10:40:32 +00:00
|
|
|
|
2022-08-16 17:58:55 +00:00
|
|
|
.wc-block-components-price-slider__range-text {
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
margin: $gap-large 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-price-slider__actions {
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
gap: $gap;
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
2022-08-19 08:04:04 +00:00
|
|
|
// The specificity here is needed to overwrite the margin-top that is inherited on WC block template pages such as Shop.
|
|
|
|
button[type="submit"]:not(.wp-block-search__button).wc-block-components-filter-submit-button {
|
|
|
|
margin-top: 0;
|
2022-08-16 17:58:55 +00:00
|
|
|
margin-left: 0;
|
2020-10-22 10:40:32 +00:00
|
|
|
}
|
|
|
|
}
|
2022-08-16 17:58:55 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
.wc-block-components-price-slider__range-input {
|
|
|
|
@include reset;
|
|
|
|
width: 100%;
|
|
|
|
height: 0;
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
pointer-events: none;
|
|
|
|
outline: none !important;
|
2020-11-23 16:30:27 +00:00
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
2020-10-22 10:40:32 +00:00
|
|
|
|
|
|
|
&::-webkit-slider-runnable-track {
|
|
|
|
@include track;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-webkit-slider-thumb {
|
|
|
|
@include thumb;
|
2022-08-16 17:58:55 +00:00
|
|
|
margin: -5px 0 0 0;
|
2020-10-22 10:40:32 +00:00
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-webkit-slider-progress {
|
|
|
|
@include reset;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-moz-focus-outer {
|
|
|
|
border: 0;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-moz-range-track {
|
|
|
|
@include track;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-moz-range-progress {
|
|
|
|
@include reset;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-moz-range-thumb {
|
|
|
|
@include thumb;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-ms-thumb {
|
|
|
|
@include thumb;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
&::-webkit-slider-thumb {
|
|
|
|
@include thumbFocus;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2019-11-01 13:56:14 +00:00
|
|
|
&::-moz-range-thumb {
|
2020-10-22 10:40:32 +00:00
|
|
|
@include thumbFocus;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2019-11-01 13:56:14 +00:00
|
|
|
&::-ms-thumb {
|
2020-10-22 10:40:32 +00:00
|
|
|
@include thumbFocus;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2020-10-22 10:40:32 +00:00
|
|
|
}
|
2019-11-01 13:56:14 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&.wc-block-components-price-slider__range-input--min {
|
|
|
|
z-index: 21;
|
2019-11-01 13:56:14 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-webkit-slider-thumb {
|
|
|
|
margin-left: -2px;
|
|
|
|
background-position-x: left;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-moz-range-thumb {
|
|
|
|
background-position-x: left;
|
2022-08-16 17:58:55 +00:00
|
|
|
transform: translate(-2px, 2px);
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-ms-thumb {
|
|
|
|
background-position-x: left;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
|
|
|
}
|
2019-11-11 11:05:18 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&.wc-block-components-price-slider__range-input--max {
|
|
|
|
z-index: 20;
|
|
|
|
|
|
|
|
&::-webkit-slider-thumb {
|
|
|
|
background-position-x: right;
|
|
|
|
margin-left: 2px;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-moz-range-thumb {
|
|
|
|
background-position-x: right;
|
2022-08-16 17:58:55 +00:00
|
|
|
transform: translate(2px, 2px);
|
2020-10-22 10:40:32 +00:00
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-ms-thumb {
|
|
|
|
background-position-x: right;
|
2019-11-11 11:05:18 +00:00
|
|
|
}
|
|
|
|
}
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
|
|
|
|
2020-01-27 15:16:19 +00:00
|
|
|
.rtl {
|
2020-10-22 10:40:32 +00:00
|
|
|
.wc-block-components-price-slider__range-input-progress {
|
2020-01-27 15:16:19 +00:00
|
|
|
--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%;
|
2020-10-22 10:40:32 +00:00
|
|
|
--range-color: #{$studio-woocommerce-purple-30};
|
2020-01-27 15:16:19 +00:00
|
|
|
background: var(--track-background);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-01 08:04:52 +00:00
|
|
|
@mixin ie-fixes() {
|
2020-10-22 10:40:32 +00:00
|
|
|
.wc-block-components-price-slider__range-input-wrapper {
|
|
|
|
background: transparent;
|
|
|
|
box-shadow: none;
|
|
|
|
height: 24px;
|
|
|
|
}
|
|
|
|
.wc-block-components-price-slider__range-input-progress {
|
|
|
|
background: #{$studio-woocommerce-purple-30};
|
|
|
|
width: 100%;
|
|
|
|
top: 7px;
|
|
|
|
}
|
|
|
|
.wc-block-components-price-slider__range-input {
|
|
|
|
height: 24px;
|
|
|
|
pointer-events: auto;
|
|
|
|
|
|
|
|
&::-ms-track {
|
|
|
|
/*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
|
2019-11-01 13:56:14 +00:00
|
|
|
background: transparent;
|
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
/*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;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-ms-fill-lower {
|
|
|
|
background: #e1e1e1;
|
|
|
|
box-shadow: 0 0 0 1px inset #b8b8b8;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-ms-fill-upper {
|
|
|
|
background: transparent;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-ms-tooltip {
|
|
|
|
display: none;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-ms-thumb {
|
|
|
|
transform: translate(1px, 0);
|
2019-11-01 13:56:14 +00:00
|
|
|
pointer-events: auto;
|
|
|
|
}
|
2020-10-22 10:40:32 +00:00
|
|
|
}
|
|
|
|
.wc-block-components-price-slider__range-input--max {
|
|
|
|
&::-ms-fill-upper {
|
|
|
|
background: #e1e1e1;
|
|
|
|
box-shadow: 0 0 0 1px inset #b8b8b8;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-10-22 10:40:32 +00:00
|
|
|
&::-ms-fill-lower {
|
|
|
|
background: transparent;
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2020-10-22 10:40:32 +00:00
|
|
|
}
|
2019-11-01 13:56:14 +00:00
|
|
|
|
2020-12-01 08:04:52 +00:00
|
|
|
.wc-block-components-price-slider {
|
2022-03-22 22:38:53 +00:00
|
|
|
&.is-loading.is-disabled {
|
2020-12-01 08:04:52 +00:00
|
|
|
.wc-block-components-price-slider__range-input-wrapper {
|
|
|
|
@include placeholder();
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2019-11-11 11:05:18 +00:00
|
|
|
|
2020-12-01 08:04:52 +00:00
|
|
|
&.is-disabled:not(.is-loading) {
|
|
|
|
.wc-block-components-price-slider__range-input-wrapper {
|
|
|
|
animation: none;
|
|
|
|
}
|
2019-11-11 11:05:18 +00:00
|
|
|
}
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* IE 11 will not support multi-range slider due to poor pointer-events support on the thumb. Reverts to 2 sliders. */
|
2020-12-01 08:04:52 +00:00
|
|
|
@include ie11() {
|
|
|
|
@include ie-fixes();
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2020-12-01 08:04:52 +00:00
|
|
|
|
|
|
|
// Targets Edge <= 18.
|
2019-11-01 13:56:14 +00:00
|
|
|
@supports (-ms-ime-align:auto) {
|
2020-12-01 08:04:52 +00:00
|
|
|
@include ie-fixes();
|
2019-11-01 13:56:14 +00:00
|
|
|
}
|
2020-11-23 16:30:27 +00:00
|
|
|
|
|
|
|
.theme-twentytwentyone {
|
|
|
|
$border-width: 3px;
|
|
|
|
|
|
|
|
.wc-block-components-price-slider__range-input-wrapper {
|
|
|
|
background: transparent;
|
|
|
|
border: $border-width solid currentColor;
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-price-slider__range-input-progress {
|
|
|
|
--range-color: currentColor;
|
|
|
|
margin: -$border-width;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-price-filter__range-input {
|
|
|
|
background: transparent;
|
|
|
|
margin: -$border-width;
|
|
|
|
width: calc(100% + #{$border-width * 2});
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
&::-webkit-slider-thumb {
|
|
|
|
filter: none;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-11-23 16:30:27 +00:00
|
|
|
&::-moz-range-thumb {
|
|
|
|
filter: none;
|
|
|
|
}
|
2022-09-09 11:28:04 +00:00
|
|
|
|
2020-11-23 16:30:27 +00:00
|
|
|
&::-ms-thumb {
|
|
|
|
filter: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-webkit-slider-thumb {
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-ms-track {
|
|
|
|
border-color: transparent !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-01 08:04:52 +00:00
|
|
|
@include ie11() {
|
2020-11-23 16:30:27 +00:00
|
|
|
.wc-block-components-price-slider__range-input-wrapper {
|
|
|
|
border: 0;
|
|
|
|
height: auto;
|
|
|
|
position: relative;
|
|
|
|
height: 50px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-price-slider__range-input-progress {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-price-filter__range-input {
|
|
|
|
height: 100%;
|
|
|
|
margin: 0;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|