Skip to content

Commit

Permalink
fix: fit image to a slide height
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Apr 15, 2024
1 parent 0e453d1 commit 9cfa6ef
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:class="{ 'dark-mode': isDarkMode }"
>
<div class="reveal">
<div ref="slideContainer" class="slides">
<div ref="slideContainer" id="slideContainer" class="slides">
<section
:data-markdown="url"
:data-separator="dataSeparator"
Expand Down Expand Up @@ -169,4 +169,31 @@ async function getBlobUrl(url: string) {
}
}
}
#slideContainer {
section {
display: flex !important;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
> * {
margin-top: 0;
}
p:has(img) {
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
img {
width: auto;
height: auto;
}
}
}
}
</style>

0 comments on commit 9cfa6ef

Please sign in to comment.