diff --git a/examples/gatsbygram/components/post-detail.js b/examples/gatsbygram/components/post-detail.js
index 3cd3da112f34a..83a8c0b8926f5 100644
--- a/examples/gatsbygram/components/post-detail.js
+++ b/examples/gatsbygram/components/post-detail.js
@@ -89,7 +89,8 @@ class PostDetail extends React.Component {
width: `100%`,
[presets.Tablet]: {
flexDirection: `row-reverse`,
- }
+ marginTop: rhythm(1),
+ },
}}
>
750
) {
// Freeze the background from scrolling.
this.htmlElement.style.overflow = `hidden`
this.bodyElement.style.overflow = `hidden`
+ // Always set overflow-y to scroll so the scrollbar stays visible avoiding
+ // weird jumping.
+ this.htmlElement.style.overflowY = `scroll`
+
// Save the homepage if we haven't already.
if (!this.modalBackgroundChildren) {
this.modalBackgroundChildren = this.props.children
@@ -42,6 +47,10 @@ class DefaultLayout extends React.Component {
delete this.modalBackgroundChildren
this.htmlElement.style.overflow = `visible`
this.bodyElement.style.overflow = `visible`
+
+ // Always set overflow-y to scroll so the scrollbar stays visible avoiding
+ // weird jumping.
+ this.htmlElement.style.overflowY = `scroll`
}
}
@@ -68,9 +77,17 @@ class DefaultLayout extends React.Component {
paddingBottom: `calc(${rhythm(3/4)} - 1px)`,
maxWidth: 960,
margin: `0 auto`,
+ overflow: `hidden`,
}}
>
-
+
+
+ About
+
+ )
+ }
+}
+
+export default About
diff --git a/examples/gatsbygram/utils/typography.js b/examples/gatsbygram/utils/typography.js
index f094dae8c8d68..522f910ee2f8a 100644
--- a/examples/gatsbygram/utils/typography.js
+++ b/examples/gatsbygram/utils/typography.js
@@ -20,8 +20,11 @@ const options = {
headerFontFamily: [`Space Mono`, `sans-serif`],
bodyFontFamily: [`Space Mono`, `sans-serif`],
overrideStyles: () => ({
+ html: {
+ overflowY: `scroll`,
+ },
a: {
- textDecoration: `none`,
+ color: `#3897f0`,
}
})
}