Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix squished op-avatars (#9291)

Benjamin Bädorf9c5afd5cd47d
diff --git a/frontend/src/global_styles/content/_avatar.sass b/frontend/src/global_styles/content/_avatar.sass
index 81cd5b58b27..217a1c0d64b 100644
--- a/frontend/src/global_styles/content/_avatar.sass
+++ b/frontend/src/global_styles/content/_avatar.sass
@@ -1,6 +1,8 @@
.op-avatar
border-radius: var(--user-avatar-border-radius)
width: var(--user-avatar-width)
+ // min-width was added because the avatar was getting squished as a flex-child
+ min-width: var(--user-avatar-width)
height: var(--user-avatar-height)
margin-right: 5px
color: white
@@ -9,19 +11,19 @@
vertical-align: middle
cursor: inherit
user-select: none
+ background-color: var(--user-avatar-default-bg-color)
+ // Default size
+ line-height: 36px
+ font-size: 16px
// Fallback avatar if no img tag gets rendered
&--fallback
max-width: none
- // Default size
- line-height: 36px
- font-size: 16px
- background-color: var(--user-avatar-default-bg-color)
-
&_mini
border-radius: var(--user-avatar-mini-border-radius)
width: var(--user-avatar-mini-width)
+ min-width: var(--user-avatar-mini-width)
height: var(--user-avatar-mini-height)
margin-right: 10px -5px
line-height: var(--user-avatar-mini-height)
@@ -30,6 +32,7 @@
&_medium
border-radius: var(--user-avatar-medium-border-radius)
width: var(--user-avatar-medium-width)
+ min-width: var(--user-avatar-medium-width)
height: var(--user-avatar-medium-height)
line-height: var(--user-avatar-medium-height)
font-size: 13px