Created
          February 7, 2018 18:47 
        
      - 
      
 - 
        
Save mgmgpyaesonewin/f604fa8619177d74c97764f89f4906f0 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { css } from 'styled-components'; | |
| const sizes = { | |
| desktop: 992, | |
| tablet: 768, | |
| phone: 376, | |
| }; | |
| export const media = Object.keys(sizes).reduce((sum, label) => { | |
| const newSum = Object.assign({}, sum); | |
| newSum[label] = (...args) => css` | |
| @media (min-width: ${sizes[label]}px) { | |
| ${css(...args)} | |
| } | |
| `; | |
| return newSum; | |
| }, {}); | |
| export const zIndex1 = css` | |
| z-index: 1; | |
| `; | |
| export const zIndex2 = css` | |
| z-index: 10; | |
| `; | |
| export const zIndex3 = css` | |
| z-index: 20; | |
| `; | |
| export const zIndex4 = css` | |
| z-index: 30; | |
| `; | |
| export const paddedContent = css` | |
| padding: 0 8px; | |
| ${media.tablet` | |
| padding: 0 16px; | |
| `} | |
| `; | |
| export const paddedContentWithTop = css` | |
| padding: 8px 8px 0; | |
| ${media.tablet` | |
| padding: 16px 16px 0; | |
| `} | |
| `; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment