mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-19 05:59:26 +08:00
Sometimes a header button can have lingering focus after it's used — the change to focus-visible ensures the focus state is only visible when desired, like when using keyboard nav Before (after toggling): <img width="255" alt="image" src="https://github.com/user-attachments/assets/acc856c8-8d80-4ee5-8190-785f11105da1" /> After (also after toggling): <img width="255" alt="image" src="https://github.com/user-attachments/assets/f18e3830-ec2d-46b9-a7e0-9d88a8f79b48" /> Also fixed this same issue for the sidebar footer while I was at it!
72 lines
1.5 KiB
SCSS
Vendored
72 lines
1.5 KiB
SCSS
Vendored
.sidebar-footer-wrapper {
|
|
box-sizing: border-box;
|
|
background: var(--d-sidebar-background);
|
|
width: 100%;
|
|
position: sticky;
|
|
bottom: 0;
|
|
padding-inline: var(--space-2);
|
|
|
|
.sidebar-footer-container {
|
|
display: flex;
|
|
align-items: stretch;
|
|
position: relative;
|
|
padding: var(--space-2) 0;
|
|
padding-bottom: max(env(safe-area-inset-bottom), 0.5em);
|
|
|
|
&::before {
|
|
// fade to make scroll more apparent
|
|
position: absolute;
|
|
content: "";
|
|
display: block;
|
|
height: 1.5em;
|
|
top: -1.5em;
|
|
left: -0.5em;
|
|
right: -0.5em;
|
|
width: calc(100% + 0.5em);
|
|
pointer-events: none;
|
|
background: linear-gradient(
|
|
to bottom,
|
|
transparent,
|
|
var(--d-sidebar-footer-fade)
|
|
);
|
|
}
|
|
}
|
|
|
|
.sidebar-footer-link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
height: 100%;
|
|
font-size: var(--font-down-1);
|
|
color: var(--d-sidebar-link-color);
|
|
padding: 0 0.5em;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
background: var(--d-sidebar-highlight-background);
|
|
}
|
|
}
|
|
|
|
.sidebar-footer-actions {
|
|
margin-left: auto;
|
|
}
|
|
|
|
.sidebar-footer-actions-button.btn {
|
|
background: transparent;
|
|
border: none;
|
|
padding: 0.25em 0.4em;
|
|
|
|
.d-icon {
|
|
font-size: var(--font-down-1);
|
|
color: var(--d-sidebar-link-icon-color);
|
|
}
|
|
|
|
&:focus-visible,
|
|
&:hover {
|
|
background: var(--d-sidebar-highlight-background);
|
|
|
|
.d-icon {
|
|
color: var(--d-sidebar-highlight-color);
|
|
}
|
|
}
|
|
}
|
|
}
|