@emotion/core#SerializedStyles TypeScript Examples

The following examples show how to use @emotion/core#SerializedStyles. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GlobalStyles.tsx    From tsplay.dev with MIT License 6 votes vote down vote up
darkModeStyles: SerializedStyles = css`
  body {
    filter: invert(100%) hue-rotate(180deg);
  }

  .prevent-hue-rotate {
    filter: invert(100%) hue-rotate(180deg);
  }
`
Example #2
Source File: Fonts.tsx    From tsplay.dev with MIT License 5 votes vote down vote up
fonts: SerializedStyles = css`
  @font-face {
    font-family: 'Segoe';
    src: url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-light.woff2)
        format('woff2'),
      url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-light.woff)
        format('woff');
    font-weight: 100;
    font-style: normal;
  }

  @font-face {
    font-family: 'Segoe';
    src: url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-semilight.woff2)
        format('woff2'),
      url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-semilight.woff)
        format('woff');
    font-weight: 300;
    font-style: normal;
  }

  @font-face {
    font-family: 'Segoe';
    src: url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-regular.woff2)
        format('woff2'),
      url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-regular.woff)
        format('woff');
    font-weight: 400;
    font-style: normal;
  }

  @font-face {
    font-family: 'Segoe';
    src: url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-semibold.woff2)
        format('woff2'),
      url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-semibold.woff)
        format('woff');
    font-weight: 600;
    font-style: normal;
  }

  @font-face {
    font-family: 'Segoe';
    src: url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-bold.woff2)
        format('woff2'),
      url(https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-bold.woff)
        format('woff');
    font-weight: 700;
    font-style: normal;
  }
`
Example #3
Source File: GlobalStyles.tsx    From tsplay.dev with MIT License 4 votes vote down vote up
globalStyles: SerializedStyles = css`
  @import url('https://fonts.googleapis.com/css?family=Montserrat:200,400,500');

  html,
  body,
  div,
  span,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  blockquote,
  pre,
  a,
  cite,
  code,
  em,
  img,
  strong,
  ol,
  ul,
  li,
  fieldset,
  form,
  label,
  legend,
  table,
  caption,
  tbody,
  tfoot,
  thead,
  tr,
  th,
  td,
  article,
  aside,
  canvas,
  details,
  embed,
  figure,
  footer,
  header,
  menu,
  nav,
  output,
  section,
  time,
  mark,
  audio,
  video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
  }

  article,
  aside,
  details,
  figcaption,
  figure,
  footer,
  header,
  hgroup,
  menu,
  nav,
  section {
    display: block;
  }

  html,
  body,
  #root {
    line-height: 1;
    height: 100%;
    width: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-family: 'Segoe', Segoe UI, -apple-system, BlinkMacSystemFont, Roboto, Helvetica Neue, sans-serif;
    overflow-x: hidden;

    ::-webkit-scrollbar {
      width: ${SCROLL_BAR_WIDTH}px;
    }

    ::-webkit-scrollbar-track {
      background: ${Palette.shade3};
    }

    ::-webkit-scrollbar-thumb {
      background: ${Palette.shade2};
    }
  }

  body button,
  body input,
  body textarea {
    font-family: inherit;
  }

  ol,
  ul {
    list-style: none;
  }

  blockquote,
  q {
    quotes: none;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  strong {
    font-weight: 600;
  }
`