UX: ensures we don't focus invisible button in sidebar (#18502)

Prior to this fix pressing tab multiple times in the sidebar, you would end up focusing invisible "sidebar-section-header-button". This change ensures the button will become visible when tabbing even if not hovering this section.

The `background: transparent change` is to avoid a flashing background due to different transition timing on the collapsable button.
This commit is contained in:
Joffrey JAFFEUX 2022-10-06 14:35:06 +02:00 committed by GitHub
parent 3115f38de2
commit 2d518b2895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,10 @@
.discourse-no-touch & {
transition: all 0.25s;
opacity: 0;
&:focus {
opacity: 1;
}
}
background: transparent;
@ -74,6 +78,10 @@
&.sidebar-section-header-collapsable {
justify-content: flex-start;
&:focus {
background: transparent;
}
}
}