rustdoc: Correctly handle long crate names on mobile
This commit is contained in:
parent
5bd5d214ef
commit
d907a6b8ed
@ -1943,13 +1943,8 @@ in src-script.js and main.js
|
||||
pixels to avoid overflowing the topbar when the user sets a bigger
|
||||
font size. */
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.mobile-topbar h2 a {
|
||||
display: block;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.mobile-topbar .logo-container > img {
|
||||
|
@ -45,7 +45,7 @@ function setMobileTopbar() {
|
||||
const mobileTitle = document.createElement("h2");
|
||||
mobileTitle.className = "location";
|
||||
if (hasClass(document.querySelector(".rustdoc"), "crate")) {
|
||||
mobileTitle.innerText = `Crate ${window.currentCrate}`;
|
||||
mobileTitle.innerHTML = `Crate <a href="#">${window.currentCrate}</a>`;
|
||||
} else if (locationTitle) {
|
||||
mobileTitle.innerHTML = locationTitle.innerHTML;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user