UX: sidebar focus styles, remove hover for touch (#17713)

This commit is contained in:
Kris 2022-07-28 13:04:00 -04:00 committed by GitHub
parent 53d861414d
commit 391c687afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 12 deletions

View File

@ -3,16 +3,23 @@
.sidebar-more-section-links-details-summary { .sidebar-more-section-links-details-summary {
padding: 0.35em 0.5em; padding: 0.35em 0.5em;
color: var(--tertiary); color: var(--primary-high);
font-size: var(--font-down-1); font-size: var(--font-down-1);
transition: background-color 0.25s; transition: background-color 0.25s;
display: flex;
align-items: center;
list-style: none;
.d-icon {
margin-left: auto;
color: var(--primary-medium);
}
&:focus,
&:hover { &:hover {
background: var(--d-sidebar-highlight-color); background: var(--d-sidebar-highlight-color);
} }
list-style: none;
&::before { &::before {
display: none; display: none;
} }

View File

@ -3,17 +3,22 @@
.sidebar-section-header-button, .sidebar-section-header-button,
.sidebar-section-header-caret, .sidebar-section-header-caret,
.sidebar-section-header-dropdown { .sidebar-section-header-dropdown {
opacity: 0; .discourse-no-touch & {
transition: opacity 0.25s; opacity: 0;
transition-delay: 0.5s; transition: opacity 0.25s;
transition-delay: 0.5s;
}
} }
&:hover { .discourse-no-touch & {
.sidebar-section-header-button, &:focus-within,
.sidebar-section-header-caret, &:hover {
.sidebar-section-header-dropdown { .sidebar-section-header-button,
opacity: 1; .sidebar-section-header-caret,
transition-delay: 0s; .sidebar-section-header-dropdown {
opacity: 1;
transition-delay: 0s;
}
} }
} }
} }

View File

@ -16,3 +16,8 @@
margin-right: 0; margin-right: 0;
padding-left: 0.25em; padding-left: 0.25em;
} }
.sidebar-more-section-links-details
.sidebar-more-section-links-details-summary {
font-size: var(--font-0);
}