53 lines
871 B
SCSS
Raw Normal View History

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