From fb58a774780efb5e5e29bb1029db7083f6d1477c Mon Sep 17 00:00:00 2001 From: Benjamin Leonard Date: Wed, 14 Feb 2024 16:48:23 +0000 Subject: [PATCH] [AsciiDoc] Use `object-contain` on image blocks (#66) * Use `object-contain` * Build --- components/dist/asciidoc.css | 13 ++++++------- components/src/assets/asciidoc.css | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/components/dist/asciidoc.css b/components/dist/asciidoc.css index 7a37c3a..7af8bae 100644 --- a/components/dist/asciidoc.css +++ b/components/dist/asciidoc.css @@ -40,11 +40,15 @@ @apply normal-case; } - .asciidoc-body img { - @apply mx-auto h-auto w-auto w-full rounded-lg border border-tertiary; + .asciidoc-body .imageblock img { + @apply mx-auto h-auto w-auto w-full rounded-lg border border-tertiary object-contain; max-height: max(500px, 75vh); } + .asciidoc-body span img { + @apply inline; + } + .asciidoc-body img.transparent-dark { @apply bg-secondary; } @@ -704,11 +708,6 @@ white-space: pre-wrap; } - .asciidoc-body img { - max-height: max(400px, 25vh); - margin-left: 0; - } - h1 { font-size: 3rem !important; line-height: 1 !important; diff --git a/components/src/assets/asciidoc.css b/components/src/assets/asciidoc.css index 7a37c3a..7af8bae 100644 --- a/components/src/assets/asciidoc.css +++ b/components/src/assets/asciidoc.css @@ -40,11 +40,15 @@ @apply normal-case; } - .asciidoc-body img { - @apply mx-auto h-auto w-auto w-full rounded-lg border border-tertiary; + .asciidoc-body .imageblock img { + @apply mx-auto h-auto w-auto w-full rounded-lg border border-tertiary object-contain; max-height: max(500px, 75vh); } + .asciidoc-body span img { + @apply inline; + } + .asciidoc-body img.transparent-dark { @apply bg-secondary; } @@ -704,11 +708,6 @@ white-space: pre-wrap; } - .asciidoc-body img { - max-height: max(400px, 25vh); - margin-left: 0; - } - h1 { font-size: 3rem !important; line-height: 1 !important;