From 7e5163402e7bcbc09507484261c00501dc646de3 Mon Sep 17 00:00:00 2001 From: ines Date: Tue, 23 May 2017 23:13:26 +0200 Subject: [PATCH] Allow clipping code block to height and add docs --- website/_includes/_mixins.jade | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/_includes/_mixins.jade b/website/_includes/_mixins.jade index f9960b71f..250865884 100644 --- a/website/_includes/_mixins.jade +++ b/website/_includes/_mixins.jade @@ -103,9 +103,11 @@ mixin button(url, trusted, ...style) label - [string] aside title (optional or false for no label) language - [string] language for syntax highlighting (default: "python") supports basic relevant languages available for PrismJS + icon - [string] icon to display next to code block, mostly used for old/new + height - [integer] optional height to clip code block to -mixin code(label, language, icon) - pre.c-code-block.o-block(class="lang-#{(language || DEFAULT_SYNTAX)}" class=icon ? "c-code-block--has-icon" : "")&attributes(attributes) +mixin code(label, language, icon, height) + pre.c-code-block.o-block(class="lang-#{(language || DEFAULT_SYNTAX)}" class=icon ? "c-code-block--has-icon" : "" style=height ? "height: #{height}px" : "")&attributes(attributes) if label h4.u-text-label.u-text-label--dark=label