|
| 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_BaseCard { |
| 18 | + padding: 0 8px; |
| 19 | + overflow: hidden; |
| 20 | + display: flex; |
| 21 | + flex-direction: column; |
| 22 | + flex: 1; |
| 23 | + |
| 24 | + .mx_BaseCard_header { |
| 25 | + margin: 8px 0; |
| 26 | + |
| 27 | + > h2 { |
| 28 | + margin: 0 44px; |
| 29 | + font-size: $font-18px; |
| 30 | + font-weight: $font-semi-bold; |
| 31 | + overflow: hidden; |
| 32 | + text-overflow: ellipsis; |
| 33 | + white-space: nowrap; |
| 34 | + } |
| 35 | + |
| 36 | + .mx_BaseCard_back, .mx_BaseCard_close { |
| 37 | + position: absolute; |
| 38 | + background-color: rgba(141, 151, 165, 0.2); |
| 39 | + height: 20px; |
| 40 | + width: 20px; |
| 41 | + margin: 12px; |
| 42 | + top: 0; |
| 43 | + |
| 44 | + &::before { |
| 45 | + content: ""; |
| 46 | + position: absolute; |
| 47 | + height: 20px; |
| 48 | + width: 20px; |
| 49 | + top: 0; |
| 50 | + left: 0; |
| 51 | + mask-repeat: no-repeat; |
| 52 | + mask-position: center; |
| 53 | + background-color: $rightpanel-button-color; |
| 54 | + } |
| 55 | + } |
| 56 | + |
| 57 | + .mx_BaseCard_back { |
| 58 | + border-radius: 4px; |
| 59 | + left: 0; |
| 60 | + |
| 61 | + &::before { |
| 62 | + transform: rotate(90deg); |
| 63 | + mask-size: 22px; |
| 64 | + mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); |
| 65 | + } |
| 66 | + } |
| 67 | + |
| 68 | + .mx_BaseCard_close { |
| 69 | + border-radius: 10px; |
| 70 | + right: 0; |
| 71 | + |
| 72 | + &::before { |
| 73 | + mask-image: url('$(res)/img/icons-close.svg'); |
| 74 | + mask-size: 8px; |
| 75 | + } |
| 76 | + } |
| 77 | + } |
| 78 | + |
| 79 | + .mx_AutoHideScrollbar { |
| 80 | + // collapse the margin into a padding to move the scrollbar into the right gutter |
| 81 | + margin-right: -8px; |
| 82 | + padding-right: 8px; |
| 83 | + min-height: 0; |
| 84 | + width: 100%; |
| 85 | + height: 100%; |
| 86 | + } |
| 87 | + |
| 88 | + .mx_BaseCard_Group { |
| 89 | + margin: 20px 0 16px; |
| 90 | + |
| 91 | + & > * { |
| 92 | + margin-left: 12px; |
| 93 | + margin-right: 12px; |
| 94 | + } |
| 95 | + |
| 96 | + > h1 { |
| 97 | + color: $tertiary-fg-color; |
| 98 | + font-size: $font-12px; |
| 99 | + font-weight: 500; |
| 100 | + } |
| 101 | + |
| 102 | + .mx_BaseCard_Button { |
| 103 | + padding: 10px 38px 10px 12px; |
| 104 | + margin: 0; |
| 105 | + position: relative; |
| 106 | + font-size: $font-13px; |
| 107 | + height: 20px; |
| 108 | + line-height: 20px; |
| 109 | + border-radius: 8px; |
| 110 | + overflow: hidden; |
| 111 | + white-space: nowrap; |
| 112 | + text-overflow: ellipsis; |
| 113 | + |
| 114 | + &:hover { |
| 115 | + background-color: rgba(141, 151, 165, 0.1); |
| 116 | + } |
| 117 | + |
| 118 | + &::after { |
| 119 | + content: ''; |
| 120 | + position: absolute; |
| 121 | + top: 10px; |
| 122 | + right: 6px; |
| 123 | + height: 20px; |
| 124 | + width: 20px; |
| 125 | + mask-repeat: no-repeat; |
| 126 | + mask-position: center; |
| 127 | + background-color: $icon-button-color; |
| 128 | + transform: rotate(270deg); |
| 129 | + mask-size: 20px; |
| 130 | + mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); |
| 131 | + } |
| 132 | + } |
| 133 | + } |
| 134 | + |
| 135 | + .mx_BaseCard_footer { |
| 136 | + padding-top: 4px; |
| 137 | + text-align: center; |
| 138 | + display: flex; |
| 139 | + justify-content: space-around; |
| 140 | + |
| 141 | + .mx_AccessibleButton_kind_secondary { |
| 142 | + color: $secondary-fg-color; |
| 143 | + background-color: rgba(141, 151, 165, 0.2); |
| 144 | + font-weight: $font-semi-bold; |
| 145 | + font-size: $font-14px; |
| 146 | + } |
| 147 | + |
| 148 | + .mx_AccessibleButton_disabled { |
| 149 | + cursor: not-allowed; |
| 150 | + } |
| 151 | + } |
| 152 | +} |
| 153 | + |
| 154 | +.mx_FilePanel, |
| 155 | +.mx_UserInfo, |
| 156 | +.mx_NotificationPanel, |
| 157 | +.mx_MemberList { |
| 158 | + &.mx_BaseCard { |
| 159 | + padding: 32px 0 0; |
| 160 | + |
| 161 | + .mx_AutoHideScrollbar { |
| 162 | + margin-right: unset; |
| 163 | + padding-right: unset; |
| 164 | + } |
| 165 | + } |
| 166 | +} |
0 commit comments