bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Refactor box-sizing for consistency across elements

Open gitesh9 opened this issue 10 months ago • 1 comments

Description

This PR refactors the box-sizing implementation to provide consistent behavior across all elements. It sets box-sizing: inherit globally for all elements, ensuring that child elements inherit their parent's box-sizing value. Additionally, box-sizing: border-box is applied to the root element, ensuring consistency across the entire document by default.

Motivation & Context

This change addresses the issue described in issue #41213 . The current implementation leads to inconsistent layout behavior when different box-sizing models are used for parent and child elements. By making this adjustment, we ensure that all elements inherit the same box-sizing behavior, improving consistency and maintainability.

Type of changes

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

Checklist

  • [x] I have read the contributing guidelines
  • [x] 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

Related issues

Closes #41213

gitesh9 avatar Feb 23 '25 16:02 gitesh9

Saving this to revisit in v6 if we want it.

mdo avatar Apr 11 '25 04:04 mdo