Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize .navbar-toggleable-* behavior for into .collapse-* #20360

Closed
johnpozy opened this issue Jul 25, 2016 · 4 comments
Closed

Generalize .navbar-toggleable-* behavior for into .collapse-* #20360

johnpozy opened this issue Jul 25, 2016 · 4 comments

Comments

@johnpozy
Copy link

Just curious about collapse breakpoints like .collapse-xs, .collapse-sm and .collapse-md. I know the same result can be achieve by using the the .navbar-toggleable-xs and so on. But it doesn't feel right(i think) to use it outside .navbar component.

// Collapse breakpoint
// scss-lint:disable ImportantRule
.collapse-xs,
.collapse-sm,
.collapse-md {
  display: none;
}

.collapse {
  &-xs {
    @include media-breakpoint-up(sm) {
      display: block !important;
    }
  }
  &-sm {
    @include media-breakpoint-up(md) {
      display: block !important;
    }
  }
  &-md {
    @include media-breakpoint-up(lg) {
      display: block !important;
    }
  }
}
// scss-lint:enable ImportantRule

Feel free to close it if this already asked or not relevant.

Thanks

@cvrebert
Copy link
Collaborator

Do you know whether any other libraries with collapse/accordion components offer such a feature?

@cvrebert cvrebert changed the title Collapse breakpoint? Auto-uncollapse above minimum breakpoint width Jul 25, 2016
@johnpozy
Copy link
Author

johnpozy commented Jul 26, 2016

@cvrebert I'm not aware of that because all of my app is base on Bootstrap. Here is an example usecase.

It's more cleaner(i think) to use .collapse.collapse-{breakpoint} instead of .collapse.navbar-toggleable-{breakpoint}.

Possible for single collapse. But for accordion, i'm not sure 😕 . If you think this feature will not bring any issue with accordion, it will be a great enhancement for the collapse component.

Thanks

@mdo mdo added this to the v4.0.0-alpha.4 milestone Jul 28, 2016
@mdo
Copy link
Member

mdo commented Jul 28, 2016

I'll take a look at generalizing the navbar collapse stuff I've built to see if it makes sense to do this.

@mdo mdo changed the title Auto-uncollapse above minimum breakpoint width Generalize .navbar-toggleable-* behavior for into .collapse-* Jul 28, 2016
@mdo mdo modified the milestones: v4.1 ideas, v4.0.0-alpha.5 Sep 15, 2016
@mdo
Copy link
Member

mdo commented Dec 22, 2016

Not going this route given the more specific nature of these styles coming in #21390.

@mdo mdo closed this as completed Dec 22, 2016
@mdo mdo removed this from the v4.1 ideas milestone Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants