Skip to content

Commit

Permalink
docs: make large code blocks more legible
Browse files Browse the repository at this point in the history
Components with large blocks of Default code
cause the table to extend beyond the page, making
it difficult to read. Make the code wrap properly
and allow the container to scroll.

As a specific example, this can be seen in the props
for Search.Result.
  • Loading branch information
redbmk committed Oct 20, 2017
1 parent 0a29f6c commit 48a2ed1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/app/Components/ComponentDoc/ComponentDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default class ComponentDoc extends Component {
{subComponentItems}
</div>
{selectedDocgen && (
<div>
<div style={{ overflowX: 'auto' }}>
{showSubDescription && (
<div style={subDescriptionStyle}>
{selectedDocgen.docBlock.description}
Expand Down
5 changes: 2 additions & 3 deletions docs/app/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,12 @@
}
code:not(.hljs) {
padding: 0;
padding-top: 0.1em;
padding-bottom: 0.2em;
margin: 0;
font-size: 87.5%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
white-space: pre;
display: inline-block;
}
code:not(.hljs)::before {
Expand Down

0 comments on commit 48a2ed1

Please sign in to comment.