Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

rapharacing/media-query

Repository files navigation

Rapha Media Query

Beautiful media queries for styled-components

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.

About

Beautiful media queries for styled-components

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published