Skip to content

Commit

Permalink
Added style as input attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Titiftw committed Oct 11, 2024
1 parent 9d0350c commit 4eab014
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions frontend/src/lib/editor/MediaComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SPDX-License-Identifier: MPL-2.0
export let src: string;
export let css_classes = 'max-h-64 h-auto w-auto';
export let css_style = '';
export let added_thumbhash_classes = 'h-full';
export let muted = true;
export let allow_fullscreen = true;
Expand Down Expand Up @@ -71,11 +72,13 @@ SPDX-License-Identifier: MPL-2.0
src={img_data.data}
alt={img_data.alt_text ?? 'Not available'}
class={css_classes}
style={css_style}
on:click={() => open_fullscreen()}
/>
{:else if type === 'video'}
<video
class={css_classes}
style={css_style}
disablepictureinpicture
x-webkit-airplay="deny"
controls
Expand Down
7 changes: 1 addition & 6 deletions frontend/src/lib/play/question.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,6 @@ SPDX-License-Identifier: MPL-2.0
width: 35%;
}
}
.object-cover {
-o-object-fit: cover;
object-fit: cover;
max-height: 40vh !important;
}
</style>

<div class="h-screen w-screen">
Expand All @@ -177,7 +172,7 @@ SPDX-License-Identifier: MPL-2.0
<MediaComponent
src={question.image}
css_classes="object-cover mx-auto mb-8 max-h-[90%]"
style="max-height: 40vh !important;"
css_style="max-height: 40vh !important;"
/>
</div>
{/if}
Expand Down

0 comments on commit 4eab014

Please sign in to comment.