confine SVG referenced using object tag to enclosing container
authorDan Allen <dan@opendevise.com>
Thu, 16 Sep 2021 17:10:43 +0000 (11:10 -0600)
committerDan Allen <dan@opendevise.com>
Thu, 16 Sep 2021 17:37:44 +0000 (11:37 -0600)
- 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
src/css/base.css
src/css/doc.css

index be6ee80..8ad0774 100644 (file)
@@ -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!
 
index ab8d9f1..047c591 100644 (file)
@@ -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;
index 354aabd..c01118e 100644 (file)
@@ -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;