1
1
mirror of https://github.com/primer/css.git synced 2024-12-29 09:06:07 +03:00

move global prism styles out of _app

This commit is contained in:
Shawn Allen 2019-01-15 11:24:04 -08:00
parent 724e44ced2
commit d43d827bbc

View File

@ -3,34 +3,12 @@ import App, {Container} from 'next/app'
import {MDXProvider} from '@mdx-js/tag'
import Head from 'next/head'
import {BaseStyles, BorderBox, Box, Flex, theme} from '@primer/components'
import {createGlobalStyle} from 'styled-components'
import {Header, PackageHeader, SideNav} from '../src/components'
import getComponents from '../src/markdown'
import {config, requirePage, rootPage} from '../src/utils'
import {CONTENT_MAX_WIDTH} from '../src/constants'
import 'primer/index.scss'
import 'prism-github'
// XXX undo .markdown-body .rule (:facepalm:)
const GlobalStyles = createGlobalStyle`
.markdown-body .rule.token {
height: auto;
margin: 0;
overflow: visible;
border-bottom: none;
}
.markdown-body .rule.token::before,
.markdown-body .rule.token::after {
display: none;
}
.language-html .token {
color: ${theme.colors.gray[8]} !important;
}
}
`
export default class MyApp extends App {
static async getInitialProps({Component, ctx}) {
@ -56,7 +34,6 @@ export default class MyApp extends App {
return (
<BaseStyles fontSize={2} style={{fontFamily: theme.fonts.normal}}>
<GlobalStyles />
<Container>
<Head>
<title>Primer CSS{meta.title ? ` / ${meta.title}` : null}</title>