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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Card and LegacyCard mobile styles #11926

Closed
wants to merge 1 commit into from
Closed

Conversation

lgriffee
Copy link
Member

@lgriffee lgriffee commented Apr 22, 2024

WHY are these changes introduced?

Closes https://github.com/Shopify/polaris-internal/issues/1559
Closes https://github.com/Shopify/mobile/issues/33783

WHAT is this pull request doing?

Removes Card and LegacyCard default bevel styles below the sm breakpoint. Essentially if card corners aren鈥檛 rounded then shadow styles are removed as well.

Currently the Card component toggles border-radius at certain breakpoints with the roundedAbove prop (and defaults to the sm breakpoint). This PR also adds box-shadow to these toggled styles.

Before (below sm breakpoint) After (below sm breakpoint)
Screenshot 2024-04-22 at 11 28 51鈥疉M Screenshot 2024-04-22 at 11 28 01鈥疉M

How to 馃帺

@lgriffee lgriffee added the #gsd:40396 WebView infrastructure - Forms and Polaris label Apr 22, 2024
@lgriffee lgriffee self-assigned this Apr 22, 2024
@lgriffee
Copy link
Member Author

@heyjoethomas Just wanted to double check from a design standpoint that we always want to remove shadow styles when Card corners aren鈥檛 rounded? Otherwise, I can make toggling border-radius and box-shadow independent of one another.

@lgriffee lgriffee force-pushed the card-mobile-alignment branch 2 times, most recently from 288afa0 to 5410382 Compare April 22, 2024 17:45
@heyjoethomas
Copy link
Contributor

@heyjoethomas Just wanted to double check from a design standpoint that we always want to remove shadow styles when Card corners aren鈥檛 rounded? Otherwise, I can make toggling border-radius and box-shadow independent of one another.

Correct. Card should go full width and have no border radius or shadow.

Copy link
Member

@sam-b-rose sam-b-rose left a comment

Choose a reason for hiding this comment

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

Looks good! Simple and effective change 馃挴

@ssetem
Copy link
Contributor

ssetem commented Apr 23, 2024

Looks good 馃憤

Would LegacyCard be updated in a separate PR?

@lgriffee lgriffee changed the title [Prototype] Update Card mobile styles [Prototype] Update Card and LegacyCard mobile styles Apr 23, 2024
@lgriffee
Copy link
Member Author

Would LegacyCard be updated in a separate PR?

@ssetem Ah just an oversight on my part! Thanks for the reminder, I've included those changes in 41e2eb1

@lgriffee lgriffee changed the title [Prototype] Update Card and LegacyCard mobile styles Update Card and LegacyCard mobile styles May 6, 2024
@lgriffee lgriffee requested a review from aveline May 6, 2024 21:09
@lgriffee lgriffee marked this pull request as ready for review May 6, 2024 21:09
@lgriffee lgriffee closed this May 9, 2024
@lgriffee
Copy link
Member Author

lgriffee commented May 9, 2024

Closing in favor of build phase PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#gsd:40396 WebView infrastructure - Forms and Polaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Card][LegacyCard] Box shadow incorrectly visible on sm breakpoint
5 participants