Merge pull request #54162 from nextcloud/feat/add-account-menu-outline

This commit is contained in:
John Molakvoæ 2025-07-31 09:23:52 +02:00 committed by GitHub
commit 91a35db95f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 22 deletions

View file

@ -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);
}
@ -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>

4
dist/core-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long