Skip to content

Simple @bp screen size media query mixin for SASS.

License

Notifications You must be signed in to change notification settings

MadeByGreyhound/bp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@greyhoundstudio/bp

A simple @bp media query mixin for SASS.

Include it in your package with @use:

@use '@greyhoundstudio/bp' as *;

Use it like...

@include bp(sm, md) {
  body {
    font-size: 1.6rem;
  }
}

to generate...

@media only screen and (min-width: 480px) and (max-width: 767px) {
  body {
    font-size: 1.6rem;
  }
}

You can provide just the $min argument, or both $min and $max. You can also provide unit-less values which will be interpreted as pixels, or any other CSS unit.

@include bp(768) {
  body {
    font-size: 1.6rem;
  }
}

@include bp(48rem) {
  body {
    font-size: 1.6rem;
  }
}

You can also configure your own pre-defined breakpoints.

@use '@greyhoundstudio/bp' as * with(
  $breakpoints: (
    "sm": 480px,
    "md": 768px,
    "lg": 1024px
  )
);

About

Simple @bp screen size media query mixin for SASS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages