Skip to content

Commit f177035

Browse files
committed
fix: minor styling issues
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
1 parent fefb911 commit f177035

2 files changed

Lines changed: 27 additions & 35 deletions

File tree

core/src/components/AppItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const unreadLabel = computed(() => {
167167
}
168168
169169
&--outlined &__icon {
170-
filter: none;
170+
filter: brightness(0);
171171
mask: none;
172172
}
173173
}

core/src/components/AppMenu.vue

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,25 @@
4545
</div>
4646
</div>
4747
</NcPopover>
48-
<button
48+
<NcButton
4949
v-if="currentApp"
5050
class="app-menu__current-app"
51-
type="button"
51+
variant="tertiary-no-background"
5252
:aria-label="t('core', 'Open apps menu')"
5353
aria-haspopup="menu"
5454
:aria-expanded="opened ? 'true' : 'false'"
5555
@click="onTriggerClick('currentApp')">
56-
<img
57-
class="app-menu__current-app-icon"
58-
:src="currentApp.icon"
59-
alt=""
60-
aria-hidden="true">
56+
<template #icon>
57+
<img
58+
class="app-menu__current-app-icon"
59+
:src="currentApp.icon"
60+
alt=""
61+
aria-hidden="true">
62+
</template>
6163
<span class="app-menu__current-app-name">
6264
{{ currentApp.name }}
6365
</span>
64-
</button>
66+
</NcButton>
6567
</nav>
6668
</template>
6769

@@ -118,7 +120,7 @@ export default defineComponent({
118120
active: false,
119121
order: Number.MAX_SAFE_INTEGER,
120122
href: generateUrl('/settings/apps'),
121-
icon: generateFilePath('settings', 'img', 'apps.svg'),
123+
icon: generateFilePath('settings', 'img', 'settings_apps.svg'),
122124
type: 'link',
123125
name: t('core', 'More apps'),
124126
unread: 0,
@@ -341,38 +343,28 @@ export default defineComponent({
341343
}
342344
343345
&__current-app {
344-
display: flex;
345-
align-items: center;
346-
gap: var(--default-grid-baseline);
347-
height: var(--default-clickable-area);
348-
padding-inline: calc(var(--default-grid-baseline) * 2);
349-
background: transparent;
350-
border: none;
351-
border-radius: var(--border-radius-element);
346+
// NcButton's tertiary-no-background variant uses --color-main-text,
347+
// which is dark on light themes. The header sits on the theme primary
348+
// background, so override to use the matching plain-text color.
349+
--color-main-text: var(--color-background-plain-text);
352350
color: var(--color-background-plain-text);
353-
cursor: pointer;
354-
// Suppress the mobile-Safari grey tap rectangle that briefly flashes on press.
355-
-webkit-tap-highlight-color: transparent;
356-
357-
// The header sits on the theme-primary background with white text, so
358-
// --color-background-hover (white-ish) collapses contrast. A translucent
359-
// black overlay reads on any header tint.
360-
&:hover {
361-
background: rgba(0, 0, 0, 0.1);
351+
352+
// !important: v8 NcButton's legacy bundle sets focus-visible
353+
// outline/box-shadow with !important. Same translucent-black hover/
354+
// active overlays as the waffle: --color-background-hover collapses
355+
// contrast against the theme-primary header tint.
356+
&:hover:not(:disabled) {
357+
background-color: rgba(0, 0, 0, 0.1) !important;
362358
}
363359
364-
// core/css/inputs.scss:89 sets :active background to --color-main-background
365-
// (white on light themes), which makes the masked icon read as white-on-white.
366-
// !important: the global rule's :not() chain is hard to out-specify.
367-
&:active {
360+
&:active:not(:disabled) {
368361
background-color: rgba(0, 0, 0, 0.15) !important;
369-
color: var(--color-background-plain-text) !important;
370362
}
371363
372364
&:focus-visible {
373-
background: rgba(0, 0, 0, 0.1);
374-
outline: none;
375-
box-shadow: inset 0 0 0 2px var(--color-background-plain-text);
365+
background-color: rgba(0, 0, 0, 0.1) !important;
366+
outline: none !important;
367+
box-shadow: inset 0 0 0 2px var(--color-background-plain-text) !important;
376368
}
377369
}
378370

0 commit comments

Comments
 (0)