Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.51 KB

filter-blocks.md

File metadata and controls

40 lines (26 loc) · 1.51 KB

Filter blocks

Price slider accent color

The Filter by Price block includes a price slider which uses an accent color to show the selected range.

Price filter screenshot

By default, it uses the WooCommerce purple shade, but it can be easily modified by themes with the following code:

.wc-block-components-price-slider__range-input-progress,
.rtl .wc-block-components-price-slider__range-input-progress {
	--range-color: #ee6948;
}

Price filter screenshot with custom styles

Notice the code snippet above uses a CSS custom property, so the default color might still be available in some browsers that don't support it like Internet Explorer 11. If your theme supports IE11, you can add the following lines to target it:

/* Target only IE11 */
@media all and ( -ms-high-contrast: none ), ( -ms-high-contrast: active ) {
	.wc-block-components-price-slider__range-input-progress {
		background: #ee6948;
	}
}

We're hiring! Come work with us!

🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.