fix: room header height alignment and docs icon toggle colour

- Replace height:100% on .mx_DocumentView with flex:1 + min-height:0.
  In the flex-column mx_RoomView_body, height:100% resolves to the full
  parent height (not the remaining space), causing the total content to
  exceed the container and flex-shrinking the 64px RoomHeader — making
  the bottom border appear at the wrong vertical position. flex:1 takes
  only the leftover space after the header.

- Add mx_RoomHeader_toggled class to DocumentIcon when isViewingDocument
  is true, matching the same pattern used by ToggleableIcon for Threads,
  Notifications, and RoomInfo buttons. The existing CSS rule
  .mx_RoomHeader .mx_RoomHeader_toggled { fill: --cpd-color-icon-accent-primary }
  then turns the icon green.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Langley 2026-03-04 22:35:14 +00:00
parent b3118d4859
commit 6c79900295
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,8 @@ Please see LICENSE files in the repository root for full details.
.mx_DocumentView {
display: flex;
flex-direction: column;
height: 100%;
flex: 1;
min-height: 0;
overflow: hidden;
background-color: var(--cpd-color-bg-canvas-default);
}

View File

@ -351,7 +351,7 @@ function RoomHeaderButtons({
aria-pressed={isViewingDocument}
onClick={toggleDocumentView}
>
<DocumentIcon />
<DocumentIcon className={isViewingDocument ? "mx_RoomHeader_toggled" : undefined} />
</IconButton>
</Tooltip>