Skip to content

Fix - Filter by Price block slider doesn't use theme accent color in LTR language #2186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

amitraj2203
Copy link
Contributor

Fixes #2185

This PR fixes an inconsistency in how the Filter by Price block's slider color is applied in the Storefront theme. Currently, the slider correctly uses the theme's accent color in RTL mode but fails to apply it in LTR mode, resulting in an inconsistent user experience when switching between languages.

The solution increases the CSS selector specificity by adding the tag name div to the selector, ensuring the accent color is properly applied in both LTR and RTL modes. This fix maintains the existing behavior for RTL languages while correcting it for LTR languages.

Screenshots

Before After
before-storefront-filter-by-price after-storefront-filter-by-price

How to test the changes in this Pull Request:

  1. Set up Storefront theme with a custom accent color in Customizer (e.g., green or red)
  2. Create a page with the Filter by Price and Product Collection blocks
  3. Verify the slider color matches the accent color in LTR mode
  4. Switch to an RTL language and verify the slider color still matches the accent color

Changelog

Fix – Filter by Price slider now consistently uses the theme's accent color in both LTR and RTL languages.

@amitraj2203 amitraj2203 marked this pull request as draft May 5, 2025 08:58
Copy link
Contributor

@Aljullu Aljullu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, @amitraj2203! I see the PR is instead in Draft, but I tested it and it looks as expected on my end:

Before After
imatge imatge

Are there any other changes you would like to do or we can go ahead and merge? 🙂

Testing environment
  • WordPress 6.8 local dev environment
  • Plugins: WooCommerce Beta Tester
  • Theme: Storefront
  • Store creation: April 24th 2025
  • Store size: small

@amitraj2203 amitraj2203 marked this pull request as ready for review May 5, 2025 11:40
@amitraj2203
Copy link
Contributor Author

@Aljullu Thanks for the review! I’ve just marked the PR as ready for review 🙂

@Aljullu
Copy link
Contributor

Aljullu commented May 6, 2025

Thanks! Great job, @amitraj2203! 🙌

@Aljullu Aljullu merged commit 400457b into woocommerce:trunk May 6, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter by Price slider doesn't use theme accent color in LTR language
2 participants