Skip to content

Commit

Permalink
[docs] Avoid layout jump
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 27, 2020
1 parent 72e9930 commit 9fd33cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/src/modules/components/MarkdownDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import { pageToTitleI18n } from 'docs/src/modules/utils/helpers';
import Link from 'docs/src/modules/components/Link';

const styles = theme => ({
root: {
width: '100%',
},
container: {
position: 'relative',
},
Expand Down Expand Up @@ -132,7 +135,7 @@ function MarkdownDocs(props) {
</Portal>
)}
<div
className={clsx({
className={clsx(classes.root, {
[classes.ad]: !disableAd,
[classes.toc]: !disableToc,
})}
Expand Down
2 changes: 2 additions & 0 deletions docs/src/modules/components/MarkdownElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ const styles = theme => ({
'& code[class*="language-"]': {
backgroundColor: '#272c34',
color: '#fff',
// Avoid layout jump after hydration (style injected by prism)
lineHeight: 1.5,
},
'& p code, & ul code, & pre code': {
fontSize: 14,
Expand Down

0 comments on commit 9fd33cc

Please sign in to comment.