Skip to content

Commit 4ade708

Browse files
committed
In [-] doc buttons, change hyphen ‘-’ to minus ‘−’
The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look more smooth.
1 parent f9e53c7 commit 4ade708

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustdoc/html/static/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -808,20 +808,20 @@
808808

809809
$("#toggle-all-docs").on("click", function() {
810810
var toggle = $("#toggle-all-docs");
811-
if (toggle.html() == "[-]") {
811+
if (toggle.html() == "[]") {
812812
toggle.html("[+]");
813813
toggle.attr("title", "expand all docs");
814814
$(".docblock").hide();
815815
$(".toggle-label").show();
816816
$(".toggle-wrapper").addClass("collapsed");
817817
$(".collapse-toggle").children(".inner").html("+");
818818
} else {
819-
toggle.html("[-]");
819+
toggle.html("[]");
820820
toggle.attr("title", "collapse all docs");
821821
$(".docblock").show();
822822
$(".toggle-label").hide();
823823
$(".toggle-wrapper").removeClass("collapsed");
824-
$(".collapse-toggle").children(".inner").html("-");
824+
$(".collapse-toggle").children(".inner").html("");
825825
}
826826
});
827827

@@ -840,15 +840,15 @@
840840
} else {
841841
relatedDoc.slideDown({duration:'fast', easing:'linear'});
842842
toggle.parent(".toggle-wrapper").removeClass("collapsed");
843-
toggle.children(".inner").html("-");
843+
toggle.children(".inner").html("");
844844
toggle.children(".toggle-label").hide();
845845
}
846846
}
847847
});
848848

849849
$(function() {
850850
var toggle = $("<a/>", {'href': 'javascript:void(0)', 'class': 'collapse-toggle'})
851-
.html("[<span class='inner'>-</span>]");
851+
.html("[<span class='inner'></span>]");
852852

853853
$(".method").each(function() {
854854
if ($(this).next().is(".docblock") ||

0 commit comments

Comments
 (0)