css .collapse showing bug for some resolutions
Created by: nereusz
After updating from Bootstrap 3.0 to 3.2 I've noticed problem with navbar when collapsing on smaller devices.
For smaller resolutions than 768px navbar behaviour is ok. But for resolutions between 768px and about 990px (I suppose the next bigger threshold) the collapsible navbar was permanently open. After click on toggle button it begins to animate like when hiding, but on the end of animation the collapsible navbar shows again.
During investigation with firebug it appeared that 'display' attribute for all .collapse is defined in https://github.com/twbs/bootstrap/blob/94472ee74ac6732a3abd0d32ad5c3a68370090c0/less/component-animations.less#L19 but for certain conditions (screen width) it is redefined in: https://github.com/twbs/bootstrap/blob/94472ee74ac6732a3abd0d32ad5c3a68370090c0/less/navbar.less#L69
Due to this, I overrided it with this code in my custom.css:
@media (min-width: 768px) and (max-width: 991px) {
.navbar-collapse.collapse {
display: none !important;
}
.navbar-collapse.collapse.in {
display: block !important;
}
}
and this let it work for all screen sizes.
I think it's a bug :( I'm attaching screenshot from firebug that shows overriding for this styles:
I don't know if just removing L69 in navbar.less is enough, but it appears it is.
So I'm sending this for experts :)