Skip to content

Commit

Permalink
[AsciiDoc] Use object-contain on image blocks (#66)
Browse files Browse the repository at this point in the history
* Use `object-contain`

* Build
  • Loading branch information
benjaminleonard authored Feb 14, 2024
1 parent ac54c65 commit fb58a77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
13 changes: 6 additions & 7 deletions components/dist/asciidoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
13 changes: 6 additions & 7 deletions components/src/assets/asciidoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fb58a77

Please sign in to comment.