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
  • !2907

Restrict collapsed items in Navbar to only those in .nav-collapse, and buttons in Navbar.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/tierra/2.0.3-wip-nav-collapse into 2.0.3-wip Apr 02, 2012
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 7

Created by: tierra

Also fix styles for buttons in the Navbar for proper spacing and alignment along with their Navbar-specific dropdown styles.

This is completed work based on issue #2895. There are two distinct parts to this pull request.

First, nav items in the Navbar are now specifically scoped so that only items contained in .nav-collapse are actually collapsed in < 980px screens rather than all nav items (including all dropdown types). This change was required to implement the second part of this feature.

The second part adds appropriate Navbar-specific styles to buttons (including dropdown buttons) so that they can be used in the Navbar. There is one caveat to this feature though.

  • Unfortunately anchor buttons could not be supported (only input.btn, button.btn and .btn-group is supported). The Navbar contains numerous customized anchor styles that override the base button styles effectively killing anchor buttons in the Navbar. Hopefully someone else can figure out a clean fix for this in the future.

I have modified the fluid.html example to use a button dropdown in place of the navbar-text to illustrate a useful account dropdown that remains shown in responsive designs even on mobile screens.

For whoever is reviewing these changes, I should also explain that the extra li.dropdown scope added to dropdown styles were only to styles meant specifically for .nav dropdowns, but not button dropdowns (mostly dealing with the appearance of the caret). The added scope makes it possible to add button dropdowns either outside or inside of a .nav item without any issues or differences, which might be desired depending on the Navbar layout.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/tierra/2.0.3-wip-nav-collapse