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 {
/* Limits the maximum width of the note */
--max-content-width: var(--preferred-max-content-width);
margin-inline-start: auto;
margin-inline-end: auto;
}
.note-split.full-content-width {
max-width: 999999px;
--max-content-width: unset;
}
button.close:hover {

View File

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

View File

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

View File

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