From 73f52d3d8f94f081233b9eb112a1266a6e83dd1a Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Wed, 31 Jan 2018 03:48:16 +0300 Subject: [PATCH 01/12] rustdoc: Foldable impl blocks Addresses #40363, #45720, #24483, #23986 and so on * Expands and refactors collapseDocs and toggleAllDocs * Adds [-] toggle to all impls (including inherent impl) * Makes it hiding though main css file, not though element style May need to be addressed: * "[-]" and anchor link copier are overlaid a bit * Inherent methods are also hidden by the global [-] toggle. * Auto-collapsing "Iterator" and so on by default is not implemented yet * Tested only shallowly and only in Chromiuim * No tests. Are there tests for css/js part here? * The new implementation may be a bit slower. --- src/librustdoc/html/static/main.js | 156 ++++++++++++++------- src/librustdoc/html/static/themes/dark.css | 5 + src/librustdoc/html/static/themes/main.css | 5 + 3 files changed, 115 insertions(+), 51 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 0f9e7001c159b..a77161bf1a991 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -296,9 +296,9 @@ document.onkeydown = handleShortcut; document.onclick = function(ev) { if (hasClass(ev.target, 'collapse-toggle')) { - collapseDocs(ev.target); + collapseDocs(ev.target, "toggle"); } else if (hasClass(ev.target.parentNode, 'collapse-toggle')) { - collapseDocs(ev.target.parentNode); + collapseDocs(ev.target.parentNode, "toggle"); } else if (ev.target.tagName === 'SPAN' && hasClass(ev.target.parentNode, 'line-numbers')) { var prev_id = 0; @@ -1618,19 +1618,8 @@ e.innerHTML = labelForToggleButton(false); }); toggle.title = "collapse all docs"; - onEach(document.getElementsByClassName("docblock"), function(e) { - e.style.display = 'block'; - }); - onEach(document.getElementsByClassName("toggle-label"), function(e) { - e.style.display = 'none'; - }); - onEach(document.getElementsByClassName("toggle-wrapper"), function(e) { - removeClass(e, "collapsed"); - }); onEach(document.getElementsByClassName("collapse-toggle"), function(e) { - onEveryMatchingChild(e, "inner", function(i_e) { - i_e.innerHTML = labelForToggleButton(false); - }); + collapseDocs(e, "show"); }); } else { addClass(toggle, "will-expand"); @@ -1638,54 +1627,115 @@ e.innerHTML = labelForToggleButton(true); }); toggle.title = "expand all docs"; - onEach(document.getElementsByClassName("docblock"), function(e) { - e.style.display = 'none'; - }); - onEach(document.getElementsByClassName("toggle-label"), function(e) { - e.style.display = 'inline-block'; - }); - onEach(document.getElementsByClassName("toggle-wrapper"), function(e) { - addClass(e, "collapsed"); - }); + onEach(document.getElementsByClassName("collapse-toggle"), function(e) { - onEveryMatchingChild(e, "inner", function(i_e) { - i_e.innerHTML = labelForToggleButton(true); - }); + collapseDocs(e, "hide"); }); } } - function collapseDocs(toggle) { + function collapseDocs(toggle, mode) { if (!toggle || !toggle.parentNode) { return; } - var relatedDoc = toggle.parentNode.nextElementSibling; - if (hasClass(relatedDoc, "stability")) { - relatedDoc = relatedDoc.nextElementSibling; - } - if (hasClass(relatedDoc, "docblock")) { - if (!isHidden(relatedDoc)) { - relatedDoc.style.display = 'none'; - onEach(toggle.childNodes, function(e) { - if (hasClass(e, 'toggle-label')) { + + function adjustToggle(arg) { + return function(e) { + if (hasClass(e, 'toggle-label')) { + if (arg) { e.style.display = 'inline-block'; - } - if (hasClass(e, 'inner')) { - e.innerHTML = labelForToggleButton(true); - } - }); - addClass(toggle.parentNode, 'collapsed'); - } else { - relatedDoc.style.display = 'block'; - removeClass(toggle.parentNode, 'collapsed'); - onEach(toggle.childNodes, function(e) { - if (hasClass(e, 'toggle-label')) { + } else { e.style.display = 'none'; } - if (hasClass(e, 'inner')) { - e.innerHTML = labelForToggleButton(false); + } + if (hasClass(e, 'inner')) { + e.innerHTML = labelForToggleButton(arg); + } + }; + }; + + if (!hasClass(toggle.parentNode, "impl")) { + var relatedDoc = toggle.parentNode.nextElementSibling; + if (hasClass(relatedDoc, "stability")) { + relatedDoc = relatedDoc.nextElementSibling; + } + if (hasClass(relatedDoc, "docblock")) { + var action = mode; + if (action == "toggle") { + if(hasClass(relatedDoc, "hidden-by-usual-hider")) { + action="show"; + } else { + action="hide"; + } + } + if (action == "hide") { + addClass(relatedDoc, "hidden-by-usual-hider"); + onEach(toggle.childNodes, adjustToggle(true)); + addClass(toggle.parentNode, 'collapsed'); + } else if (action == "show") { + removeClass(relatedDoc, "hidden-by-usual-hider"); + removeClass(toggle.parentNode, 'collapsed'); + onEach(toggle.childNodes, adjustToggle(false)); + } + } + } else { + // we are collapsing the impl block + function implHider(addOrRemove) { + return function(n) { + if(hasClass(n, "method")) { + if (addOrRemove) { + addClass(n, "hidden-by-impl-hider"); + } else { + removeClass(n, "hidden-by-impl-hider"); + } + var ns = n.nextElementSibling; + while(true) { + if (ns && ( + hasClass(ns, "docblock") || + hasClass(ns, "stability") || + false + )) { + if (addOrRemove) { + addClass(ns, "hidden-by-impl-hider"); + } else { + removeClass(ns, "hidden-by-impl-hider"); + } + ns = ns.nextElementSibling; + continue; + } + break; + } } - }); + } + } + + var relatedDoc = toggle.parentNode; + + while (!hasClass(relatedDoc, "impl-items")) { + relatedDoc = relatedDoc.nextElementSibling; + } + + if (!relatedDoc) return; + + // Hide all functions, but not associated types/consts + + var action = mode; + if (action == "toggle") { + if(hasClass(relatedDoc, "fns-now-collapsed")) { + action="show"; + } else { + action="hide"; + } + } + + if(action == "show") { + removeClass(relatedDoc, "fns-now-collapsed"); + onEach(toggle.childNodes, adjustToggle(false)); + onEach(relatedDoc.childNodes, implHider(false)); + } else if (action == "hide") { + addClass(relatedDoc, "fns-now-collapsed"); + onEach(toggle.childNodes, adjustToggle(true)); + onEach(relatedDoc.childNodes, implHider(true)); } } } @@ -1714,8 +1764,12 @@ hasClass(next.nextElementSibling, 'docblock'))) { insertAfter(toggle.cloneNode(true), e.childNodes[e.childNodes.length - 1]); } + if (hasClass(e, 'impl')) { + insertAfter(toggle.cloneNode(true), e.childNodes[e.childNodes.length - 1]); + } } onEach(document.getElementsByClassName('method'), func); + onEach(document.getElementsByClassName('impl'), func); onEach(document.getElementsByClassName('impl-items'), function(e) { onEach(e.getElementsByClassName('associatedconstant'), func); }); @@ -1803,7 +1857,7 @@ onEach(document.getElementById('main').getElementsByTagName('pre'), function(e) { onEach(e.getElementsByClassName('attributes'), function(i_e) { i_e.parentNode.insertBefore(createToggleWrapper(), i_e); - collapseDocs(i_e.previousSibling.childNodes[0]); + collapseDocs(i_e.previousSibling.childNodes[0], "toggle"); }); }); diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css index 4c6bcab72b7c9..d8cb9681d04b4 100644 --- a/src/librustdoc/html/static/themes/dark.css +++ b/src/librustdoc/html/static/themes/dark.css @@ -386,3 +386,8 @@ kbd { background: #353535; } } + +.hidden-by-impl-hider, +.hidden-by-usual-hider { + display: none; +} diff --git a/src/librustdoc/html/static/themes/main.css b/src/librustdoc/html/static/themes/main.css index e0764640e9165..8713f83ecb93b 100644 --- a/src/librustdoc/html/static/themes/main.css +++ b/src/librustdoc/html/static/themes/main.css @@ -383,3 +383,8 @@ kbd { background: #fff; } } + +.hidden-by-impl-hider, +.hidden-by-usual-hider { + display: none; +} From 7cd028022656b89645126204b9732cd7aca4d302 Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Wed, 31 Jan 2018 04:02:51 +0300 Subject: [PATCH 02/12] rustdoc: Fix tidy errors found by travis --- src/librustdoc/html/static/main.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index a77161bf1a991..2cdb3955ebc88 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -1627,7 +1627,7 @@ e.innerHTML = labelForToggleButton(true); }); toggle.title = "expand all docs"; - + onEach(document.getElementsByClassName("collapse-toggle"), function(e) { collapseDocs(e, "hide"); }); @@ -1638,7 +1638,7 @@ if (!toggle || !toggle.parentNode) { return; } - + function adjustToggle(arg) { return function(e) { if (hasClass(e, 'toggle-label')) { @@ -1653,7 +1653,7 @@ } }; }; - + if (!hasClass(toggle.parentNode, "impl")) { var relatedDoc = toggle.parentNode.nextElementSibling; if (hasClass(relatedDoc, "stability")) { @@ -1708,17 +1708,17 @@ } } } - + var relatedDoc = toggle.parentNode; - + while (!hasClass(relatedDoc, "impl-items")) { relatedDoc = relatedDoc.nextElementSibling; } - + if (!relatedDoc) return; - + // Hide all functions, but not associated types/consts - + var action = mode; if (action == "toggle") { if(hasClass(relatedDoc, "fns-now-collapsed")) { @@ -1727,7 +1727,7 @@ action="hide"; } } - + if(action == "show") { removeClass(relatedDoc, "fns-now-collapsed"); onEach(toggle.childNodes, adjustToggle(false)); From c904b1bef45154c223a27123e241ffe06951c45f Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Wed, 31 Jan 2018 17:35:57 +0300 Subject: [PATCH 03/12] rustdoc: Fix some minor issues per reviewer --- src/librustdoc/html/static/main.js | 32 ++++++++++++---------- src/librustdoc/html/static/rustdoc.css | 5 ++++ src/librustdoc/html/static/themes/dark.css | 5 ---- src/librustdoc/html/static/themes/main.css | 5 ---- 4 files changed, 22 insertions(+), 25 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 2cdb3955ebc88..8ce1a2f84a1cb 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -1661,18 +1661,18 @@ } if (hasClass(relatedDoc, "docblock")) { var action = mode; - if (action == "toggle") { - if(hasClass(relatedDoc, "hidden-by-usual-hider")) { - action="show"; + if (action === "toggle") { + if (hasClass(relatedDoc, "hidden-by-usual-hider")) { + action = "show"; } else { - action="hide"; + action = "hide"; } } - if (action == "hide") { + if (action === "hide") { addClass(relatedDoc, "hidden-by-usual-hider"); onEach(toggle.childNodes, adjustToggle(true)); addClass(toggle.parentNode, 'collapsed'); - } else if (action == "show") { + } else if (action === "show") { removeClass(relatedDoc, "hidden-by-usual-hider"); removeClass(toggle.parentNode, 'collapsed'); onEach(toggle.childNodes, adjustToggle(false)); @@ -1682,14 +1682,14 @@ // we are collapsing the impl block function implHider(addOrRemove) { return function(n) { - if(hasClass(n, "method")) { + if (hasClass(n, "method")) { if (addOrRemove) { addClass(n, "hidden-by-impl-hider"); } else { removeClass(n, "hidden-by-impl-hider"); } var ns = n.nextElementSibling; - while(true) { + while (true) { if (ns && ( hasClass(ns, "docblock") || hasClass(ns, "stability") || @@ -1715,24 +1715,26 @@ relatedDoc = relatedDoc.nextElementSibling; } - if (!relatedDoc) return; + if (!relatedDoc) { + return; + } // Hide all functions, but not associated types/consts var action = mode; - if (action == "toggle") { - if(hasClass(relatedDoc, "fns-now-collapsed")) { - action="show"; + if (action === "toggle") { + if (hasClass(relatedDoc, "fns-now-collapsed")) { + action = "show"; } else { - action="hide"; + action = "hide"; } } - if(action == "show") { + if (action === "show") { removeClass(relatedDoc, "fns-now-collapsed"); onEach(toggle.childNodes, adjustToggle(false)); onEach(relatedDoc.childNodes, implHider(false)); - } else if (action == "hide") { + } else if (action === "hide") { addClass(relatedDoc, "fns-now-collapsed"); onEach(toggle.childNodes, adjustToggle(true)); onEach(relatedDoc.childNodes, implHider(true)); diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index d2eeb2e15b3dd..d4b9fbab801a4 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1189,3 +1189,8 @@ kbd { z-index: 1; } } + +.hidden-by-impl-hider, +.hidden-by-usual-hider { + display: none; +} diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css index d8cb9681d04b4..4c6bcab72b7c9 100644 --- a/src/librustdoc/html/static/themes/dark.css +++ b/src/librustdoc/html/static/themes/dark.css @@ -386,8 +386,3 @@ kbd { background: #353535; } } - -.hidden-by-impl-hider, -.hidden-by-usual-hider { - display: none; -} diff --git a/src/librustdoc/html/static/themes/main.css b/src/librustdoc/html/static/themes/main.css index 8713f83ecb93b..e0764640e9165 100644 --- a/src/librustdoc/html/static/themes/main.css +++ b/src/librustdoc/html/static/themes/main.css @@ -383,8 +383,3 @@ kbd { background: #fff; } } - -.hidden-by-impl-hider, -.hidden-by-usual-hider { - display: none; -} From 0885865e9065d6ef5a8b456b9665a63e9ffda290 Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Thu, 1 Feb 2018 16:52:44 +0300 Subject: [PATCH 04/12] rustdoc: Move collapse toggle to the left --- src/librustdoc/html/static/rustdoc.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index d4b9fbab801a4..d92685bf942e6 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -695,7 +695,7 @@ a.test-arrow:hover{ .collapse-toggle { font-weight: 300; position: absolute; - left: -23px; + left: -40px; top: 0; } From a3acd10297ec7ddc4d1389cbf3532351f1d4a8c8 Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Thu, 1 Feb 2018 16:53:29 +0300 Subject: [PATCH 05/12] rustdoc: Auto-collapse all non-inherent impls --- src/librustdoc/html/static/main.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 8ce1a2f84a1cb..befa1cc53f3cb 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -1742,6 +1742,20 @@ } } + function autoCollapseAllImpls() { + // Automatically minimize all non-inherent impls + onEach(document.getElementsByClassName('impl'), function(n) { + if (n.id !== 'impl') { + // non-inherent impl + onEach(n.childNodes, function(m) { + if (hasClass(m, "collapse-toggle")) { + collapseDocs(m, "hide"); + } + }); + } + }); + } + var x = document.getElementById('toggle-all-docs'); if (x) { x.onclick = toggleAllDocs; @@ -1819,6 +1833,8 @@ } }) + autoCollapseAllImpls(); + function createToggleWrapper() { var span = document.createElement('span'); span.className = 'toggle-label'; From 28efcfc0830133c058f9443f5934c6f9c0aa7132 Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Thu, 1 Feb 2018 17:07:43 +0300 Subject: [PATCH 06/12] rustdoc: Fix erroneous collapsing of second+ inherent impl. --- src/librustdoc/html/static/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index befa1cc53f3cb..3d9841ec5267e 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -1745,8 +1745,9 @@ function autoCollapseAllImpls() { // Automatically minimize all non-inherent impls onEach(document.getElementsByClassName('impl'), function(n) { - if (n.id !== 'impl') { - // non-inherent impl + // inherent impl ids are like 'impl' or impl-' + var inherent = (n.id.match(/^impl(?:-\d+)?$/) !== null); + if (!inherent) { onEach(n.childNodes, function(m) { if (hasClass(m, "collapse-toggle")) { collapseDocs(m, "hide"); From bc277b271dfa808c378291e12394db4c4b6e47a3 Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Wed, 7 Feb 2018 00:44:47 +0300 Subject: [PATCH 07/12] Revert "rustdoc: Move collapse toggle to the left" This reverts commit 0885865e9065d6ef5a8b456b9665a63e9ffda290. --- src/librustdoc/html/static/rustdoc.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index d92685bf942e6..d4b9fbab801a4 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -695,7 +695,7 @@ a.test-arrow:hover{ .collapse-toggle { font-weight: 300; position: absolute; - left: -40px; + left: -23px; top: 0; } From 71c4da866a0e71fccc25d9be7e86b992545d4f3d Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Wed, 7 Feb 2018 00:46:47 +0300 Subject: [PATCH 08/12] rustdoc: Fix doc and impl collapsing on small screens --- src/librustdoc/html/static/rustdoc.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index d4b9fbab801a4..515d728c17443 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1192,5 +1192,6 @@ kbd { .hidden-by-impl-hider, .hidden-by-usual-hider { - display: none; + /* important because of conflicting rule for small screens */ + display: none !important; } From 644258044d2bde356b2689634e357252dc43e087 Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Sat, 17 Feb 2018 20:46:06 +0300 Subject: [PATCH 09/12] =?UTF-8?q?rustdoc:=20Remove=20visual=20overlap=20be?= =?UTF-8?q?tween=20=C2=A7=20and=20[+]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/librustdoc/html/static/rustdoc.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 515d728c17443..86110e31e3252 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -110,6 +110,7 @@ h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant { } h3.impl, h3.method, h3.type { margin-top: 15px; + padding-left: 15px; } h1, h2, h3, h4, @@ -508,10 +509,10 @@ a { .anchor { display: none; position: absolute; - left: -25px; + left: -5px; } .anchor.field { - left: -20px; + left: -5px; } .anchor:before { content: '\2002\00a7\2002'; From 3c83596f04d48afab8d9d9066c2c22a741e82f1b Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Sat, 17 Feb 2018 20:54:00 +0300 Subject: [PATCH 10/12] rustdoc: Fix position of collapse-toggle on small screens --- src/librustdoc/html/static/rustdoc.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 86110e31e3252..59b1ea157d93e 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1045,6 +1045,10 @@ h4 > .important-traits { z-index: -1; border-bottom: 1px solid; } + + .collapse-toggle { + left: -17px; + } } From bf03dd0ca7b62afe9484bd87102905007b03d46d Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Mon, 19 Feb 2018 23:22:08 +0300 Subject: [PATCH 11/12] =?UTF-8?q?rustdoc:=20Reposition=20the=20=C2=A7=20pe?= =?UTF-8?q?r=20GuillaumeGomez=20request?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/librustdoc/html/static/rustdoc.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 59b1ea157d93e..b8a7909201b66 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -509,7 +509,7 @@ a { .anchor { display: none; position: absolute; - left: -5px; + left: -7px; } .anchor.field { left: -5px; @@ -906,6 +906,10 @@ span.since { .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant { display: flex; } + + .anchor { + left: -5px; + } } @media print { From df1b9a8584bf273fb807bae2d9dd55833aee5964 Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Tue, 20 Feb 2018 22:46:24 +0300 Subject: [PATCH 12/12] =?UTF-8?q?rustdoc:=20On=20mobile:=20hide=20=C2=A7,?= =?UTF-8?q?=20adjust=20[+]=20position?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/librustdoc/html/static/rustdoc.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index b8a7909201b66..e8d2ca63e492d 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -908,7 +908,7 @@ span.since { } .anchor { - left: -5px; + display: none !important; } } @@ -1051,7 +1051,11 @@ h4 > .important-traits { } .collapse-toggle { - left: -17px; + left: -20px; + } + + .impl > .collapse-toggle { + left: -10px; } }