From 36191c500f04dd2a08f0ee771ed7c0e309aa7102 Mon Sep 17 00:00:00 2001 From: Alexander Harding <2166114+aeharding@users.noreply.github.com> Date: Tue, 7 Feb 2023 08:32:37 -0600 Subject: [PATCH] fix: prevent videos from clipping when in fullscreen mode (#1397) Co-authored-by: Tomasz Rymkiewicz --- components/status/StatusAttachment.vue | 1 + unocss.config.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/components/status/StatusAttachment.vue b/components/status/StatusAttachment.vue index 57418fb8..45aa8917 100644 --- a/components/status/StatusAttachment.vue +++ b/components/status/StatusAttachment.vue @@ -104,6 +104,7 @@ const userSettings = useUserSettings() controls rounded-lg object-cover + fullscreen:object-contain :width="attachment.meta?.original?.width" :height="attachment.meta?.original?.height" :style="{ diff --git a/unocss.config.ts b/unocss.config.ts index ad68e32b..0013a084 100644 --- a/unocss.config.ts +++ b/unocss.config.ts @@ -9,6 +9,8 @@ import { transformerVariantGroup, } from 'unocss' +import { variantParentMatcher } from '@unocss/preset-mini/utils' + export default defineConfig({ shortcuts: [ { @@ -119,6 +121,7 @@ export default defineConfig({ layer: 'native-mac', } }, + variantParentMatcher('fullscreen', '@media (display-mode: fullscreen)'), ], rules: [ // scrollbar-hide