From 82dde941d24ce499a08caaddf27af875eb8e558f Mon Sep 17 00:00:00 2001 From: Matthias Metelka <62722460+kleinerpirat@users.noreply.github.com> Date: Tue, 9 Aug 2022 00:23:58 +0200 Subject: [PATCH] Show HTML toggle when PlainTextInput is active, regardless of hover/focus --- ts/editor/PlainTextBadge.svelte | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ts/editor/PlainTextBadge.svelte b/ts/editor/PlainTextBadge.svelte index 6cce48455..095870c9f 100644 --- a/ts/editor/PlainTextBadge.svelte +++ b/ts/editor/PlainTextBadge.svelte @@ -67,8 +67,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html } } - .plain-text-toggle.on::before { - background: linear-gradient(to bottom, var(--frame-bg) 50%, var(--code-bg) 0%); + .plain-text-toggle.on { + opacity: 1; + color: var(--text-fg); + &::before { + right: 0px; + left: -1px; + + background: linear-gradient( + to bottom, + var(--frame-bg) 50%, + var(--code-bg) 0% + ); + } } .plain-text-toggle.off::before { background: linear-gradient( @@ -89,9 +100,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html } } } - .plain-text-toggle.on { - color: var(--text-fg); - } } .clickable {