bootstrap
bootstrap copied to clipboard
Update offcanvas.md To Mention Adding data-bs-target for Close Buttons in Offcanvas Components
Description
Added a note in the Responsive section to indicate that "Close" buttons in responsive offcanvas components must have a data-bs-target attribute to function.
Motivation & Context
It is unclear that data-bs-target is required for the close button in responsive offcanvas components. I was only able to realize this by finding an open issue from 2022.
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) - [x] My change introduces changes to the documentation
- [x] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [x] All new and existing tests passed
Live previews
Related issues
#36962
I edited and reorganized the content there. Thanks!