A11Y: Allow header logo/title to hide, if needed (#20244)

This commit is contained in:
Kris 2023-02-14 09:04:48 -05:00 committed by GitHub
parent dfffb43933
commit 2dbcea9eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -13,6 +13,12 @@ export default createWidget("home-logo", {
href: getURL("/"),
},
buildClasses() {
if (this.attrs.minimized) {
return "title--minimized";
}
},
href() {
const href = this.settings.href;
return typeof href === "function" ? href() : href;

View File

@ -50,6 +50,15 @@
a:visited {
color: var(--header_primary);
}
&:not(.title--minimized) {
// allows large logos to be hidden if there are too many other header elements
// this prioritizes nav elements, especially in cases of high zoom levels
overflow: hidden;
a {
min-width: 0;
}
}
}
#site-logo {