@@ -110,28 +110,107 @@ limitations under the License.
110110
111111 .mx_RoomSummaryCard_appsGroup {
112112 .mx_RoomSummaryCard_Button {
113- padding-left : 12px ;
113+ // this button is special so we have to override some of the original styling
114+ // as we will be applying it in its children
115+ padding : 0 ;
116+ height : auto ;
114117 color : $tertiary-fg-color ;
115118
116- span {
117- color : $primary-fg-color ;
119+ .mx_RoomSummaryCard_icon_app {
120+ padding : 10px 48px 10px 12px ; // based on typical mx_RoomSummaryCard_Button padding
121+ text-overflow : ellipsis ;
122+ overflow : hidden ;
123+
124+ .mx_BaseAvatar_image {
125+ vertical-align : top ;
126+ margin-right : 12px ;
127+ }
128+
129+ span {
130+ color : $primary-fg-color ;
131+ }
132+ }
133+
134+ .mx_RoomSummaryCard_app_pinToggle ,
135+ .mx_RoomSummaryCard_app_options {
136+ position : absolute ;
137+ top : 0 ;
138+ height : 100% ; // to give bigger interactive zone
139+ width : 24px ;
140+ padding : 12px 4px ;
141+ box-sizing : border-box ;
142+ min-width : 24px ; // prevent flexbox crushing
143+
144+ & :hover {
145+ & ::after {
146+ content : ' ' ;
147+ position : absolute ;
148+ height : 24px ;
149+ width : 24px ;
150+ top : 8px ; // equal to padding-top of parent
151+ left : 0 ;
152+ border-radius : 12px ;
153+ background-color : rgba (141 , 151 , 165 , 0.1 );
154+ }
155+ }
156+
157+ & ::before {
158+ content : ' ' ;
159+ position : absolute ;
160+ height : 16px ;
161+ width : 16px ;
162+ mask-repeat : no-repeat ;
163+ mask-position : center ;
164+ mask-size : 16px ;
165+ background-color : $icon-button-color ;
166+ }
167+ }
168+
169+ .mx_RoomSummaryCard_app_pinToggle {
170+ right : 24px ;
171+
172+ & ::before {
173+ mask-image : url (' $(res)/img/element-icons/room/pin-upright.svg' );
174+ }
175+ }
176+
177+ .mx_RoomSummaryCard_app_options {
178+ right : 48px ;
179+ display : none ;
180+
181+ & ::before {
182+ mask-image : url (' $(res)/img/element-icons/room/ellipsis.svg' );
183+ }
184+ }
185+
186+ & .mx_RoomSummaryCard_Button_pinned {
187+ & ::after {
188+ opacity : 0.2 ;
189+ }
190+
191+ .mx_RoomSummaryCard_app_pinToggle ::before {
192+ background-color : $accent-color ;
193+ }
118194 }
119195
120- img {
121- vertical-align : top ;
122- margin-right : 12px ;
123- border-radius : 4px ;
196+ & :hover {
197+ .mx_RoomSummaryCard_icon_app {
198+ padding-right : 72px ;
199+ }
200+
201+ .mx_RoomSummaryCard_app_options {
202+ display : unset ;
203+ }
124204 }
125205
126206 & ::before {
127207 content : unset ;
128208 }
129- }
130209
131- .mx_RoomSummaryCard_icon_app_pinned ::after {
132- mask-image : url ( ' $(res)/img/element-icons/room/pin-upright.svg ' );
133- background-color : $accent-color ;
134- transform : unset ;
210+ & ::after {
211+ top : 8 px ; // re-align based on the height change
212+ pointer-events : none ; // pass through to the real button
213+ }
135214 }
136215 }
137216
0 commit comments