_sass/adoc-markup.scss in jekyll-theme-isotc211-0.3.1 vs _sass/adoc-markup.scss in jekyll-theme-isotc211-0.4
- old
+ new
@@ -1,13 +1,76 @@
// Asciidoctor-generated markup
// ============================
+@mixin padded-code-snippet() {
+ padding: 0 .75em;
+ margin: 0 .2em;
+ background: $codeListingBackgroundColor;
+
+ border: 1px dashed $codeListingBorderColor;
+ border-radius: .25em;
+
+ font-size: 15px;
+}
+
+@mixin padded-code-snippet--reset() {
+ padding: 0;
+ margin: 0;
+ background: transparent;
+ border: 0;
+ border-radius: 0;
+}
+
+@mixin code-snippet-container() {
+ overflow-x: scroll;
+ overflow-y: hidden;
+ line-height: 1.2;
+
+ @include padded-code-snippet();
+ padding-top: .5em;
+ padding-bottom: .5em;
+
+ border-width: 0 0 0 1px;
+ border-radius: 0 .25em .25em 0;
+
+ margin-top: 1em;
+ margin-bottom: 1em;
+
+ margin-left: -.1em;
+
+ > code {
+ // Avoid bad formatting in case of <code> element nested
+ // inside a <pre>
+ @include padded-code-snippet--reset();
+ }
+}
+
+@mixin code-snippet() {
+ color: lighten($textColor, 24);
+
+ @include padded-code-snippet();
+ margin-top: -1px;
+ margin-bottom: -1px;
+
+ code {
+ // Avoid bad formatting in case of <code> elements nested
+ // into each other (possible with adoc output)
+ @include padded-code-snippet--reset();
+ }
+}
+
@mixin asciidoc-markup() {
// Code listing
.paragraph code {
word-break: break-word;
+ }
+ code {
+ @include code-snippet();
+ }
+ pre {
+ @include code-snippet-container();
}
// Generic block title
.admonitionblock,