From d2fa0af3c0c1d290e66c9093afcf33a26c2ed344 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Tue, 9 May 2023 08:32:16 +0000 Subject: [PATCH] Manage rules for `mx_RoomView` on `_RoomView.pcss` - `_ScrollPanel.pcss` (#10770) * Move style rules of `mx_RoomView_MessageList` from _ScrollPanel.pcss on _RoomView.pcss * Nesting: `mx_RoomView--local .mx_ScrollPanel` --- res/css/_components.pcss | 1 - res/css/structures/_RoomView.pcss | 16 +++++++++++++--- res/css/structures/_ScrollPanel.pcss | 27 --------------------------- 3 files changed, 13 insertions(+), 31 deletions(-) delete mode 100644 res/css/structures/_ScrollPanel.pcss diff --git a/res/css/_components.pcss b/res/css/_components.pcss index 9c223d873b..a0b2604da6 100644 --- a/res/css/_components.pcss +++ b/res/css/_components.pcss @@ -75,7 +75,6 @@ @import "./structures/_RoomSearch.pcss"; @import "./structures/_RoomStatusBar.pcss"; @import "./structures/_RoomView.pcss"; -@import "./structures/_ScrollPanel.pcss"; @import "./structures/_SearchBox.pcss"; @import "./structures/_SpaceHierarchy.pcss"; @import "./structures/_SpacePanel.pcss"; diff --git a/res/css/structures/_RoomView.pcss b/res/css/structures/_RoomView.pcss index 67626af287..91f2048b25 100644 --- a/res/css/structures/_RoomView.pcss +++ b/res/css/structures/_RoomView.pcss @@ -181,10 +181,20 @@ limitations under the License. li { clear: both; } -} -.mx_RoomView--local .mx_ScrollPanel .mx_RoomView_MessageList { - justify-content: center; + .mx_ScrollPanel & { + position: relative; + display: flex; + flex-direction: column; + justify-content: flex-end; + + content-visibility: auto; + contain-intrinsic-size: 50px; + } + + .mx_RoomView--local .mx_ScrollPanel & { + justify-content: center; + } } li.mx_RoomView_myReadMarker_container { diff --git a/res/css/structures/_ScrollPanel.pcss b/res/css/structures/_ScrollPanel.pcss deleted file mode 100644 index a668594bba..0000000000 --- a/res/css/structures/_ScrollPanel.pcss +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2019 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.mx_ScrollPanel { - .mx_RoomView_MessageList { - position: relative; - display: flex; - flex-direction: column; - justify-content: flex-end; - - content-visibility: auto; - contain-intrinsic-size: 50px; - } -}