-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about gatsby-plugin-styled-components #2893
Comments
Unless I'm misunderstanding (and this truly needs to be done differently with styled components), the HN site example shows how this can be achieved:
edit: I hadn't realized |
@dustinhorton thanks. import React from "react"
import { injectGlobal } from 'styled-components'
injectGlobal`
*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: inherit; }
html {
font-size: 62.5%; }
body {
box-sizing: border-box; }
body {
font-family: "Lato", sans-serif;
font-weight: 400;
line-height: 1.7;
color: #374047; }
`
export default ({children}) =>
<div>
{children()}
</div> |
@fermartz maybe this issue can be closed? :) |
First of all, thanks to all the contributors of GATSBY, I love it! My question is very simple but I couldn't find any posting with the answer.
How can I inject global styles for gatsby-plugin-styled-components if I'm not using Typography.js?
For example:
Where do I inject the following code?
Thanks in advance!
The text was updated successfully, but these errors were encountered: