You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@max-messmer reported in the update on RHDC from previous version of RHDS to 2.1.0 that rh-card appeared to have a smaller margin.
I believe the problem lies in at point we switched from @media queries to @container queries but didn't take into account that the swap wasn't as simple as a 1:1. The spacing guide (although itself having problems) shows a desktop size and a mobile size, the former with a margin-inline: 32px and later margin-inline: 24px. This break originally happened at a media query of 768px. However given a direct swap to @container this break point wouldn't be hit unless the card itself was that wide. Given the documentation my assumption is the correct fix for this would be to reduce the container query to:
We should confirm with @coreyvickery or @marionnegp what the correct behaviour should be, emphasizing the switch from "mobile vs desktop" to container size
@bennypowers@zeroedin, is there a reason it's better to do container queries than media queries for card? Switching to container queries kind of messes with stuff like tile too, which should have similar spacing to card.
@max-messmer reported in the update on RHDC from previous version of RHDS to 2.1.0 that
rh-card
appeared to have a smaller margin.I believe the problem lies in at point we switched from
@media
queries to@container
queries but didn't take into account that the swap wasn't as simple as a1:1
. The spacing guide (although itself having problems) shows a desktop size and a mobile size, the former with amargin-inline: 32px
and latermargin-inline: 24px
. This break originally happened at a media query of 768px. However given a direct swap to @container this break point wouldn't be hit unless the card itself was that wide. Given the documentation my assumption is the correct fix for this would be to reduce the container query to:If the card then is less than 320px wide the
margin-inline
would reduce.I created this codepen to demonstrate the issue
Thanks @max-messmer for reporting this issue.
The text was updated successfully, but these errors were encountered: