]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #43795 - GuillaumeGomez:improve-variants-doc-style, r=QuietMisdreavus
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 11 Aug 2017 08:20:33 +0000 (10:20 +0200)
committerGitHub <noreply@github.com>
Fri, 11 Aug 2017 08:20:33 +0000 (10:20 +0200)
Improve enum variants display

r? @rust-lang/docs

Before:

<img width="1440" alt="screen shot 2017-08-11 at 00 22 54" src="https://user-images.githubusercontent.com/3050060/29194776-728ce0e2-7e2b-11e7-8299-8300cc0c168b.png">

After:

<img width="1440" alt="screen shot 2017-08-11 at 00 22 57" src="https://user-images.githubusercontent.com/3050060/29194783-78867558-7e2b-11e7-9226-1327fd20163a.png">

(The doc of the variant is more aligned with the "[-]" now).

1  2 
src/librustdoc/html/static/rustdoc.css

index 3a3063d7c7d9e32617eb5137bc3533b75f1a57cc,8146c005a5e995747aecd8dd667de89547a8901a..ee94f0baeb9a39bdf9cf590adc1b4c88878ab00b
@@@ -438,16 -438,6 +438,16 @@@ a 
        background: transparent;
  }
  
 +.small-section-header:hover > .anchor {
 +      display: initial;
 +}
 +.anchor {
 +      display: none;
 +}
 +.anchor:after {
 +      content: '\2002\00a7\2002';
 +}
 +
  .docblock a:hover, .docblock-short a:hover, .stability a {
        text-decoration: underline;
  }
@@@ -687,6 -677,10 +687,10 @@@ span.since 
        left: 0;
  }
  
+ .variant + .toggle-wrapper + .docblock > p {
+       margin-top: 5px;
+ }
  .variant + .toggle-wrapper > a {
        margin-top: 5px;
  }
        margin-bottom: 25px;
  }
  
 -.enum .variant, .struct .structfield, .union .structfield {
 +#main > .variant, #main > .structfield {
        display: block;
  }