Bulma: $navbar-breakpoint breaks nav style within certain breakpoints

Created on 26 Jan 2019  路  7Comments  路  Source: jgthms/bulma


This is about Bulma.


It is a bug.

Overview of the problem

This is about the Bulma CSS framework

I'm using Bulma version [0.7.2]
My browser is: Chrome 71.0.3578.98

I am sure this issue is not a duplicate

Description

I am using Bulma via Buefy/NUXT.

When using $navbar-breakpoint: $tablet in custom scss, the navbar loses style (is-info, is-link, etc.) and turns white between 769 and 1087px.

Steps to Reproduce

@import "~bulma/sass/utilities/_all";

$navbar-breakpoint: $tablet;

@import "~bulma/bulma";
@import "~buefy/src/scss/buefy";

Expected behavior

The navbar should stay the same color.

screen shot 2019-01-26 at 6 17 37 pm

Actual behavior

screen shot 2019-01-26 at 6 17 20 pm

And on link hover:

screen shot 2019-01-26 at 6 22 54 pm

Changing the $navbar-background-color variable does not change the behavior either.

stale

Most helpful comment

I can confirm the issue.

All 7 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Issue still affecting recent Bulma versions. Could a new issue be created?

I can confirm the issue.

How do we get this re-opened?

I'm seeing the same with Bulma 0.7.5 (via Buefy 0.8.18). I tried depending on Bulma directly to raise the version to 0.8.2 (I think I can, right?!?). Both show the bug. My navbar loses is-primary. It also appears to gain a little vertical padding:

Mobile:
Navbar Mobile

Tablet:
Navbar Tablet

Desktop:
Navbar Desktop

I got it too, while setting $navbar-breakpoint: to a lower value to keep menu visible even on mobile, I noticed that it do not display very well because the menu background kick at 1023px and below @media screen and (max-width: 1023px) even if $navbar-breakpoint is set to a lower value.

this lines are responsible for the breakpoint handling with background :
https://github.com/jgthms/bulma/blob/bd1b032be84ba7c6334199c3fa18e789fd04eead/sass/components/navbar.sass#L236
&
https://github.com/jgthms/bulma/blob/bd1b032be84ba7c6334199c3fa18e789fd04eead/sass/components/navbar.sass#L248

but strangely I keep getting @media screen and (max-width:1023px) { after sass compilation (though vue-cli / buefy)

same with bulma version 0.7.5 & 0.9.1

it appears there is two set of rules in my compiled file :
around line 5032 :

@media screen and (max-width: 499px) {
.navbar > .container {
    display: block;
}
...
.navbar-menu {
    background-color: #34495e;
    box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1);
    padding: 0.5rem 0;
}
...

Which hold the correct behaviour ( $navbar-breakpoint:500px in this case)

and around line 9868

@media screen and (max-width: 1023px) {
.navbar {
    color: #ecf0f1;
}
.navbar .navbar-menu {
    background-color: #ecf0f1;
    border-radius: 0 0 0.4em 0.4em;
}
...

Which hold the faulty rules

Clearly the sccss was loaded tow times with $navbar-breakpoint reset between them. Still investigeting, but there is some thing with the loading of bulma/buefy and bootswatch theme.

Confirmed as a bootswatch theme issue.

jenil/bulmaswatch#86

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Cosbgn picture Cosbgn  路  3Comments

Laraveldeep picture Laraveldeep  路  3Comments

jaredreich picture jaredreich  路  3Comments

rogervila picture rogervila  路  3Comments

bigZ-again picture bigZ-again  路  3Comments