media-query-gap

2.0.0 • Public • Published

media-query-gap

Build Status

Apply gap on max-width/height media queries.

Useful when you want to prevent double breakpoints.

This is a low-level module. You’re probably looking for PostCSS or Babel plugin.

Install

npm install media-query-gap --save

Usage

import mediaQueryGap from 'media-query-gap';

console.log(emMediaQuery('screen and (max-width:600px)'));
// 'screen and (max-width:599px)'

console.log(emMediaQuery('screen and (max-width:37.5em)'));
// 'screen and (max-width:37.49em)'

API

mediaQueryGap(str)

Returns: string

str

Type: string

Media query to convert.

License

MIT © Ivan Nikolić

/media-query-gap/

    Package Sidebar

    Install

    npm i media-query-gap

    Weekly Downloads

    1,136

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    11.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • niksy