// Copyright (c) 2017 Florian Klampfer
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
// <<<<< LINK
code, pre {
font-family: var(--code-font-family);
}
code {
@extend .color-transition;
padding: .25em .5em;
background-color: var(--gray-bg);
font-size: smaller;
}
.figure-base {
@extend .color-transition;
margin-left: -1rem;
margin-right: -1rem;
// Prevent code linebreaks and allow side-scrolling for better readability on mobile
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.pre-base {
@extend .figure-base;
padding: 1rem;
background-color: var(--gray-bg);
// HACK: prevents painting for some reason
backface-visibility: hidden;
@media print {
width: 100%!important;
page-break-inside: avoid;
break-inside: avoid-page;
}
}
pre {
@extend .pre-base;
margin-top: 0;
display: block;
line-height: 1.5;
font-size: .85em;
position: relative;
}
pre > code {
padding: 0;
color: inherit;
background-color: transparent;
font-size: 1em;
.highlight-code-line {
@extend .color-transition;
&:before { content: ' ' }
position: absolute;
left: 0;
display: inline-block;
width: 100%;
background: var(--border-color);
border-left: 3px solid var(--accent-color);
opacity: 0.33;
z-index: -1;
}
}
.pre-header {
@extend .color-transition;
display: block;
margin-left: -1rem;
margin-right: -1rem;
padding: 0.4rem 1rem 0.25rem;
border-bottom: 1px solid var(--border-color);
font-style: normal!important;
font-size: smaller;
color: var(--gray)!important;
background-color: var(--gray-bg);
.lang { color: var(--menu-text) }
}
.pre-header + pre.highlight {
padding-top: .75rem;
}
// >>>>> LINK