@rapharacing/media-query
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Rapha Media Query

Beautiful media queries for styled-components

pipeline status coverage report tested with jest

MIT License

Installation

Using npm:

npm i @rapharacing/media-query --save

Using Yarn:

yarn add @rapharacing/media-query

Breakpoints

Default breakpoints

{
  small: '30em', // 480px
  medium: '48em', // 768px
  large: '62em' // 992px,
  xl: '75em' // 1200px
}

Example

If the project supports ECMAScript Modules, you can use the import syntax

import mq from '@rapharacing/media-query';

const Example = styled.div`
  display: flex;
  flex-direction: column;

  ${mq.md`
        flex-direction: row;
    `};
`;

Will generate the following css

.example {
  display: flex;
  flex-direction: column;

  @media (min-width: 48em) {
    flex-direction: row;
  }
}

License

Media query is freely distributable under the terms of the MIT license.

Package Sidebar

Install

npm i @rapharacing/media-query

Weekly Downloads

10

Version

2.0.1

License

MIT

Unpacked Size

18.7 kB

Total Files

14

Last publish

Collaborators

  • michaela_w
  • jakubgajewski
  • alex-windett
  • bbodien
  • john.kilpatrick