-
Notifications
You must be signed in to change notification settings - Fork 158
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): added text wrapping to cta text #7451
fix(card): added text wrapping to cta text #7451
Conversation
Deploy preview created for package Built with commit: 15d0a5255d92cad2966d09fef91ae9a6da92e0af |
Deploy preview created for package Built with commit: 15d0a5255d92cad2966d09fef91ae9a6da92e0af |
Deploy preview created for package Built with commit: 15d0a5255d92cad2966d09fef91ae9a6da92e0af |
Deploy preview created for package Built with commit: 15d0a5255d92cad2966d09fef91ae9a6da92e0af |
Deploy preview created for package Built with commit: 15d0a5255d92cad2966d09fef91ae9a6da92e0af |
Deploy preview created for package Built with commit: 15d0a5255d92cad2966d09fef91ae9a6da92e0af |
Deploy preview created for package Built with commit: 15d0a5255d92cad2966d09fef91ae9a6da92e0af |
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.
we should be able to continue using flexbox to resolve the root issue so changing the footer container to a block element may not be needed at all!
@@ -127,9 +127,7 @@ class DDSCardGroup extends StableSelectorMixin(LitElement) { | |||
const { customPropertyCardsPerRow } = this.constructor as typeof DDSCardGroup; |
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.
are these changes intentional or are they carried over from a separate branch maybe?
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.
I believe this was carried over since I didn't touch this file.
display: block; | ||
|
||
svg, | ||
::slotted(svg[slot='icon']) { | ||
display: block; | ||
display: inline; | ||
transform: translate(-4px, 6px); | ||
} |
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.
instead of changing the display rule from flex to block I think we can just set a flex-shrink: 1
on bx--card__cta__copy
to resolve the original issue
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.
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.
oh I see, would we be able to use the iconInline
property that is on link-with-icon
? #6812
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.
Thanks for showing me this PR. I applied a similar solution as is on link-with-icon
, had to add a selector to the style sheet in order to get the card-footer
, but it should be working fine now. Also reverted the previews changes to the CSS.
@BrunnoM7 can you provide more details in your PR review description on what this is trying to solve, and what has changed? Link(s) would also help as far as what storybook links the reviewers should be looking at. |
Hey @shixiedesign, thanks for the review. I just added the right padding to the CTA text. It should be working fine now. |
Trying to review this, but need to update branch to get some updated Percy tests. Will return later today. |
@BrunnoM7 is this fix not working in React? |
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! Thank you
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 to me!
This comment has been minimized.
This comment has been minimized.
DCO Assistant Lite bot All Contributors have signed the CLA. |
Hey @BrunnoM7 , once you sign the DCO this can get merged in. |
I have read the DCO document and I hereby sign the DCO. |
Related Ticket(s)
[Card] CTA text doesn't wrap #6935
Description
Corrects the over extension of the CTA text in the Card by wrapping it.
Changelog
New
iconInline
tocard-footer
componenticonPlacement
is set aright
andiconInline
istrue
text CTA will have the wrap behavior.