Skip to content

Commit 35a75ed

Browse files
Change focused items behavior that neighbor elements (text and border) have no overlapping.
Add native tooltips to items. Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1 parent 391a5d7 commit 35a75ed

4 files changed

Lines changed: 45 additions & 17 deletions

File tree

core/css/header.scss

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,39 @@
2020
-webkit-user-select: none;
2121
-moz-user-select: none;
2222
-ms-user-select: none;
23-
a:not(.button):focus-visible, button:not(.button-vue):focus-visible, div[role="button"]:focus-visible {
24-
box-shadow: inset 0 0 0 2px var(--color-primary-text);
25-
border-radius: var(--border-radius);
26-
outline: none;
27-
}
23+
}
24+
#header a:not(.button):focus-visible, #header .button-vue:focus-visible, #header div[role=button]:focus-visible,
25+
#expanddiv a:not(.button):focus-visible,
26+
#expanddiv button:not(.button-vue):focus-visible,
27+
#expanddiv div[role=button]:focus-visible {
28+
outline: none;
29+
}
30+
31+
#expanddiv a:not(.button):focus-visible,
32+
#expanddiv button:not(.button-vue):focus-visible,
33+
#expanddiv div[role=button]:focus-visible {
34+
box-shadow: inset 0 0 0 2px var(--color-primary-text);
35+
border-radius: var(--border-radius);
36+
}
37+
38+
#header a:not(.button):focus-visible::after, #header .button-vue:focus-visible::after, #header div[role=button]:focus-visible::after {
39+
content: " ";
40+
position: absolute;
41+
transform: translateX(-50%);
42+
width: 12px;
43+
height: 2px;
44+
border-radius: 3px;
45+
background-color: var(--color-primary-text);
46+
left: 50%;
47+
opacity: 1;
48+
bottom: 6%;
49+
}
50+
51+
#header .header-right a:not(.button):focus-visible::after, #header .header-right div[role=button]:focus-visible::after {
52+
bottom: 10%;
53+
}
54+
#header .header-right #expand.menutoggle:focus-visible::after {
55+
left: 40%;
2856
}
2957

3058
/* HEADERS ------------------------------------------------------------------ */

core/src/components/AppMenu.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<a :href="app.href"
3131
:class="{ 'has-unread': app.unread > 0 }"
3232
:aria-label="appLabel(app)"
33+
:title="app.name"
3334
:aria-current="app.active ? 'page' : false">
3435
<img :src="app.icon" alt="">
3536
<div class="app-menu-entry--label">
@@ -195,25 +196,27 @@ $header-icon-size: 20px;
195196
text-align: center;
196197
bottom: -5px;
197198
left: 50%;
199+
top: 45%;
198200
display: block;
199201
min-width: 100%;
200202
transform: translateX(-50%);
201203
transition: all 0.1s ease-in-out;
202204
width: 100%;
203205
text-overflow: ellipsis;
204206
overflow: hidden;
207+
letter-spacing: -0.5px;
205208
}
206209
207210
&:hover,
208211
&:focus-within {
209212
opacity: 1;
210213
.app-menu-entry--label {
211214
opacity: 1;
212-
font-weight: bold;
213-
font-size: 14px;
215+
font-weight: bolder;
214216
bottom: 0;
215-
width: auto;
216-
overflow: visible;
217+
width: 100%;
218+
text-overflow: ellipsis;
219+
overflow: hidden;
217220
}
218221
}
219222
@@ -227,7 +230,7 @@ $header-icon-size: 20px;
227230
opacity: 1;
228231
229232
img {
230-
margin-top: -6px;
233+
margin-top: -8px;
231234
}
232235
233236
.app-menu-entry--label {
@@ -254,10 +257,7 @@ $header-icon-size: 20px;
254257
255258
&:focus-visible {
256259
opacity: 1;
257-
background-color: transparent !important;
258-
border-radius: var(--border-radius);
259-
outline: none;
260-
box-shadow: 0 0 0 2px var(--color-primary-text);
260+
outline: none !important;
261261
}
262262
}
263263

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)