woocommerce / storefront

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

category page `add to cart` `view cart` buttons slightly misaligned (Safari) #1332

Open haszari opened 4 years ago

haszari commented 4 years ago

Describe the bug

On product pages, in the related products section, if you add an item to cart, the view cart button is misaligned. May not affect all browsers – I saw this in Safari.

Screen Shot 2020-04-24 at 11 40 42 AM

Isolating the problem (mark completed items with an [x]):

Spotted when testing 2.5.6 RC 1.

To Reproduce

Steps to reproduce the behavior:

  1. Go to a product page.
  2. Scroll down to Related products
  3. Click Add to cart for a related product.
  4. The View cart button is offset vertically by 1-2 pixels.

Screenshots

buttons misaligned

Expected behavior

Neighbouring buttons should always align vertically and look consistent.

Browser Environment

haszari commented 4 years ago

Saw this again when testing 2.5.8 RC 1. Confirmed this affects Safari only and category pages or related products - i.e. not all add-to-cart buttons.

Category page, e.g. product-category/tshirts:

Screen Shot 2020-06-19 at 1 46 12 PM

Also affects my-account orders with more than one button:

Screen Shot 2020-06-19 at 1 19 47 PM

This is a minor visual issue, only affecting Safari - so not an urgent priority to fix.

joashrajin commented 2 years ago

I noticed this too and it seems to be due to the buttons using display: inline-block; image

Quite an odd one since it only affects Safari. To fix it, we could either move the second button up by 1px (which isn't ideal) or consider using something like inline-flex which seems to work much better on all browsers. Unless we are able to fix it another way.