2014-03-14 06:04:34 +01:00
|
|
|
%code-theme {
|
|
|
|
@include border-radius(4px);
|
|
|
|
border: 1px solid #ebebeb;
|
|
|
|
background: #f8f8f8;
|
|
|
|
color: $color-text-strong;
|
|
|
|
}
|
|
|
|
|
2013-10-09 12:30:53 +02:00
|
|
|
code,
|
|
|
|
pre {
|
2014-03-14 06:04:34 +01:00
|
|
|
@extend %code-theme;
|
2013-10-09 12:30:53 +02:00
|
|
|
@include font-size-small;
|
|
|
|
font: {
|
|
|
|
weight: $font-weight-regular;
|
|
|
|
family: $font-family-code;
|
|
|
|
}
|
|
|
|
white-space: pre-wrap;
|
2013-10-12 11:33:43 +02:00
|
|
|
@include box-sizing(border-box);
|
2013-02-09 04:10:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
code {
|
2013-10-09 12:30:53 +02:00
|
|
|
padding: .25em;
|
|
|
|
line-height: 0;
|
2012-11-28 17:23:08 +01:00
|
|
|
}
|
|
|
|
|
2014-03-14 06:04:34 +01:00
|
|
|
%pre-block {
|
|
|
|
@include rhythm(0, .5, .5, 0);
|
|
|
|
padding: {
|
|
|
|
right: 1em;
|
|
|
|
left: 1em;
|
|
|
|
}
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2012-11-28 17:23:08 +01:00
|
|
|
pre {
|
2014-03-14 06:04:34 +01:00
|
|
|
@extend %pre-block;
|
2013-10-09 12:30:53 +02:00
|
|
|
@include trailer;
|
|
|
|
@include rhythm(.5, .5, .5, .5);
|
2013-10-13 01:26:11 +02:00
|
|
|
@include bleed(1em);
|
2013-10-09 12:30:53 +02:00
|
|
|
overflow-y: auto;
|
2013-10-12 11:33:43 +02:00
|
|
|
margin: auto 0 25px;
|
2013-02-09 04:10:33 +01:00
|
|
|
|
2013-10-09 12:30:53 +02:00
|
|
|
// Account for some code outputs that place code tags in pre tags
|
2013-02-24 07:04:16 +01:00
|
|
|
code {
|
2013-10-09 12:30:53 +02:00
|
|
|
@extend %reset-padding;
|
2013-02-24 07:04:16 +01:00
|
|
|
background: none;
|
2013-10-09 12:30:53 +02:00
|
|
|
font-size: inherit;
|
|
|
|
line-height: inherit;
|
2013-02-24 07:04:16 +01:00
|
|
|
}
|
2013-10-12 11:33:43 +02:00
|
|
|
&.highlight .err {
|
2014-03-14 06:04:34 +01:00
|
|
|
background: none;
|
2013-10-12 11:33:43 +02:00
|
|
|
}
|
2013-02-24 07:04:16 +01:00
|
|
|
}
|