Skip to content

Commit 3996fc3

Browse files
committed
Merge main & update to bikkelhart/internet-nl@c0776a43
1 parent ee8dea8 commit 3996fc3

File tree

8 files changed

+292
-186
lines changed

8 files changed

+292
-186
lines changed

frontend/src/css/components.css

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,6 @@
230230
}
231231
}
232232

233-
[data-theme="dark"] {
234-
color-scheme: dark;
235-
236-
.card.large.knowledge-card {
237-
border: var(--card-border);
238-
}
239-
}
240-
241233
.card {
242234
border-radius: 0.5rem;
243235

@@ -457,6 +449,7 @@
457449
.accordion {
458450
appearance: none;
459451
overflow: clip;
452+
border: 1px solid var(--accordion-border-color);
460453

461454
&::details-content {
462455
@media (prefers-reduced-motion: no-preference) {
@@ -513,8 +506,13 @@
513506
.card.large.knowledge-card {
514507
border: none;
515508
}
509+
}
516510

517-
.accordion {
518-
border: 1px solid var(--green-400);
511+
/* Overwrites for dark theme */
512+
[data-theme="dark"] {
513+
color-scheme: dark;
514+
515+
.card.large.knowledge-card {
516+
border: var(--card-border);
519517
}
520518
}

frontend/src/css/header.css

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,15 @@ header nav {
291291
padding: 0.5rem 0.75rem;
292292
}
293293

294-
.current-language {
294+
.current-language-desktop {
295+
@media (width <= 73.125rem) {
296+
display: none;
297+
}
298+
299+
text-transform: uppercase;
300+
}
301+
302+
.current-language-mobile {
295303
@media (width >= 73.125rem) {
296304
display: none;
297305
}
@@ -353,7 +361,7 @@ header nav {
353361
content: "";
354362
position: absolute;
355363
left: 0;
356-
width: 150%;
364+
width: 100%;
357365
height: 1.25rem;
358366
}
359367
}
@@ -401,10 +409,7 @@ header nav {
401409
.nav-subitem {
402410
display: flex;
403411
width: 100%;
404-
405-
406412

407-
408413
a, button {
409414
display: flex;
410415
font: var(--subnav-link);
@@ -499,10 +504,17 @@ header nav {
499504
translate: -50% 0;
500505
left: 50%;
501506
margin-top: 1.25rem;
507+
z-index: 10;
502508

503509
@media (scripting: none) {
504510
z-index: 2;
505511
}
512+
513+
/* Bring focused dropdown to front */
514+
&:focus-within,
515+
&.focused {
516+
z-index: 20;
517+
}
506518
}
507519

508520
&.expanded {

frontend/src/css/result-section.css

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
background-color: unset;
8989
background-repeat: no-repeat;
9090
background-size: cover;
91-
9291
display: block;
9392
}
9493

@@ -257,6 +256,7 @@ body.connectiontest .action-card-item:has(.connection) {
257256
}
258257

259258
.action-card-item a,
259+
.action-card-item button,
260260
.action-card-item .countdown {
261261
color: var(--card-body-color-action);
262262
font: var(--card-header-m);
@@ -312,6 +312,21 @@ body.connectiontest .action-card-item:has(.connection) {
312312
display: none;
313313
}
314314
}
315+
316+
.action-card-item button {
317+
background: none;
318+
border: none;
319+
border-bottom: 0.0625rem solid var(--card-body-color-action);
320+
cursor: pointer;
321+
text-align: left;
322+
width: 100%;
323+
324+
325+
&:focus {
326+
outline: 2px solid var(--focus-color);
327+
outline-offset: 2px;
328+
}
329+
}
315330
}
316331

317332
#copy-link {
@@ -614,14 +629,10 @@ meter::-moz-meter-bar {
614629
font-family: monospace, sans-serif;
615630
}
616631

617-
th {
618-
border-bottom: 1px solid var(--grey-300);
619-
}
620-
621632
td,
622633
th {
623634
padding: 0.375rem;
624-
font-size: 0.875rem;
635+
text-align: left;
625636

626637
&:first-child {
627638
padding-left: 0;

frontend/src/css/variables.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@
229229
--accordion-bg-color: light-dark(var(--white-100), var(--black-200));
230230
--accordion-heading-color: light-dark(var(--black-200), var(--green-100));
231231
--accordion-body-color: light-dark(var(--black-200), var(--white-100));
232+
--accordion-border-color: light-dark(var(--green-400), var(--transparent-600));
232233

233234
/* RESULT STATE COLORS */
234235
--probing-color: light-dark(var(--green-400), var(--white-100));

frontend/src/js/base/header.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,30 @@ function header() {
4646
subMenu.classList.contains("expanded")
4747
);
4848
});
49+
50+
// Handle focus management for z-index elevation
51+
if (subMenu) {
52+
const focusIn = () => {
53+
document
54+
.querySelectorAll(".nav-sublist")
55+
.forEach((menu) => menu.classList.remove("focused"));
56+
subMenu.classList.add("focused");
57+
};
58+
59+
const focusOut = (event) => {
60+
if (
61+
!subMenu.contains(event.relatedTarget) &&
62+
event.relatedTarget !== toggleSubMenu
63+
) {
64+
subMenu.classList.remove("focused");
65+
}
66+
};
67+
68+
toggleSubMenu.addEventListener("focusin", focusIn);
69+
subMenu.addEventListener("focusin", focusIn);
70+
toggleSubMenu.addEventListener("focusout", focusOut);
71+
subMenu.addEventListener("focusout", focusOut);
72+
}
4973
});
5074

5175
/* STICKY HEADER */

interface/static/logos/logo.svg

Lines changed: 94 additions & 54 deletions
Loading

0 commit comments

Comments
 (0)