client: rework max content width handling

This commit is contained in:
Adorian Doran 2025-10-30 00:23:41 +02:00
parent e510653edb
commit 1ef03b7a77
4 changed files with 8 additions and 3 deletions

View File

@ -1809,12 +1809,15 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
} }
.note-split { .note-split {
/* Limits the maximum width of the note */
--max-content-width: var(--preferred-max-content-width);
margin-inline-start: auto; margin-inline-start: auto;
margin-inline-end: auto; margin-inline-end: auto;
} }
.note-split.full-content-width { .note-split.full-content-width {
max-width: 999999px; --max-content-width: unset;
} }
button.close:hover { button.close:hover {

View File

@ -1,5 +1,6 @@
.note-list-widget { .note-list-widget {
min-height: 0; min-height: 0;
max-width: var(--max-content-width); /* Inherited from .note-split */
overflow: auto; overflow: auto;
contain: none !important; contain: none !important;
} }

View File

@ -39,6 +39,7 @@ const TPL = /*html*/`
<div class="note-detail"> <div class="note-detail">
<style> <style>
.note-detail { .note-detail {
max-width: var(--max-content-width); /* Inherited from .note-split */
font-family: var(--detail-font-family); font-family: var(--detail-font-family);
font-size: var(--detail-font-size); font-size: var(--detail-font-size);
} }

View File

@ -29,8 +29,8 @@
<%- include("./partials/windowGlobal.ejs", locals) %> <%- include("./partials/windowGlobal.ejs", locals) %>
<style> <style>
.note-split { :root {
max-width: <%= maxContentWidth %>px; --preferred-max-content-width: <%= maxContentWidth %>px;
} }
</style> </style>