Skip to content

Commit 91a35db

Browse files
authored
Merge pull request #54162 from nextcloud/feat/add-account-menu-outline
2 parents 46cf819 + a0a0458 commit 91a35db

3 files changed

Lines changed: 28 additions & 22 deletions

File tree

core/src/views/AccountMenu.vue

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -197,27 +197,13 @@ export default defineComponent({
197197
}
198198
199199
.account-menu {
200-
:deep(button) {
201-
// Normally header menus are slightly translucent when not active
202-
// this is generally ok but for the avatar this is weird so fix the opacity
203-
opacity: 1 !important;
204-
205-
// The avatar is just the "icon" of the button
206-
// So we add the focus-visible manually
207-
&:focus-visible {
208-
.account-menu__avatar {
209-
border: var(--border-width-input-focused) solid var(--color-background-plain-text);
210-
}
211-
}
212-
}
213-
214-
// Ensure we do not waste space, as the header menu sets a default width of 350px
215-
:deep(.header-menu__content) {
216-
width: fit-content !important;
217-
}
218-
219200
&__avatar {
201+
--account-menu-outline: var(--border-width-input) solid color-mix(in srgb, var(--color-background-plain-text), transparent 75%);
202+
outline: var(--account-menu-outline);
203+
position: fixed;
204+
220205
&:hover {
206+
--account-menu-outline: none;
221207
// Add hover styles similar to the focus-visible style
222208
border: var(--border-width-input-focused) solid var(--color-background-plain-text);
223209
}
@@ -235,5 +221,25 @@ export default defineComponent({
235221
flex: 0 1;
236222
}
237223
}
224+
225+
// Ensure we do not waste space, as the header menu sets a default width of 350px
226+
:deep(.header-menu__content) {
227+
width: fit-content !important;
228+
}
229+
230+
:deep(button) {
231+
// Normally header menus are slightly translucent when not active
232+
// this is generally ok but for the avatar this is weird so fix the opacity
233+
opacity: 1 !important;
234+
235+
// The avatar is just the "icon" of the button
236+
// So we add the focus-visible manually
237+
&:focus-visible {
238+
.account-menu__avatar {
239+
--account-menu-outline: none;
240+
border: var(--border-width-input-focused) solid var(--color-background-plain-text);
241+
}
242+
}
243+
}
238244
}
239245
</style>

dist/core-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)