Skip to content

Commit b5de9a6

Browse files
committed
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)
1 parent 10b9c98 commit b5de9a6

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

preview-src/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Est in reque homero principes, meis deleniti mediocrem ad has.
275275
Ex nam suas nemore dignissim, vel apeirian democritum et.
276276

277277
.Antora is a multi-repo documentation site generator
278-
image::multirepo-ssg.svg[Multirepo SSG,300]
278+
image::multirepo-ssg.svg[Multirepo SSG,3000,opts=interactive]
279279

280280
Make the switch today!
281281

src/css/base.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ table {
100100
word-wrap: normal; /* table widths aren't computed as expected when word-wrap is enabled */
101101
}
102102

103+
object[type="image/svg+xml"]:not([width]) {
104+
width: fit-content;
105+
}
106+
103107
::placeholder {
104108
opacity: 0.5;
105109
}

src/css/doc.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@
460460
}
461461

462462
.doc .imageblock img,
463+
.doc .imageblock object[type="image/svg+xml"],
463464
.doc .image > img {
464465
display: inline-block;
465466
height: auto;

0 commit comments

Comments
 (0)