2016-02-15 08:27:41 -06:00
|
|
|
//
|
|
|
|
// Code (inline and blocK)
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Inline and block code styles
|
|
|
|
code,
|
|
|
|
pre {
|
|
|
|
@include font-family-monospace();
|
2016-02-16 03:42:06 -06:00
|
|
|
font-size: $font-size-base - 2;
|
2016-02-16 02:42:46 -06:00
|
|
|
background-color: $code-tag-bg;
|
|
|
|
color: $text-color;
|
2016-04-14 10:38:07 -05:00
|
|
|
border: 1px solid $code-tag-border;
|
2016-03-28 17:37:02 -05:00
|
|
|
border-radius: 4px;
|
2016-02-15 08:27:41 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// Inline code
|
|
|
|
code {
|
2016-03-28 17:37:02 -05:00
|
|
|
color: $text-color;
|
2016-02-15 08:27:41 -06:00
|
|
|
white-space: nowrap;
|
2016-04-15 13:58:20 -05:00
|
|
|
padding: 2px 5px;
|
|
|
|
margin: 0 2px;
|
2016-02-15 08:27:41 -06:00
|
|
|
}
|
|
|
|
|
2016-04-11 18:01:18 -05:00
|
|
|
code.code--small {
|
|
|
|
font-size: $font-size-xs;
|
2019-03-21 09:44:14 -05:00
|
|
|
padding: $space-xxs;
|
2016-04-11 18:01:18 -05:00
|
|
|
margin: 0 2px;
|
|
|
|
}
|
|
|
|
|
2016-02-15 08:27:41 -06:00
|
|
|
// Blocks of code
|
|
|
|
pre {
|
|
|
|
display: block;
|
2016-03-28 17:37:02 -05:00
|
|
|
margin: 0 0 $line-height-base;
|
2016-02-16 03:42:06 -06:00
|
|
|
line-height: $line-height-base;
|
2016-02-15 08:27:41 -06:00
|
|
|
word-break: break-all;
|
|
|
|
word-wrap: break-word;
|
|
|
|
white-space: pre;
|
|
|
|
white-space: pre-wrap;
|
2016-03-28 17:37:02 -05:00
|
|
|
background-color: $code-tag-bg;
|
2016-04-16 11:03:29 -05:00
|
|
|
padding: 10px;
|
2016-02-15 08:27:41 -06:00
|
|
|
|
2021-04-23 07:06:30 -05:00
|
|
|
&.pre--no-style {
|
|
|
|
background: transparent;
|
|
|
|
border: none;
|
|
|
|
padding: 0px;
|
|
|
|
}
|
|
|
|
|
2016-02-15 08:27:41 -06:00
|
|
|
// Make prettyprint styles more spaced out for readability
|
|
|
|
&.prettyprint {
|
2016-02-16 03:42:06 -06:00
|
|
|
margin-bottom: $line-height-base;
|
2016-02-15 08:27:41 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// Account for some code outputs that place code tags in pre tags
|
|
|
|
code {
|
|
|
|
padding: 0;
|
|
|
|
color: inherit;
|
|
|
|
white-space: pre;
|
|
|
|
white-space: pre-wrap;
|
|
|
|
background-color: transparent;
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
}
|