# media-query-gap

> Apply gap on max-width/height media queries.

Latest version **2.0.0** (published 2020-10-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install media-query-gap
pnpm add media-query-gap
yarn add media-query-gap
bun add media-query-gap
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-10-21 |
| First published | 2016-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 11.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ivan Nikolić |
| Maintainers | niksy |
| Keywords | css, gap, media, mq, query |

## Links

- npm: https://www.npmjs.com/package/media-query-gap
- Repository: https://github.com/niksy/media-query-gap
- Homepage: https://github.com/niksy/media-query-gap#readme
- Issues: https://github.com/niksy/media-query-gap/issues
- npm.io page: https://npm.io/package/media-query-gap

## Dependencies (1)

- [postcss-value-parser](https://npm.io/package/postcss-value-parser.md) ^4.1.0

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2020-10-21
- 1.0.0 — 2016-11-20

## README

# media-query-gap

[![Build Status][ci-img]][ci]

Apply gap on max-width/height media queries.

Useful when you want to
[prevent double breakpoints](http://tzi.fr/css/prevent-double-breakpoint).

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

## Install

```sh
npm install media-query-gap --save
```

## Usage

```js
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ć](http://ivannikolic.com)

<!-- prettier-ignore-start -->

[ci]: https://travis-ci.com/niksy/media-query-gap
[ci-img]: https://travis-ci.com/niksy/media-query-gap.svg?branch=master
[postcss-plugin]: https://github.com/niksy/postcss-media-query-gap
[babel-plugin]: https://github.com/niksy/babel-plugin-media-query-gap

<!-- prettier-ignore-end -->

---
_Source: https://npm.io/package/media-query-gap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
