Simplify rendering to css-only
This commit is contained in:
parent
0746fab09d
commit
a93d5cde09
2 changed files with 7 additions and 8 deletions
|
@ -14,9 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
:root {
|
$roomListCollapsedWidth: 68px;
|
||||||
--room-list-collapsed-width: 68px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MatrixChat--with-avatar {
|
.mx_MatrixChat--with-avatar {
|
||||||
.mx_LeftPanel,
|
.mx_LeftPanel,
|
||||||
|
@ -34,6 +32,10 @@ limitations under the License.
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
&[data-collapsed] {
|
||||||
|
max-width: $roomListCollapsedWidth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +210,7 @@ limitations under the License.
|
||||||
width: unset !important;
|
width: unset !important;
|
||||||
|
|
||||||
.mx_LeftPanel_roomListContainer {
|
.mx_LeftPanel_roomListContainer {
|
||||||
width: var(--room-list-collapsed-width);
|
width: $roomListCollapsedWidth;
|
||||||
|
|
||||||
.mx_LeftPanel_userHeader {
|
.mx_LeftPanel_userHeader {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
|
@ -686,10 +686,7 @@ class LoggedInView extends React.Component<IProps, IState> {
|
||||||
<div
|
<div
|
||||||
className="mx_LeftPanel_wrapper--user"
|
className="mx_LeftPanel_wrapper--user"
|
||||||
ref={this._resizeContainer}
|
ref={this._resizeContainer}
|
||||||
style={{
|
data-collapsed={this.props.collapseLhs ? true : undefined}
|
||||||
maxWidth: this.props.collapseLhs ? getComputedStyle(document.documentElement)
|
|
||||||
.getPropertyValue('--room-list-collapsed-width') : undefined,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<LeftPanel
|
<LeftPanel
|
||||||
isMinimized={this.props.collapseLhs || false}
|
isMinimized={this.props.collapseLhs || false}
|
||||||
|
|
Loading…
Reference in a new issue