Skip to content

Add and use $navbar-breakpoint variable; Fixes #1042 #2109

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

Merged
merged 2 commits into from
Oct 2, 2018

Conversation

mlncn
Copy link
Contributor

@mlncn mlncn commented Sep 18, 2018

This fixes the problem of a hard-coded breakpoint for when the hamburger menu becomes a full menu.

This is an improvement; it gives Bulma users needed flexibility without requiring hacking, workarounds like redefining breakpoints that may have unwanted side effects, or code duplication.

Proposed solution

Replace hard-coded desktop/touch mixins with from/until mixins that take a new $navbar-breakpoint variable.

Fixes #1042

Now people bringing in Bulma with Sass or SCSS can do something like the following; in their main .scss file in this example:

// Update Bulma's derived variables
@import "../../node_modules/bulma/sass/utilities/initial-variables.sass";
$navbar-breakpoint: $tablet;

Tradeoffs

None; it continues to work identically as before if no-one sets this variable.

Testing Done

I replaced Bulma in node_modules with a clone of my forked repository that has only this change, and it worked exactly as intended. Bulma provided all the tools to make this an easy modification; now everyone can have access to it.

Thanks!

@mariozig
Copy link

Nice PR! This fixes a year old issue and addresses at least 3 different stack overflow questions:

  1. https://stackoverflow.com/questions/48809328/bulma-navbar-breakpoint
  2. https://stackoverflow.com/questions/50548193/bulma-horizontal-navbar-menu-on-tablet-breakpoint
  3. https://stackoverflow.com/questions/52467626/bulma-show-uncollapsed-navbar-on-tablet

@frederikhors
Copy link

@jgthms can you please merge and release 0.7.2 (100 commits until 0.7.1)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edit the visibility of the navbar-burger
4 participants