Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix alignment of user menu avatar #12289

Merged
merged 5 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion res/css/structures/_SpacePanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,17 @@ limitations under the License.
.mx_UserMenu {
padding-bottom: 12px;
border-bottom: 1px solid $separator;
margin: 12px 14px 4px 16px;
margin: 12px 14px 4px 18px;
width: min-content;
max-width: 226px;

/* Display the container and img ehere as block elements so they don't take
dbkr marked this conversation as resolved.
Show resolved Hide resolved
* up extra vertical space.
*/
span,
img {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you target a class name here so we're not relying on the specific elements used in the Compound Avatar implementation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can for the span, but the image only has an autogenerated class name. Unsure whether adding one just for this or just using the element type is the lesser evil. We could also match everything, which might actually be better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my brief testing it looked like setting display: block only on the span was enough to fix the height, for what it's worth

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I retested and you're absolutely right.

display: block;
}
}
}

Expand Down
Loading