mirror of
https://github.com/yldio/copilot.git
synced 2025-01-23 09:20:12 +02:00
25 lines
577 B
JavaScript
25 lines
577 B
JavaScript
|
const styled = require('styled-components');
|
||
|
|
||
|
// github.com/kristoferjoseph/flexboxgrid/blob/master/dist/flexboxgrid.css
|
||
|
const screens = {
|
||
|
// >= 768px
|
||
|
small: 'only screen and (min-width: 48rem)',
|
||
|
// >= 1024px
|
||
|
medium: 'only screen and (min-width: 64rem)',
|
||
|
// >= 1200px
|
||
|
large: 'only screen and (min-width: 75rem)'
|
||
|
};
|
||
|
|
||
|
const breakpoints = Object.keys(screens).reduce((acc, label) => {
|
||
|
return {
|
||
|
...acc,
|
||
|
[label]: (...args) => styled.css`
|
||
|
@media ${screens[label]} {
|
||
|
${styled.css(...args)}
|
||
|
}
|
||
|
`
|
||
|
};
|
||
|
}, {});
|
||
|
|
||
|
module.exports = breakpoints;
|