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

Dropdown menu alignment fixes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mark Otto requested to merge dropdown-alignment-fixes into main Feb 05, 2021
  • Overview 15
  • Commits 3
  • Pipelines 0
  • Changes 5

This does a couple things in an attempt to resolve, at least temporarily, our dropdown menu alignment issues.

  1. Removes the &[style] { ... } override @MartijnCuppens added. This alone resolves #32484 (closed), but this caused other issues with the menu alignment classes on static dropdowns.

  2. So, to fix that, now the menu alignment classes .dropdown-menu-start and .dropdown-menu-end are positioned via Popper and use the --bs-position CSS variable. I've removed the left and right properties for those.

  3. And, in combination, I've scoped those left and right properties to instances of the -start and -end classes that are used with data-bs-display="static". It's not the best, but it resolves the alignment near as I can tell for all dropdown menus, static or otherwise.

In the docs, I've added a temporary set of all the dropdown alignment options at the top of the page so I can quickly check things. I'll migrate this to the cheatsheet pages I think before merging, but didn't want to do that until getting some eyes on this.

Whatcha think—good enough for solving our woes ahead of Beta 2?

/cc @ffoodd @XhmikosR

TODO:

  • clean up squash any patches manually
  • needs tests
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: dropdown-alignment-fixes