Skip to content

media-breakpoint-down is off by 1px #18845

@apomili

Description

@apomili

Bootstrap 4 - mixin/breakpoint

Hy guys,
I don't know if I am using mixin in a bad way, but I just discover that this instruction don't work in the way I supposed.

@include media-breakpoint-down(sm) {
   //my style
}

I assumed that this style will be applied from 0 to 767 pixel screen, but it will from 0 to 766.

I change the function breakpoint-max on breakpoint.scss in this way (-0.05 instead of -0.1):

@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
  $next: breakpoint-next($name, $breakpoints);
  @return if($next, breakpoint-min($next, $breakpoints) - 0.05, null);
}

and it seem to work fine but i don't know if mess with all the other

Nice work,
I love you!

Alessandro

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions