Skip to content

Commit

Permalink
Always include padding in regular literal blocks
Browse files Browse the repository at this point in the history
- This adds back in the original padding for literals
- This uses negative padding to remove it for rouge code blocks

Without the negative padding, code blocks get double padding.
  • Loading branch information
jboxman authored and openshift-cherrypick-robot committed Oct 1, 2020
1 parent dc0f294 commit 352a10c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _stylesheets/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ table > tbody > tr > td > div > div > p > code {
.literalblock pre, .literalblock pre[class], .listingblock pre, .listingblock pre[class] {
background-color: #f9f9f9;
border: 1px #aab7b8 solid;
padding: 0 0.5em;
padding: 1.75em 2em;
word-wrap: break-word;
color: #404040;
font-family: "Roboto Mono", monospace;
Expand All @@ -920,8 +920,10 @@ table > tbody > tr > td > div > div > p > code {
display: block;
}
/* this adds overflow for code blocks */
/* negative padding undoes the parent padding for .iteralblock pre */
.listingblock pre.rouge code {
padding: 22px;
margin: -1.75em -2em;
white-space: pre;
overflow-x: auto;
}
Expand Down

0 comments on commit 352a10c

Please sign in to comment.