diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-04-27 10:26:18 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-04-27 10:26:18 -0400 |
| commit | 08c0299a82b6fc9e8f1d8ea4f49d1dce94d59e08 (patch) | |
| tree | 222138cd8b84203031dfa1e0280b150991bc4034 | |
| parent | 5c60145323d6e42cee5ad11efdabbd753b667d63 (diff) | |
| parent | 72e8f7b1ab344546e7b073317d4f696acab1a5f8 (diff) | |
| download | rust-08c0299a82b6fc9e8f1d8ea4f49d1dce94d59e08.tar.gz rust-08c0299a82b6fc9e8f1d8ea4f49d1dce94d59e08.zip | |
Rollup merge of #24797 - roryokane:patch-1, r=nikomatsakis
The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look slightly smoother. If you don’t want to use literal Unicode characters, I can change ‘−’ to `\u2212`. I’m not starting with that suggestion because ‘−’ is easier to read and understand, and if I used `\u2212`, it would probably be necessary to also comment the usage on each line to explain what character is being used.
| -rw-r--r-- | src/librustdoc/html/render.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/static/main.js | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 1993f03efd1..a2cfb533c1a 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1460,7 +1460,7 @@ impl<'a> fmt::Display for Item<'a> { try!(write!(fmt, "<span class='out-of-band'>")); try!(write!(fmt, r##"<span id='render-detail'> - <a id="toggle-all-docs" href="#" title="collapse all docs">[-]</a> + <a id="toggle-all-docs" href="#" title="collapse all docs">[−]</a> </span>"##)); // Write `src` tag diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 56cea50a502..c2a59278a86 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -808,20 +808,20 @@ $("#toggle-all-docs").on("click", function() { var toggle = $("#toggle-all-docs"); - if (toggle.html() == "[-]") { - toggle.html("[+]"); + if (toggle.html() == "[−]") { + toggle.html("[+]"); toggle.attr("title", "expand all docs"); $(".docblock").hide(); $(".toggle-label").show(); $(".toggle-wrapper").addClass("collapsed"); - $(".collapse-toggle").children(".inner").html("+"); + $(".collapse-toggle").children(".inner").html("+"); } else { - toggle.html("[-]"); + toggle.html("[−]"); toggle.attr("title", "collapse all docs"); $(".docblock").show(); $(".toggle-label").hide(); $(".toggle-wrapper").removeClass("collapsed"); - $(".collapse-toggle").children(".inner").html("-"); + $(".collapse-toggle").children(".inner").html("−"); } }); @@ -835,12 +835,12 @@ if (relatedDoc.is(":visible")) { relatedDoc.slideUp({duration:'fast', easing:'linear'}); toggle.parent(".toggle-wrapper").addClass("collapsed"); - toggle.children(".inner").html("+"); + toggle.children(".inner").html("+"); toggle.children(".toggle-label").fadeIn(); } else { relatedDoc.slideDown({duration:'fast', easing:'linear'}); toggle.parent(".toggle-wrapper").removeClass("collapsed"); - toggle.children(".inner").html("-"); + toggle.children(".inner").html("−"); toggle.children(".toggle-label").hide(); } } @@ -848,7 +848,7 @@ $(function() { var toggle = $("<a/>", {'href': 'javascript:void(0)', 'class': 'collapse-toggle'}) - .html("[<span class='inner'>-</span>]"); + .html("[<span class='inner'>−</span>]"); $(".method").each(function() { if ($(this).next().is(".docblock") || |
