From cf88ca565825bb17a1b954db30cb1498e2a31b5c Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Wed, 8 Dec 2021 00:30:21 +0000 Subject: [PATCH] Custom style for release logos You can now use a figure shortcode to mark a release logo and get appropriate styles. --- assets/scss/_custom.scss | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/scss/_custom.scss b/assets/scss/_custom.scss index 5189b5da79..71f61c6ada 100644 --- a/assets/scss/_custom.scss +++ b/assets/scss/_custom.scss @@ -7,7 +7,7 @@ $announcement-size-adjustment: 8px; } main { - img { + *:not(figure) > img { max-width: 100%; } @@ -698,6 +698,26 @@ body.td-documentation { } } +figure { + > figcaption { + padding-top: 1em; + margin-bottom: 3em; + } +} + +// Clamp size for release logos +figure.release-logo { + > figcaption { + font-size: 1.8em; + } + > img { + max-width: 100%; + max-height: calc(max(40em,min(80vh,70em))); + height: auto; + width: auto; + } +} + // Match Docsy-imposed max width on text body @media (min-width: 1200px) {