Skip to content
Merged
Changes from all 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
10 changes: 4 additions & 6 deletions src/components/NcAvatar/NcAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -976,16 +976,14 @@ export default {
// - ⏹️ Best-fit: the status icon is as large as possible without exceeding the avatar box
// See PR for math explanation: PR #6004
--avatar-status-size-orbital: calc(var(--avatar-size) * (1 - 1 / sqrt(2)));
// Limit the status icon size to the status of a small clickable avatar
// Limit the status icon size to minimum font size to keep it readable
// Ideally avatars with a smaller should not be used with the status icon at all
--avatar-status-size-min: calc(var(--default-clickable-area) * (1 - 1 / sqrt(2)));
--avatar-status-size-min: var(--font-size-small);
--avatar-status-size: max(var(--avatar-status-size-orbital), var(--avatar-status-size-min));
// Because the status icon size is limited, smaller avatar requires a position offset to keep the status icon orbital
--avatar-status-icon-position: min(0px, (var(--avatar-status-size-orbital) - var(--avatar-status-size)) / 2);
box-sizing: border-box;
position: absolute;
inset-inline-end: var(--avatar-status-icon-position);
inset-block-end: var(--avatar-status-icon-position);
inset-inline-end: 0;
inset-block-end: 0;
height: var(--avatar-status-size);
width: var(--avatar-status-size);
line-height: 1;
Expand Down
Loading