From d13b0349e23c6e8572ff710aa1a96cd430fcc930 Mon Sep 17 00:00:00 2001 From: Adam DeHaven Date: Fri, 22 Dec 2023 21:16:46 -0500 Subject: [PATCH] fix: split and preview modes --- src/components/MarkdownUi.vue | 18 ++++++++++ src/components/toolbar/InfoTooltip.vue | 4 ++- src/components/toolbar/MarkdownToolbar.vue | 39 ++++++++++++++++++---- 3 files changed, 54 insertions(+), 7 deletions(-) diff --git a/src/components/MarkdownUi.vue b/src/components/MarkdownUi.vue index c302486d..128933b1 100644 --- a/src/components/MarkdownUi.vue +++ b/src/components/MarkdownUi.vue @@ -450,6 +450,24 @@ const markdownEditorMaxHeight = computed((): string => `${props.editorMaxHeight} } } + // Ensure split mode is never enabled below tablet + &.mode-edit { + .markdown-preview { + @media (max-width: ($kui-breakpoint-tablet - 1px)) { + display: none !important; + } + } + } + + // Ensure split mode is never enabled below tablet + &.mode-preview { + .markdown-preview { + @media (max-width: ($kui-breakpoint-tablet - 1px)) { + display: flex !important; + } + } + } + .markdown-editor, .markdown-preview { display: flex; diff --git a/src/components/toolbar/InfoTooltip.vue b/src/components/toolbar/InfoTooltip.vue index 582f0357..785f439b 100644 --- a/src/components/toolbar/InfoTooltip.vue +++ b/src/components/toolbar/InfoTooltip.vue @@ -33,7 +33,9 @@ defineProps({ &:hover, &:focus-within { .tooltip-content { - opacity: 1; + @media (min-width: $kui-breakpoint-mobile) { + opacity: 1; + } } } } diff --git a/src/components/toolbar/MarkdownToolbar.vue b/src/components/toolbar/MarkdownToolbar.vue index a9218403..23115f43 100644 --- a/src/components/toolbar/MarkdownToolbar.vue +++ b/src/components/toolbar/MarkdownToolbar.vue @@ -17,6 +17,7 @@ Edit