-
Notifications
You must be signed in to change notification settings - Fork 156
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(card-group): support RTL borders & padding #11760
fix(card-group): support RTL borders & padding #11760
Conversation
Deploy preview created for package Built with commit: 9d3eb1e46fc1cd5263a05d6137171a81c3c4cb7b |
Deploy preview created for package Built with commit: 9d3eb1e46fc1cd5263a05d6137171a81c3c4cb7b |
Deploy preview created for package Built with commit: 9d3eb1e46fc1cd5263a05d6137171a81c3c4cb7b |
Deploy preview created for package Built with commit: 9d3eb1e46fc1cd5263a05d6137171a81c3c4cb7b |
Deploy preview created for package Built with commit: 9d3eb1e46fc1cd5263a05d6137171a81c3c4cb7b |
Deploy preview created for package Built with commit: 9d3eb1e46fc1cd5263a05d6137171a81c3c4cb7b |
Deploy preview created for package Built with commit: 9d3eb1e46fc1cd5263a05d6137171a81c3c4cb7b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Nice work.
The text looks great! The only thing that looks off is the arrow icons.
|
@oliviaflory Good catch! This got merged before I could address it, but that's okay. Matt has fixed the arrow direction problem in #11748, which should be merged soon. I believe that only leaves the extra spacing to the right to fix. I'll open up an issue for it. Thanks for taking a look at this one! |
Created #11762 for the spacing issue. |
Related Ticket(s)
Closes #11755
Description
We programmatically set borders & padding for cards within
<dds-card-group>
elements, and we've only been accounting for LTR writing directions. This PR uses logical properties so these borders and paddings look correct in RTL documents.While working on this I noticed an issue where certain tracked elements could be undefined, causing an error that halts execution. Ultimately this resulted in the "empty" elements we generate for certain card groups to fail to be created, and the dark gray background appearing when it shouldn't. I fixed this with simple optional accessors.
Testing
Verify the borders and gaps between Cards appear correctly in the Card Group story in the RTL deploy preview. Compare to the Card Group in the default deploy preview if necessary.
Specifically check that no background is visible in the last row's empty space when using the "Outlined cards (1px border)" Grid mode option.
Changelog
Changed
<dds-card-group>
children will receive correct border & padding values in RTL writing mode documents.