Skip to content

Commit

Permalink
fix CSS injection order on the server
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Mar 24, 2021
1 parent 1920072 commit 5bf2abc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ MyDocument.getInitialProps = async (ctx) => {
userLanguage: ctx.query.userLanguage || 'en',
// Styles fragment is rendered after the app and page rendering finish.
styles: [
<style id="material-icon-font" key="material-icon-font" />,
<style id="font-awesome-css" key="font-awesome-css" />,
styledComponentsSheet.getStyleElement(),
<style
id="emotion-server-side"
Expand All @@ -167,8 +169,6 @@ MyDocument.getInitialProps = async (ctx) => {
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: css }}
/>,
<style id="material-icon-font" key="material-icon-font" />,
<style id="font-awesome-css" key="font-awesome-css" />,
<style id="app-search" key="app-search" />,
<style id="prismjs" key="prismjs" />,
<style id="insertion-point-jss" key="insertion-point-jss" />,
Expand Down

0 comments on commit 5bf2abc

Please sign in to comment.