From f96f0fb4084ee2a6bbe0c98cbd62e85b80b65a7b Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Thu, 16 Sep 2021 11:10:43 -0600 Subject: [PATCH] confine SVG referenced using object tag to enclosing container - apply max-width, height, display, and vertical-align properties to object[type="image/svg+xml"] selector - apply fallback width to object[type="image/svg+xml"] selector when width is not specified (only works in Chrome) --- preview-src/index.adoc | 2 +- src/css/base.css | 4 ++++ src/css/doc.css | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/preview-src/index.adoc b/preview-src/index.adoc index be6ee80..8ad0774 100644 --- a/preview-src/index.adoc +++ b/preview-src/index.adoc @@ -273,7 +273,7 @@ Est in reque homero principes, meis deleniti mediocrem ad has. Ex nam suas nemore dignissim, vel apeirian democritum et. .Antora is a multi-repo documentation site generator -image::multirepo-ssg.svg[Multirepo SSG,300,225] +image::multirepo-ssg.svg[Multirepo SSG,3000,opts=interactive] Make the switch today! diff --git a/src/css/base.css b/src/css/base.css index ab8d9f1..047c591 100644 --- a/src/css/base.css +++ b/src/css/base.css @@ -98,6 +98,10 @@ table { word-wrap: normal; /* table widths aren't computed as expected when word-wrap is enabled */ } +object[type="image/svg+xml"]:not([width]) { + width: fit-content; +} + @supports (scrollbar-width: thin) { body * { scrollbar-width: thin; diff --git a/src/css/doc.css b/src/css/doc.css index 354aabd..c01118e 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -393,6 +393,7 @@ h1.page + aside.toc.embedded { } .doc .imageblock img, +.doc .imageblock object[type="image/svg+xml"], .doc .image > img { display: inline-block; height: auto; -- 2.11.0