diff --git a/_includes/blocks/code.liquid b/_includes/blocks/code.liquid new file mode 100644 index 0000000..77e69d8 --- /dev/null +++ b/_includes/blocks/code.liquid @@ -0,0 +1,4 @@ +{% capture content %} +{{ include.content }} +{% endcapture %} +{% include blocks/_base.liquid type="code" content=content float=include.float align=include.align %} diff --git a/_sass/_block-code.scss b/_sass/_block-code.scss new file mode 100644 index 0000000..f8758ee --- /dev/null +++ b/_sass/_block-code.scss @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------- +// Block: Code +// -------------------------------------------------------------------------------- +.block-code { + padding: .2rem; + background: $theme-code-background; + font-size: 0.9em; +} + +.block-code > .content { + display: block; + padding: .25rem; + max-height: 10em; + font-family: monospace; + font-size: 0.9em; + line-height: 1.25em; + white-space: pre; + overflow: auto; +} + +// -------------------------------------------------------------------------------- +// Inline: Code +// -------------------------------------------------------------------------------- +.inline-code { + margin: 0; + padding: 0; + background: $theme-code-background; + font-size: 0.9em; + font-family: monospace; + font-size: 1em; + line-height: 1.25em; + white-space: pre; +} diff --git a/_sass/_blocks.scss b/_sass/_blocks.scss index 97c552c..adb4d67 100644 --- a/_sass/_blocks.scss +++ b/_sass/_blocks.scss @@ -99,26 +99,10 @@ padding: .2em 0 0 0; } -// -------------------------------------------------------------------------------- -// Block: Code -// -------------------------------------------------------------------------------- -.block-code { - padding: .2rem; - background: $theme-code-background; - font-size: 0.9em; -} - -.inline-code { - margin: 0; - padding: 0; - background: $theme-code-background; - font-size: 0.9em; -} - - // -------------------------------------------------------------------------------- // Specialized Blocks // -------------------------------------------------------------------------------- +@import "_block-code.scss"; @import "_block-columns.scss"; @import "_block-details.scss"; @import "_block-heading.scss";