Skip to content

Commit 8b238a2

Browse files
authored
Merge pull request #46916 from nextcloud/fix/appmenu-label-pos
2 parents b17508a + b92e0c7 commit 8b238a2

4 files changed

Lines changed: 26 additions & 16 deletions

File tree

core/src/components/AppMenuEntry.vue

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ defineProps<{
6161
text-align: center;
6262
bottom: 0;
6363
left: 50%;
64+
top: 50%;
6465
display: block;
6566
min-width: 100%;
6667
transform: translateX(-50%);
67-
transition: all 0.1s ease-in-out;
6868
width: 100%;
6969
text-overflow: ellipsis;
7070
overflow: hidden;
@@ -84,44 +84,53 @@ defineProps<{
8484
pointer-events: none;
8585
border-bottom-color: var(--color-main-background);
8686
transform: translateX(-50%);
87-
width: 12px;
87+
width: 10px;
8888
height: 5px;
8989
border-radius: 3px;
9090
background-color: var(--color-background-plain-text);
9191
left: 50%;
92-
bottom: 6px;
92+
bottom: 8px;
9393
display: block;
9494
transition: all 0.1s ease-in-out;
9595
opacity: 1;
9696
}
9797
}
9898
99+
&__icon,
100+
&__label {
101+
transition: all 0.1s ease-in-out;
102+
}
103+
99104
// Make the hovered entry bold to see that it is hovered
100-
&:hover &__label,
101-
&:focus-within &__label {
105+
&:hover .app-menu-entry__label,
106+
&:focus-within .app-menu-entry__label {
102107
font-weight: bold;
103108
}
104109
}
105110
</style>
106111

107112
<style lang="scss">
108113
// Showing the label
109-
.app-menu-entry:hover .app-menu-entry,
110-
.app-menu-entry:focus-within .app-menu-entry,
111-
.app-menu__list:hover .app-menu-entry,
112-
.app-menu__list:focus-within .app-menu-entry {
114+
.app-menu-entry:hover,
115+
.app-menu-entry:focus-within,
116+
.app-menu__list:hover,
117+
.app-menu__list:focus-within {
113118
// Move icon up so that the name does not overflow the icon
114-
&__icon {
119+
.app-menu-entry__icon {
115120
margin-block-end: calc(1.5 * 12px); // font size of label * line height
116121
}
117122
118123
// Make the label visible
119-
&__label {
124+
.app-menu-entry__label {
120125
opacity: 1;
121126
}
122127
123128
// Hide indicator when the text is shown
124-
&--active::before {
129+
.app-menu-entry--active::before {
130+
opacity: 0;
131+
}
132+
133+
.app-menu-icon__unread {
125134
opacity: 0;
126135
}
127136
}

core/src/components/AppMenuIcon.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
role="img"
99
:aria-hidden="ariaHidden"
1010
:aria-label="ariaLabel">
11-
<img class="app-menu-icon__icon" :src="app.icon">
11+
<img class="app-menu-icon__icon" :src="app.icon" alt="">
1212
<IconDot v-if="app.unread" class="app-menu-icon__unread" :size="10" />
1313
</span>
1414
</template>
@@ -58,6 +58,7 @@ $unread-indicator-size: 10px;
5858
position: absolute;
5959
inset-block-end: calc($unread-indicator-size / -2.5);
6060
inset-inline-end: calc($unread-indicator-size / -2.5);
61+
transition: all 0.1s ease-in-out;
6162
}
6263
}
6364
</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)