woocommerce / storefront

Official theme for WooCommerce
https://wordpress.org/themes/storefront/
972 stars 471 forks source link

Fix: different Add to Cart Button color inside products grid blocks between editor and front end. #2066

Closed dinhtungdu closed 1 year ago

dinhtungdu commented 1 year ago

Fixes #2065

On WP 6.1, the editor style is updated, which breaks the style of the Add to Cart Button inside products grid blocks like All Products or On Sale Products block. This PR fixes that issue by dynamically generating the style for Add to Cart Button using theme modifications.

Screenshots

Before After

How to test the changes in this Pull Request:

  1. Check and build this PR.
  2. Add All Products block to the page.
  3. See the color of add to cart button look as expected.
  4. Save the page, see the style of the button look the same between editor and front end.
  5. Use Customizer to change the text and background color of the button.
  6. See the color apply to both front end and editor.

Changelog

Fix - Ensure the style of the poducts grid Add to Cart button is consistent between the editor and front end.

Fix – Edit, reply and author icons are now displayed in comment list form. #1319