fix: align TitleField with editor by sharing scroll container

Move title-section inside a shared .editor-scroll-area wrapper so both
title and editor content center within the same scrollable context,
fixing alignment drift at wide widths caused by scrollbar offset.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Test
2026-03-18 21:32:03 +01:00
parent 210f2f6916
commit e5177f5905
3 changed files with 105 additions and 44 deletions

View File

@@ -23,11 +23,19 @@
opacity: 0.55;
}
/* Scroll area wrapping title + editor — single scroll context for alignment */
.editor-scroll-area {
flex: 1;
min-height: 0;
overflow-y: auto;
display: flex;
flex-direction: column;
}
/* BlockNote container */
.editor__blocknote-container {
flex: 1;
min-height: 0;
overflow-y: auto;
display: flex;
justify-content: center;
position: relative;
@@ -162,9 +170,23 @@
opacity: 1 !important;
}
/* --- Title Section: wraps icon + title + separator, aligned to editor --- */
.title-section {
width: 100%;
max-width: var(--editor-max-width, 760px);
margin: 0 auto;
padding: 0 var(--editor-padding-horizontal, 40px);
flex-shrink: 0;
}
.title-section__separator {
border-bottom: 1px solid var(--border-primary, rgba(0, 0, 0, 0.08));
margin-top: 12px;
}
/* --- Note Icon Area --- */
.note-icon-area {
padding: 16px 54px 0;
padding: 16px 0 0;
flex-shrink: 0;
}
@@ -250,7 +272,7 @@
/* --- Title Field --- */
.title-field {
padding: 4px 54px 0;
padding: 4px 0 0;
flex-shrink: 0;
}