Skip to content

Commit

Permalink
Rollup merge of rust-lang#105789 - notriddle:notriddle/examples-margi…
Browse files Browse the repository at this point in the history
…n, r=GuillaumeGomez

rustdoc: clean up margin CSS for scraped examples

* This stops applying a margin to the additional example links. Because these links are `display: inline`, it doesn't actually do anything.
* This switches from using a margin-bottom with a special exception for the examples themselves, plus an additional margin on the hide button, to instead using just margin-top on the examples, with an exception for the first one.

No user-visible changes should result from this.
  • Loading branch information
matthiaskrgr committed Dec 17, 2022
2 parents 02ad3ec + f309934 commit bcb12bf
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -2003,7 +2003,6 @@ in storage.js

.more-examples-toggle .hide-more {
margin-left: 25px;
margin-bottom: 5px;
cursor: pointer;
}

Expand Down Expand Up @@ -2031,16 +2030,12 @@ in storage.js
height: 100%;
}

.more-scraped-examples .scraped-example {
margin-bottom: 20px;
}

.more-scraped-examples .scraped-example:last-child {
margin-bottom: 0;
.more-scraped-examples .scraped-example, .example-links {
margin-top: 20px;
}

.example-links a {
margin-top: 20px;
.more-scraped-examples .scraped-example:first-child {
margin-top: 5px;
}

.example-links ul {
Expand Down

0 comments on commit bcb12bf

Please sign in to comment.