Skip to content
Merged
Changes from 1 commit
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
Next Next commit
feat(AccountMenu): apply some outline to the user avatar
- resolves #54140

Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux authored and nextcloud-command committed Jul 31, 2025
commit b610239951d88f408e40bd03e4d73e05ccbc96f4
44 changes: 25 additions & 19 deletions core/src/views/AccountMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,27 +197,13 @@ export default defineComponent({
}

.account-menu {
:deep(button) {
// Normally header menus are slightly translucent when not active
// this is generally ok but for the avatar this is weird so fix the opacity
opacity: 1 !important;

// The avatar is just the "icon" of the button
// So we add the focus-visible manually
&:focus-visible {
.account-menu__avatar {
border: var(--border-width-input-focused) solid var(--color-background-plain-text);
}
}
}

// Ensure we do not waste space, as the header menu sets a default width of 350px
:deep(.header-menu__content) {
width: fit-content !important;
}

&__avatar {
--account-menu-outline: var(--border-width-input) solid color-mix(in srgb, var(--color-background-plain-text), transparent 75%);
outline: var(--account-menu-outline);
position: fixed;

&:hover {
--account-menu-outline: none;
// Add hover styles similar to the focus-visible style
border: var(--border-width-input-focused) solid var(--color-background-plain-text);
}
Expand All @@ -235,5 +221,25 @@ export default defineComponent({
flex: 0 1;
}
}

// Ensure we do not waste space, as the header menu sets a default width of 350px
:deep(.header-menu__content) {
width: fit-content !important;
}

:deep(button) {
// Normally header menus are slightly translucent when not active
// this is generally ok but for the avatar this is weird so fix the opacity
opacity: 1 !important;

// The avatar is just the "icon" of the button
// So we add the focus-visible manually
&:focus-visible {
.account-menu__avatar {
--account-menu-outline: none;
border: var(--border-width-input-focused) solid var(--color-background-plain-text);
}
}
}
}
</style>