Skip to content

Navbar has 1px gap where it's broken due to mixins.until subtracting 1px #3961

@FunctionDJ

Description

@FunctionDJ

Consider the following lines:

$navbar-breakpoint: iv.$desktop !default;

(with all defaults this value is 1024px)
@include mx.until($navbar-breakpoint) {

@include mx.from($navbar-breakpoint) {

Here's mixins.until:
@mixin until($device) {
@media screen and (max-width: ($device - 1px)) {
@content;
}
}

This all means that with all defaults, there is a gap between 1023px and 1024px where neither "desktop nav" nor "mobile nav" have display: block, breaking the navbar (no navigation possible, burger menu button visible but does seemingly nothing because mobile nav is hidden).

To be between these viewport sizes is easily possible:

  • 2560x1440px screen resolution
  • 125% OS-level scaling
  • snap browser window to side (half of screen)
  • chromium shows viewport width to be 1023.20px and nav is seemingly broken (hidden)

Suggested solution: Don't use mixins.until i guess..? Or maybe the - 1px can safely be removed and there won't be overlaps between the sets of styles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions