improve scrollable iframes

This commit is contained in:
Philipp Kühn 2021-02-02 21:42:09 +01:00
parent d382b6891c
commit 3ce615326e
2 changed files with 8 additions and 3 deletions

View File

@ -9,7 +9,7 @@
border-bottom-width: 0;
color: $colorBlack;
background-color: $colorWhite;
max-height: 50rem;
max-height: unquote("max(300px, 60vh)");
overflow: auto;
scroll-behavior: smooth;
border: 1px solid rgba($colorBlack, 0.1);

View File

@ -4,9 +4,9 @@
<div class="demo-frame__loader" />
</div>
<iframe
v-resize.quiet
class="demo-frame__iframe"
v-resize.quiet="{ scrolling: true }"
:src="`/demos/${name}?${query}`"
style="background-color: transparent;"
width="100%"
height="0"
frameborder="0"
@ -71,6 +71,11 @@ export default {
position: relative;
min-height: 5rem;
&__iframe {
background-color: transparent;
max-height: 100%;
}
&.is-inline {
border-radius: 0.75rem;
background-color: rgba($colorBlack, 0.03);