|
| 1 | +/* |
| 2 | +Copyright 2020 The Matrix.org Foundation C.I.C. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | + |
| 17 | +.mx_LeftPanelWidget { |
| 18 | + // largely based on RoomSublist |
| 19 | + margin-left: 8px; |
| 20 | + margin-bottom: 4px; |
| 21 | + |
| 22 | + .mx_LeftPanelWidget_headerContainer { |
| 23 | + display: flex; |
| 24 | + align-items: center; |
| 25 | + |
| 26 | + height: 24px; |
| 27 | + color: $roomlist-header-color; |
| 28 | + margin-top: 4px; |
| 29 | + |
| 30 | + .mx_LeftPanelWidget_stickable { |
| 31 | + flex: 1; |
| 32 | + max-width: 100%; |
| 33 | + |
| 34 | + display: flex; |
| 35 | + align-items: center; |
| 36 | + } |
| 37 | + |
| 38 | + .mx_LeftPanelWidget_headerText { |
| 39 | + flex: 1; |
| 40 | + max-width: calc(100% - 16px); |
| 41 | + line-height: $font-16px; |
| 42 | + font-size: $font-13px; |
| 43 | + font-weight: 600; |
| 44 | + |
| 45 | + // Ellipsize any text overflow |
| 46 | + text-overflow: ellipsis; |
| 47 | + overflow: hidden; |
| 48 | + white-space: nowrap; |
| 49 | + |
| 50 | + .mx_LeftPanelWidget_collapseBtn { |
| 51 | + display: inline-block; |
| 52 | + position: relative; |
| 53 | + width: 14px; |
| 54 | + height: 14px; |
| 55 | + margin-right: 6px; |
| 56 | + |
| 57 | + &::before { |
| 58 | + content: ''; |
| 59 | + width: 18px; |
| 60 | + height: 18px; |
| 61 | + position: absolute; |
| 62 | + mask-position: center; |
| 63 | + mask-size: contain; |
| 64 | + mask-repeat: no-repeat; |
| 65 | + background-color: $roomlist-header-color; |
| 66 | + mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); |
| 67 | + } |
| 68 | + |
| 69 | + &.mx_LeftPanelWidget_collapseBtn_collapsed::before { |
| 70 | + transform: rotate(-90deg); |
| 71 | + } |
| 72 | + } |
| 73 | + } |
| 74 | + } |
| 75 | + |
| 76 | + .mx_LeftPanelWidget_resizeBox { |
| 77 | + position: relative; |
| 78 | + |
| 79 | + display: flex; |
| 80 | + flex-direction: column; |
| 81 | + overflow: visible; // let the resize handle out |
| 82 | + } |
| 83 | + |
| 84 | + .mx_AppTileFullWidth { |
| 85 | + flex: 1 0 0; |
| 86 | + overflow: hidden; |
| 87 | + // need this to be flex otherwise the overflow hidden from above |
| 88 | + // sometimes vertically centers the clipped list ... no idea why it would do this |
| 89 | + // as the box model should be top aligned. Happens in both FF and Chromium |
| 90 | + display: flex; |
| 91 | + flex-direction: column; |
| 92 | + box-sizing: border-box; |
| 93 | + |
| 94 | + mask-image: linear-gradient(0deg, transparent, black 4px); |
| 95 | + } |
| 96 | + |
| 97 | + .mx_LeftPanelWidget_resizerHandle { |
| 98 | + cursor: ns-resize; |
| 99 | + border-radius: 3px; |
| 100 | + |
| 101 | + // Override styles from library |
| 102 | + width: unset !important; |
| 103 | + height: 4px !important; |
| 104 | + |
| 105 | + position: absolute; |
| 106 | + top: -24px !important; // override from library - puts it in the margin-top of the headerContainer |
| 107 | + |
| 108 | + // Together, these make the bar 64px wide |
| 109 | + // These are also overridden from the library |
| 110 | + left: calc(50% - 32px) !important; |
| 111 | + right: calc(50% - 32px) !important; |
| 112 | + } |
| 113 | + |
| 114 | + &:hover .mx_LeftPanelWidget_resizerHandle { |
| 115 | + opacity: 0.8; |
| 116 | + background-color: $primary-fg-color; |
| 117 | + } |
| 118 | + |
| 119 | + .mx_LeftPanelWidget_maximizeButton { |
| 120 | + margin-left: 8px; |
| 121 | + margin-right: 7px; |
| 122 | + position: relative; |
| 123 | + width: 24px; |
| 124 | + height: 24px; |
| 125 | + border-radius: 32px; |
| 126 | + |
| 127 | + &::before { |
| 128 | + content: ''; |
| 129 | + width: 16px; |
| 130 | + height: 16px; |
| 131 | + position: absolute; |
| 132 | + top: 4px; |
| 133 | + left: 4px; |
| 134 | + mask-position: center; |
| 135 | + mask-size: contain; |
| 136 | + mask-repeat: no-repeat; |
| 137 | + mask-image: url('$(res)/img/feather-customised/widget/maximise.svg'); |
| 138 | + background: $muted-fg-color; |
| 139 | + } |
| 140 | + } |
| 141 | +} |
| 142 | + |
| 143 | +.mx_LeftPanelWidget_maximizeButtonTooltip { |
| 144 | + margin-top: -3px; |
| 145 | +} |
0 commit comments