mirror of
https://github.com/discourse/discourse.git
synced 2025-04-02 04:36:01 +08:00
A11Y: Allow header logo/title to hide, if needed (#20244)
This commit is contained in:
parent
dfffb43933
commit
2dbcea9eee
app/assets
@ -13,6 +13,12 @@ export default createWidget("home-logo", {
|
|||||||
href: getURL("/"),
|
href: getURL("/"),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
buildClasses() {
|
||||||
|
if (this.attrs.minimized) {
|
||||||
|
return "title--minimized";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
href() {
|
href() {
|
||||||
const href = this.settings.href;
|
const href = this.settings.href;
|
||||||
return typeof href === "function" ? href() : href;
|
return typeof href === "function" ? href() : href;
|
||||||
|
@ -50,6 +50,15 @@
|
|||||||
a:visited {
|
a:visited {
|
||||||
color: var(--header_primary);
|
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 {
|
#site-logo {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user