Skip to content
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

Fix for firefox hover/filter side-effect #2274

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

sebastianfdz
Copy link
Contributor

@sebastianfdz sebastianfdz commented Nov 14, 2023

Description

Firefox displays a weird side-effect when hovering and applying filter: brightness(X) (the element being hovered loses its shape). The root cause of this could be many things (there are a lot of classes being applied to paypal-button). We observed that overflow: hidden was having some cascading side-effect on filter: brightness(X). The proposed solution is to explicitly apply overflow: inherit to the hover class. This solution targets the .paypal-button.paypal-button-color-{COLOR}:hover only and thus prevents this to cascade onto any other classes. This fixes the bug in firefox and the behavior remains the same in chrome.

eg: .paypal-button.paypal-button-color-{COLOR}:hover { filter: brightness(X); overflow: inherit; }

Why are we making these changes? Include references to any related Jira tasks or GitHub Issues

Ticket LI-26326 pointed out weird behavior when hovering PayPal button in Firefox.

Reproduction Steps (if applicable)

Go to this codepen (fyi: reproduction is not consistent on all devices)

Screenshots (if applicable)

Unhovered button:
Screenshot 2023-11-14 at 13 14 27

Hovered button:
Screenshot 2023-11-14 at 13 14 33

Dependent Changes (if applicable)

Groups who should review (if applicable)

❤️ Thank you!

@sebastianfdz sebastianfdz requested a review from a team as a code owner November 14, 2023 19:21
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (294709b) 51.18% compared to head (5299b7f) 51.18%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2274   +/-   ##
=======================================
  Coverage   51.18%   51.18%           
=======================================
  Files         104      104           
  Lines        2032     2032           
  Branches      601      601           
=======================================
  Hits         1040     1040           
  Misses        889      889           
  Partials      103      103           
Flag Coverage Δ
jest 31.99% <ø> (ø)
karma 49.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sebastianfdz sebastianfdz merged commit 1174669 into main Nov 15, 2023
3 checks passed
@sebastianfdz sebastianfdz deleted the paypal-button-pill-shape-fix branch November 15, 2023 17:01
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.

3 participants