Skip to content

Fix border shortcomings: Add separate border utilities for bb-2, bt-2, by-2,etc (#41371) #41377

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

Closed
wants to merge 3 commits into from

Conversation

Sanchay117
Copy link

@Sanchay117 Sanchay117 commented Apr 15, 2025

Description

This PR adds utility classes for setting individual border widths (top, bottom, left, right, start, end, x, y) using concise class names such as .bt-2, .bb-1, .bs-3, etc. These follow the pattern and spirit of existing spacing utilities (mt-2, mb-4, etc.), but for border thickness.

Motivation & Context

Currently, Bootstrap does not provide utility classes for customizing individual border widths beyond the default border shorthand classes. This makes it inconvenient to adjust specific borders (e.g., only the bottom) with different widths. This PR fixes that gap by allowing consistent and granular border width utilities—similar to how margin/padding work.

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

Fixes #41371

@julien-deramond
Copy link
Member

Thanks for your contribution, @Sanchay117!

However, we haven’t yet discussed or confirmed whether we want to include these new utilities in Bootstrap. As outlined in our contributing guidelines—especially for new features:

Please wait until the issue is marked as ready to be worked on before submitting a PR. We don’t want to waste your time.

Additionally, new utilities should include corresponding documentation.

Given that, I’ll go ahead and close this PR for now. We really appreciate your initiative, and we encourage you to join the discussion on the issue first so we can align before any implementation.

Thanks again!

@Sanchay117
Copy link
Author

Okay, sorry for wasting your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix border shortcomings - separate border-bottom-2 - shorter class names: bb-2, bt-2, by-2
2 participants