Skip to content

Build your personal knowledge base with Trilium Notes

fix(layout): weird title in full-width & attachments

Elian Doran737711e5eb72
diff --git a/apps/client/src/widgets/note_title.css b/apps/client/src/widgets/note_title.css
index 7d39b6b023..566fb72d32 100644
--- a/apps/client/src/widgets/note_title.css
+++ b/apps/client/src/widgets/note_title.css
@@ -29,30 +29,39 @@ body.desktop .note-title-widget input.note-title {
font-size: 180%;
}
-body.experimental-feature-new-layout .title-row,
-body.experimental-feature-new-layout .title-details {
- max-width: var(--max-content-width);
-}
+body.experimental-feature-new-layout {
+ .title-row,
+ .title-details {
+ max-width: var(--max-content-width);
+ }
-body.experimental-feature-new-layout .title-row {
- margin-top: 2em;
- margin-left: 12px;
-}
+ .title-row {
+ margin-top: 2em;
+ margin-left: 12px;
+ }
-body.experimental-feature-new-layout .title-details {
- margin-top: 0;
- contain: none;
- padding: 0;
- padding-inline-start: 24px;
- opacity: 0.85;
- display: flex;
- gap: 0.25em;
- margin: 0;
- list-style-type: none;
- margin-bottom: 2em;
-}
+ .title-details {
+ margin-top: 0;
+ contain: none;
+ padding: 0;
+ padding-inline-start: 24px;
+ opacity: 0.85;
+ display: flex;
+ gap: 0.25em;
+ margin: 0;
+ list-style-type: none;
+ margin-bottom: 2em;
+ }
+
+ .scrolling-container:has(> :is(.note-detail.full-height, .note-list-widget.full-height)) {
+ .title-row,
+ .title-details {
+ width: 100%;
+ }
+ }
-body.experimental-feature-new-layout.prefers-centered-content .title-row,
-body.experimental-feature-new-layout.prefers-centered-content .title-details {
- margin-inline: auto;
+ &.prefers-centered-content .title-row,
+ &.prefers-centered-content .title-details {
+ margin-inline: auto;
+ }
}