From 868f2dfc6213911dbc080d4521ff8656bd613adc Mon Sep 17 00:00:00 2001 From: Alexander Petkov Date: Mon, 18 Sep 2023 11:48:41 +0300 Subject: [PATCH] QuillStyleWrapper: Make iframe responsive when inserted via MDXEditor MDXEditor doesn't add the ql-video class to the iframe element, resulting in layout break on smaller viewports --- src/components/common/QuillStyleWrapper.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/common/QuillStyleWrapper.tsx b/src/components/common/QuillStyleWrapper.tsx index f436f6976..c571dd48d 100644 --- a/src/components/common/QuillStyleWrapper.tsx +++ b/src/components/common/QuillStyleWrapper.tsx @@ -15,7 +15,8 @@ export const QuillStypeWrapper = styled(Grid)(({ theme }) => ({ ['.ql-editor, .ql-video']: { maxWidth: '100%', }, - ['.ql-video']: { + + ['.ql-video, iframe']: { maxWidth: '100%', marginInline: 'auto', },