Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mscdex
Copy link
Contributor

@mscdex mscdex commented Mar 14, 2025

Description

This fixes an issue where borders are not rounded for cards nested within a card in a card group.

Motivation & Context

This fixes an issue where borders are not rounded for cards nested within a card in a card group.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues


I have no idea if this would be considered a breaking change or not. Personally I can't imagine someone relying on the previous greedy selector behavior, but anything is possible I suppose.

@mscdex mscdex requested a review from a team as a code owner March 14, 2025 18:50
@mdo
Copy link
Member

mdo commented Apr 6, 2025

What does this fix, is there a demo of a bug or an associated issue?

@mscdex
Copy link
Contributor Author

mscdex commented Apr 6, 2025

Here's a demo: https://jsfiddle.net/1r7mjdzb/1/

If you look at the "Nested Card 1" header, the upper-right border is not rounded as expected. Similarly, if you look at the "Nested Card 2" header, the upper-left border is not rounded as expected.

It's the same deal for the respective footers but the lower-right and lower-left borders respectively.

@mdo mdo added the v5 label Apr 7, 2025
@mdo mdo added this to v5.3.6 Apr 7, 2025
@github-project-automation github-project-automation bot moved this to To do in v5.3.6 Apr 7, 2025
@mdo
Copy link
Member

mdo commented Apr 7, 2025

Thanks! Yeah I don't think I anticipated folks nesting cards like this, but I should always expect the unexpected with Bootstrap at this point lol. That makes sense and hopefully won't be a huge issue for others.\

/cc @julien-deramond for thoughts

Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

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

/cc @julien-deramond for thoughts

I've experimented with various card combinations from our documentation, mirroring the approach used in the JSFiddle, and haven't encountered any similar problems nor observed any regressions.

I have no idea if this would be considered a breaking change or not. Personally I can't imagine someone relying on the previous greedy selector behavior, but anything is possible I suppose.

It's always tricky to determine what constitutes a breaking change. We're trying to assess how many users might be affected to decide whether it should be included as a patch, minor, or major release. In this case, as you mentioned, I can't imagine anyone relying on the previous selector behavior. Therefore, I'd vote for a simple patch that could be incorporated into v5.3.6.

@julien-deramond julien-deramond moved this from To do to Review in progress in v5.3.6 Apr 7, 2025
@julien-deramond julien-deramond requested a review from mdo April 7, 2025 20:15
@mdo mdo changed the title Fix rounded borders for nested cards within card in card-group Limit selectors in .card-group to immediate children to fix border-radius bug Apr 9, 2025
@julien-deramond julien-deramond moved this from Review in progress to Ready to merge in v5.3.6 Apr 9, 2025
@julien-deramond julien-deramond merged commit c9cb0d6 into twbs:main Apr 9, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in v5.3.6 Apr 9, 2025
@mscdex mscdex deleted the fix-card-group-nested-cards-borders branch April 9, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants