From c372e22b8da0ae4bc97a56304bfa137af4f793d2 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 30 Nov 2021 18:28:38 -0800 Subject: [PATCH] don't override an explicit width or height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I placed an image in my slide using `style='position: absolute...'` and explicit `width` and `height` attributes but it didn't show up. Turns out markdown wrapped it in a `

`, whose size was then zero… which then forced the image size to zero. --- css/theme/template/theme.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/css/theme/template/theme.scss b/css/theme/template/theme.scss index bc377d3cb84..4a4603f9c37 100644 --- a/css/theme/template/theme.scss +++ b/css/theme/template/theme.scss @@ -93,8 +93,12 @@ .reveal img, .reveal video, .reveal iframe { - max-width: 95%; - max-height: 95%; + &:not([width]) { + max-width: 95%; + } + &:not([height]) { + max-height: 95%; + } } .reveal strong, .reveal b {