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
  • Issues
  • #13757
Closed
Open
Issue created Jun 08, 2014 by Administrator@rootContributor

.collapse.width ...?

Created by: fletch3555

First off, I'm new here, so please accept my apologies if I do anything against the grain.

There doesn't seem to be any documentation for this, but looking through the code, I see that the Collapse plugin has a check for a width class. This seems to hint at the ability to change the orientation of the collapse from vertical to horizontal, which is what I'm trying to do with a side-in navbar. Is this assumption correct? I've found posts around the web that seem to agree with me and provide hints at how to make it work, which I've followed.

Beyond the above question, I've run into an issue with this where padding is taken into account for the width(yes, I know box-sizing: border-box is used everywhere), and that's causing the transition to jump at the end. Here's a JSFiddle demonstrating it; http://jsfiddle.net/w6CEc/1/. In short, the sidebar will overshoot it's target when expanding. After lots of messing with this, I believe it's because of the padding and how the width is calculated(set it to 0 with 15px padding on each side, and it'll try to calculate the content width as -30px which would be truncated to 0 and leave the padding visible.

I have a possible fix for this, but I wanted to see if anyone else has run into this issue or thought about a fix. I believe the issue is how jquery handles the border-box calculation when using $.width(). If you use $.css('width'), it doesn't seem to exhibit the same behavior. Thoughts?

Thanks!

Assignee
Assign to
Time tracking