Skip to content
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

Update offcanvas.md To Mention Adding data-bs-target for Close Buttons in Offcanvas Components #41325

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ASchoe311
Copy link

@ASchoe311 ASchoe311 commented Mar 25, 2025

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)
  • 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

#36962

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.
Added a line break for better visual clarity and improved wording
@mdo
Copy link
Member

mdo commented Apr 3, 2025

I edited and reorganized the content there. Thanks!

Copy link

@python150153 python150153 left a comment

Choose a reason for hiding this comment

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

Uwu

@julien-deramond julien-deramond requested review from mdo and julien-deramond and removed request for mdo April 7, 2025 19:12
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.

Thanks for the PR @ASchoe311 and @mdo for the edit 👌
LGTM! It sounds clearer for the users :)

Just added a comment for you Mark related to a typo.

@@ -163,7 +163,16 @@ Change the appearance of offcanvases with utilities to better match them to diff

{{< added-in "5.2.0" >}}

Responsive offcanvas classes hide content outside the viewport from a specified breakpoint and down. Above that breakpoint, the contents within will behave as usual. For example, `.offcanvas-lg` hides content in an offcanvas below the `lg` breakpoint, but shows the content above the `lg` breakpoint.
Responsive offcanvas classes hide content outside the viewport from a specified breakpoint and down. Above that breakpoint, the contents within will behave as usual. For example, `.offcanvas-lg` hides content in an offcanvas below the `lg` breakpoint, but shows the content above the `lg` breakpoint. Responsive offcanvas classes are available across for each breakpoint.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Responsive offcanvas classes hide content outside the viewport from a specified breakpoint and down. Above that breakpoint, the contents within will behave as usual. For example, `.offcanvas-lg` hides content in an offcanvas below the `lg` breakpoint, but shows the content above the `lg` breakpoint. Responsive offcanvas classes are available across for each breakpoint.
Responsive offcanvas classes hide content outside the viewport from a specified breakpoint and down. Above that breakpoint, the contents within will behave as usual. For example, `.offcanvas-lg` hides content in an offcanvas below the `lg` breakpoint, but shows the content above the `lg` breakpoint. Responsive offcanvas classes are available for each breakpoint.

or "across all breakpoints" 🤷

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.

4 participants