Skip to content

Lightweight library that simplifies working with media queries to create adaptability on the site.

Notifications You must be signed in to change notification settings

blackpiest/lite-breakpoints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lite-breakpoints

npm

This is a very small and lightweight library that simplifies working with media queries to create adaptability on the site.

Install

  • To work with this library, you will need to install sass in your project (obviously):
     npm install sass -D
  • To install the library, run this command:
     npm install lite-breakpoints -D

Usage

WARNING: You need to initialize the global variable $lite-variables in order to set breakpoints for your project. After that, you need to import the library itself into a scss file.

// breakpoints.scss
$lite-breakpoints:(xs: 0,
  sm: 375px,
  md: 560px,
  lg: 900px,
  xl: 1200px,
  xxl: 1400px);
  
@import "~lite-breakpoints";

That's all! Now you can use convenient mixins for adaptivity in your projects. Good luck!

// another-file.scss
@import '@path/to/breakpoints';

.text {
  @include breakpoint-up(lg) {
    color: red;
  }
}
.container {
  @include breakpoint-down(xl) {
    width: 200px;
  }
}

About

Lightweight library that simplifies working with media queries to create adaptability on the site.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages