Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Design adjustments #225

Merged
merged 6 commits into from
Jul 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/code-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import glamorous from 'glamorous'
import stripIndent from './utils/strip-indent'

const StyledLiveProvider = glamorous(LiveProvider)({
margin: '0 auto',
marginLeft: 'auto',
marginRight: 'auto',
display: 'flex',
flexDirection: 'column',
flexWrap: 'wrap',
Expand Down
11 changes: 7 additions & 4 deletions components/docs-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ const PageWrapper = glamorous.div((props, {colors}) => ({
fill: `${colors.primary}`,
width: '1rem',
},
'& img': {
width: '100%',
},
}))

const EditAnchorWrap = glamorous(Div)({
Expand Down Expand Up @@ -68,12 +71,12 @@ function PageSections({title, note, heading, sections}) {
<PageWrapper>
<Title dangerouslySetInnerHTML={{__html: mdToHTMLUnwrapped(title)}} />
<Div
maxWidth="70rem"
maxWidth="50rem"
margin="auto"
dangerouslySetInnerHTML={{__html: mdToHTMLUnwrapped(heading)}}
/>
<Div
maxWidth="70rem"
maxWidth="50rem"
margin="20px auto"
borderLeft="3px solid"
paddingLeft={20}
Expand All @@ -95,9 +98,9 @@ function DocSection(props) {
const Section = glamorous.section((p, {colors}) => ({
borderBottom: `1px solid ${colors.primary}`,
width: '100%',
margin: '20px auto',
margin: '20px auto 75px',
paddingBottom: 20,
maxWidth: '70rem',
maxWidth: '50rem',
}))

return (
Expand Down
23 changes: 11 additions & 12 deletions styles/base.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {fonts, colors, mediaQueries} from '../styles/global-styles'
import {fonts, colors} from '../styles/global-styles'

export default () => `
* {
Expand All @@ -23,7 +23,7 @@ export default () => `

body {
font-family: ${fonts.sansserif};
font-weight: 100;
font-weight: 400;
font-size: 16px;
color: ${colors.darkGray};
line-height: 1.5em;
Expand All @@ -36,11 +36,6 @@ export default () => `
max-width: 100%;
overflow-x: hidden;
}
${mediaQueries.largeUp} {
body {
font-size: 18px;
}
}

p {
margin-bottom: 24px;
Expand All @@ -56,7 +51,7 @@ export default () => `
}

h1 { font-size: 3.998em; }
h2 { font-size: 2.827em; }
h2 { font-size: 2.5em; }
h3 { font-size: 1.999em; }
h4 { font-size: 1.414em; }
h5 { font-size: 1em; }
Expand Down Expand Up @@ -109,18 +104,20 @@ export default () => `
}

pre {
overflow-x: scroll;
overflow-x: hidden;
white-space: pre-wrap;
max-width: 100%;
color: ${colors.white};
background-color: ${colors.blue};
padding: 10px;
margin-bottom: 1.75em;
}

pre code {
background-color: initial;
padding: initial;
border-radius: initial;
font-size: 1em;
font-size: 0.85em;
}

code {
Expand All @@ -144,8 +141,10 @@ export default () => `
/* to be used by our code blocks */
.prism-code {
display: block;
white-space: pre;

white-space: pre-wrap !important;
Copy link
Owner

Choose a reason for hiding this comment

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

These styles in particular are borrowed from react-live, which injects them again. We could probably tell react-live to not inject the styles. But this is ok for now.

/* Was having issues hunting down the multiple injections of
base styles - someone with more insight in the architecture can
feel free to hunt it down */
background-color: #1D1F21;
color: #C5C8C6;

Expand Down