From af5d80459373893d4b650a47812edac8d033d7de Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Thu, 22 May 2025 20:39:51 +0300 Subject: [PATCH] style(next)/formatting toolbar: tweak the floating toolbar show / hide button --- .../src/stylesheets/theme-next/notes/text.css | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/client/src/stylesheets/theme-next/notes/text.css b/apps/client/src/stylesheets/theme-next/notes/text.css index c19420d72..d8c944bcf 100644 --- a/apps/client/src/stylesheets/theme-next/notes/text.css +++ b/apps/client/src/stylesheets/theme-next/notes/text.css @@ -10,7 +10,8 @@ * Toolbar */ -.ck.ck-toolbar { +.ck.ck-toolbar, +.ck.ck-block-toolbar-button { --ck-color-toolbar-background: transparent; --ck-color-button-default-background: transparent; @@ -19,6 +20,7 @@ --ck-color-button-on-background: transparent; --ck-color-button-on-hover-background: var(--hover-item-background-color); + --ck-color-button-default-active-background: var(--hover-item-background-color); --ck-focus-ring: 1px solid transparent; --ck-color-focus-border: var(--input-focus-outline-color); @@ -41,11 +43,19 @@ --ck-color-button-on-color: currentColor; } -:root .ck.ck-toolbar .ck-button:not(.ck-disabled):active { +/* The toolbar show / hide button for the current text block */ +.ck.ck-block-toolbar-button { + --ck-color-button-on-background: transparent; + --ck-color-button-on-color: currentColor; +} + +:root .ck.ck-toolbar .ck-button:not(.ck-disabled):active, +.ck.ck-block-toolbar-button:active { background-color: var(--hover-item-background-color); } -.ck.ck-toolbar .ck-button:active:not(.ck-list-item-button):not(.ck-button_with-text):not(.ck-disabled) svg:not(.ck-dropdown__arrow) { +.ck.ck-toolbar .ck-button:active:not(.ck-list-item-button):not(.ck-button_with-text):not(.ck-disabled) svg:not(.ck-dropdown__arrow), +.ck.ck-block-toolbar-button:active svg { transform: scale(.8); }