How to use the @project-r/styleguide.mediaQueries.mUp function in @project-r/styleguide

To help you get started, we’ve selected a few @project-r/styleguide examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github orbiting / republik-frontend / components / Frame / index.js View on Github external
}),
  padHeader: css({
    // minus 1px for first sticky hr from header
    // - otherwise there is a jump when scroll 0 and opening hamburger
    paddingTop: HEADER_HEIGHT_MOBILE - 1,
    [mediaQueries.mUp]: {
      paddingTop: HEADER_HEIGHT - 1
    }
  }),
  bodyGrower: css({
    flexGrow: 1
  }),
  content: css({
    paddingTop: 40,
    paddingBottom: 60,
    [mediaQueries.mUp]: {
      paddingTop: 80,
      paddingBottom: 120
    }
  })
}

export const MainContainer = ({ children }) => (
  {children}
)

export const Content = ({ children, style }) => (
  <div style="{style}">
    {children}
  </div>
)
github orbiting / republik-frontend / components / FontSize / Overlay.js View on Github external
label: css({
      ...fontStyles.sansSerifRegular14,
      color: colors.secondary
    }),
    preview: css({
      borderTop: `1px solid ${colors.text}`,
      fontSize: fontSize
    }),
    subhead: css({
      marginTop: 12,
      textOverflow: 'ellipsis',
      overflow: 'hidden',
      whiteSpace: 'nowrap',
      fontSize: '1.1875em',
      lineHeight: '1.25',
      [mediaQueries.mUp]: {
        fontSize: '1.5em'
      }
    }),
    paragraph: css({
      fontSize: '1.0625em',
      lineHeight: '1.578em',
      [mediaQueries.mUp]: {
        fontSize: '1.1875em'
      }
    })
  }

  const trackFontSize = action => {
    track(['trackEvent', 'FontSize', action, fontPercentage.current])
  }
github orbiting / republik-frontend / pages / 503.js View on Github external
import { PUBLIC_BASE_URL, CDN_FRONTEND_BASE_URL } from '../lib/constants'

const styles = {
  container: css({
    backgroundColor: '#E9A733',
    color: '#fff',
    minHeight: '100vh'
  }),
  logoContainer: css({
    textAlign: 'center',
    paddingTop: 25,
    width: 200,
    marginLeft: 'auto',
    marginRight: 'auto',
    [mediaQueries.mUp]: {
      width: 280,
      paddingTop: SPACE * 2
    }
  }),
  whiteOnBlack: css({
    textRendering: 'optimizeLegibility',
    WebkitFontSmoothing: 'antialiased',
    '& ::selection': {
      color: '#000',
      backgroundColor: '#fff'
    }
  }),
  message: css({
    color: '#fff',
    textAlign: 'center',
    ...fontStyles.sansSerifRegular21,
github orbiting / republik-frontend / components / Marketing / Offers.js View on Github external
offer: css({
    margin: 0,
    padding: 0,
    '&amp; &gt; li': {
      borderTop: `1px solid ${colors.divider}`,
      display: 'block',
      padding: '10px 30px 10px 0',
      position: 'relative'
    },
    '&amp; &gt; li a': {
      color: colors.text,
      display: 'block',
      textDecoration: 'none',
      fontSize: '17px',
      lineHeight: '22px',
      [mediaQueries.mUp]: {
        fontSize: '20px',
        lineHeight: '24px'
      },
      verticalAlign: 'middle'
    }
  }),
  icon: css({
    marginTop: '-14px',
    position: 'absolute',
    right: '5px',
    top: '50%'
  })
}

const List = ({ t, data }) =&gt; (
   (
github orbiting / republik-frontend / components / Article / Progress / ProgressPrompt.js View on Github external
position: 'relative',
    backgroundColor: colors.primaryBg,
    [mediaQueries.mUp]: {
      paddingTop: 30,
      paddingBottom: 30
    }
  }),
  actions: css({
    display: 'flex',
    flexWrap: 'wrap',
    position: 'relative',
    '& > button': {
      flexGrow: 1,
      margin: '5px 15px 0 0',
      minWidth: '120px',
      [mediaQueries.mUp]: {
        flexGrow: 0,
        margin: '5px 15px 0 0',
        minWidth: '160px'
      }
    }
  }),
  pMargin: css({
    margin: '10px 0',
    [mediaQueries.mUp]: {
      margin: '20px 0'
    }
  })
}

const { H2, P, Emphasis } = Interaction
github orbiting / republik-frontend / components / Search / Results.js View on Github external
const styles = {
  container: css({
    paddingTop: 0,
    paddingBottom: 120
  }),
  results: css({
    paddingTop: 5
  }),
  countLoaded: css({
    borderTop: `1px solid ${colors.text}`,
    display: 'flex',
    justifyContent: 'space-between',
    padding: '15px 0',
    textAlign: 'left',
    ...fontStyles.sansSerifRegular16,
    [mediaQueries.mUp]: {
      ...fontStyles.sansSerifRegular21
    }
  }),
  button: css({
    outline: 'none',
    WebkitAppearance: 'none',
    background: 'transparent',
    border: 'none',
    cursor: 'pointer',
    padding: 0
  })
}

const ResultsList = ({ nodes }) => {
  const nodeType = nodes[0].entity.__typename
github orbiting / crowdfunding-frontend / components / Frame / Sidebar.js View on Github external
marginBottom: 30
    }
  }),
  link: css({
    textDecoration: 'none',
    color: colors.text,
    ':visited': {
      color: colors.text
    },
    ':hover': {
      color: '#ccc'
    }
  }),
  sticky: css({
    display: 'none',
    [mediaQueries.mUp]: {
      display: 'block',
      position: 'fixed',
      zIndex: 1,
      width: SIDEBAR_WIDTH,
      top: HEADER_HEIGHT,
      backgroundColor: '#fff'
    }
  }),
  button: css({
    marginBottom: 10,
    [mediaQueries.onlyS]: {
      display: 'none'
    }
  }),
  reminderActions: css({
    display: 'block',
github orbiting / republik-frontend / components / Discussion / Comments.js View on Github external
.catch(() =&gt; {
          setFocusState({ focusError: t('discussion/focus/loadError') })
        })
    }
  }

  React.useEffect(() =&gt; {
    fetchFocus()
  })

  const onReload = e =&gt; {
    e.preventDefault()
    props.discussionComments.refetch()
  }

  const isDesktop = useMediaQuery(mediaQueries.mUp)

  return (
     {
        const { focus } = discussion.comments

        if (discussion.comments.totalCount === 0) {
          return 
        }
github orbiting / crowdfunding-frontend / pages / en.js View on Github external
marginTop: SPACE,
      marginBottom: SPACE * 2
    }
  }),
  mainNav: css({
    fontFamily: fontFamilies.sansSerifRegular,
    fontSize: 44,
    lineHeight: '60px'
  }),
  address: css({
    lineHeight: 1.6,
    fontStyle: 'normal'
  }),
  mBr: css({
    display: 'none',
    [mediaQueries.mUp]: {
      display: 'inline'
    }
  }),
  credits: css({
    marginBottom: SPACE * 2,
    marginTop: SPACE,
    maxWidth: 500,
    marginLeft: 'auto',
    marginRight: 'auto'
  })
}

const Highlight = ({children, ...props}) =&gt; <span>{children}</span>
const Strong = ({children}) =&gt; <span>{children}</span>

class EnPage extends Component {
github orbiting / republik-frontend / components / Card / Form / styles.js View on Github external
[mediaQueries.mUp]: {
      display: 'flex'
    }
  }),
  portrait: css({
    width: 300 / 3,
    height: 400 / 3,
    [mediaQueries.mUp]: {
      width: 300 / 2,
      height: 400 / 2
    }
  }),
  details: css({
    marginTop: 40,
    marginBottom: 40,
    [mediaQueries.mUp]: {
      marginTop: 0,
      marginLeft: 40
    }
  }),
  errorMessages: css({
    color: colors.error,
    marginTop: 40
  }),
  button: css({
    marginTop: 40,
    width: 170,
    textAlign: 'center'
  })
}