Skip to content

Commit

Permalink
Fix usage of global styles
Browse files Browse the repository at this point in the history
  • Loading branch information
lgeiger authored and rgbkrk committed Oct 26, 2018
1 parent 0e8f234 commit 0f47394
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 33 deletions.
15 changes: 12 additions & 3 deletions components/app/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import React from "react";
import { createGlobalStyle } from "styled-components";
import { StyledApp } from "@components/app/styled";

import { normalize } from "polished";
/**
* Reset our styles
*/
const GlobalStyles = createGlobalStyle`
body, html{
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;=
${normalize()};
*{
box-sizing: border-box;
}
html, body{
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
`;

Expand Down
31 changes: 1 addition & 30 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,9 @@
// @flow
import * as React from "react";
import Document, { Head, Main, NextScript } from "next/document";
import styled, { ServerStyleSheet, createGlobalStyle } from "styled-components";
import { normalize } from "polished";
import styled, { ServerStyleSheet } from "styled-components";

import type { Context } from "next";
/**
* Reset our styles
*/
const GlobalStyles = createGlobalStyle`
${normalize()};
*{
box-sizing: border-box;
}
html, body{
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica,
Arial, sans-serif;
}
`;

const DocWrapper = styled.div`
padding: 30px;
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 300;
}
`;

type DocumentContext = Context & { renderPage: Function };

Expand All @@ -57,7 +29,6 @@ export default class MyDocument extends Document {
</Head>
<body>
<Main />
<GlobalStyles />
<NextScript />
</body>
</html>
Expand Down

1 comment on commit 0f47394

@vercel
Copy link

@vercel vercel bot commented on 0f47394 Oct 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully aliased the URL https://nteract-site-isocincgmh.now.sh to the following alias.

Please sign in to comment.