Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !34273

Offcanvas navbar

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mark Otto requested to merge pr/33537 into main Jun 16, 2021
  • Overview 8
  • Commits 1
  • Pipelines 0
  • Changes 2

This is a replacement for #33537. Fixes #34098 (closed).

The original PR gives us a great starting point, and this PR builds on that by turning the static styles into source Sass that's generated by our breakpoints and is an official component modifier. The way this is built, the new .navbar-offcanvas-* classes depend on .navbar-expand-* classes, so you'll always need a pairing of the two. I think this is okay so as to avoid further duplication.

One thing that I'm unsure about is the .navbar-offcanvas.navbar-expand situation, which basically says "don't ever use an offcanvas. I think we could omit the xs .navbar-offcanvas class entirely, but that might cause issues for others. Until then, it's kind of just useless as this combination will never show a button to open the offcanvas.

/cc @twbs/css-review @craftwerkberlin

Preview: https://deploy-preview-34273--twbs-bootstrap.netlify.app/docs/5.0/components/navbar/#offcanvas

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: pr/33537