0.2.11 • Published 6 years ago

travix-breakpoints v0.2.11

Weekly downloads
214
License
MIT
Repository
github
Last release
6 years ago

travix-breakpoints

npm Build Status

Breakpoint values for responsive design

Exports (CSS) breakpoint values for various sizes.

Installation

$ npm install --save travix-breakpoints

Usage

CommonJS

import { variables, sizes } from 'travix-breakpoints';

// `variables` is a flat Object of key/value pairs
// `sizes` is an object keyed by breakpoint sizes, with min/max values

You can also import them individually:

import sizes from 'travix-breakpoints/sizes';
import variables from 'travix-breakpoints/variables';

CSS Modules

@value small from "travix-breakpoints/variables.css";

@media small {
  /* ... */
}

Or you can even import everything, and then extract them in the file:

@value breakpoints: "travix-breakpoints/variables.css";
@value small, medium, smallMax from breakpoints;

@media small {
  /* ... */
}

.someClass {
  width: smallMax;
}

Development

If you want to modify the breakpoints further, update them in ./lib/sizes.js, and then run:

$ npm run generate:variables

This will then update the ./lib/variables.js file accordingly.

License

MIT © Travix International

0.2.11

6 years ago

0.2.10

6 years ago

0.2.0

7 years ago

0.1.0

7 years ago