feat(layout): respect content width for title

This commit is contained in:
Elian Doran 2025-12-09 20:22:31 +02:00
parent e2b6d0c256
commit 394f6c3110
No known key found for this signature in database
2 changed files with 11 additions and 0 deletions

View File

@ -28,3 +28,12 @@ body.mobile .note-title-widget input.note-title {
body.desktop .note-title-widget input.note-title {
font-size: 180%;
}
body.experimental-feature-new-layout .title-row {
margin-top: 1em;
max-width: var(--max-content-width);
}
body.experimental-feature-new-layout.prefers-centered-content .title-row {
margin-inline: auto;
}

View File

@ -16,6 +16,7 @@ import FormattingToolbar from "./FormattingToolbar";
import options from "../../services/options";
import { t } from "../../services/i18n";
import { TabConfiguration } from "./ribbon-interface";
import { isExperimentalFeatureEnabled } from "../../services/experimental_features";
export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [
{
@ -23,6 +24,7 @@ export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [
icon: "bx bx-text",
show: async ({ note, noteContext }) => note?.type === "text"
&& options.get("textNoteEditorType") === "ckeditor-classic"
&& !isExperimentalFeatureEnabled("new-layout")
&& !(await noteContext?.isReadOnly()),
toggleCommand: "toggleRibbonTabClassicEditor",
content: FormattingToolbar,