diff --git a/src/App.svelte b/src/App.svelte index 58949ea..10bc8f0 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -348,9 +348,9 @@
-
+
- +
{#snippet saveIcon()} @@ -579,20 +579,37 @@ box-shadow: var(--shadow); } + /* With the extended toolbar visible the header merges into it: the divider and + elevation move to the extended toolbar so they read as one toolbar. */ + header.expanded { + border-bottom: none; + box-shadow: none; + } + + /* Anchored to a fixed offset from the header top (align-self + margin-top) + instead of vertically centered, so toggling the extended toolbar — which + changes the header height — doesn't shift the logo. The offset centers it on + the top toolbar's button row (padding-top 0.5rem + half the 2rem button). */ .app-logo { - height: 20px; + height: 17px; width: auto; - margin: 0 0.5rem 0 0.75rem; + align-self: flex-start; + margin: 0.95rem 0.5rem 0 0.75rem; opacity: 1.0; flex-shrink: 0; } + /* Pinned to the top (like .app-logo) so the changing header height when the + extended toolbar toggles doesn't shift it. margin-top matches the top + toolbar's padding so the buttons share the same baseline. */ .header-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; margin-right: 1rem; + align-self: flex-start; + margin-top: 0.5rem; } .file-actions { diff --git a/src/lib/editor/Toolbar.svelte b/src/lib/editor/Toolbar.svelte index dd46fb6..63997fd 100644 --- a/src/lib/editor/Toolbar.svelte +++ b/src/lib/editor/Toolbar.svelte @@ -4,7 +4,7 @@ import AlignButton from './AlignButton.svelte'; import { ORDERED_LIST_TYPES, DEFAULT_ORDERED_TYPE, type OrderedListType } from './orderedListTypes'; - let { editor, tick }: { editor: Editor | null; tick: number } = $props(); + let { editor, tick, expanded = false }: { editor: Editor | null; tick: number; expanded?: boolean } = $props(); // $derived re-evaluates whenever `tick` changes (i.e. on every TipTap transaction) let isH1 = $derived(tick >= 0 && !!editor?.isActive('heading', { level: 1 })); @@ -53,7 +53,7 @@ } -
+
{#if editor}