Skip to content

Commit

Permalink
Rollup merge of #105143 - notriddle:notriddle/scraped-example-list-fo…
Browse files Browse the repository at this point in the history
…nt, r=GuillaumeGomez

rustdoc: use simpler CSS for setting the font on scraped examples
  • Loading branch information
matthiaskrgr authored Dec 2, 2022
2 parents c7edfdd + 935def4 commit 8e059d5
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ a.srclink,
#help-button > a,
details.rustdoc-toggle.top-doc > summary,
details.rustdoc-toggle.non-exhaustive > summary,
.scraped-example-title,
.more-examples-toggle summary, .more-examples-toggle .hide-more,
.example-links a,
.scraped-example-list,
/* This selector is for the items listed in the "all items" page. */
ul.all-items {
font-family: "Fira Sans", Arial, NanumBarunGothic, sans-serif;
Expand Down
8 changes: 8 additions & 0 deletions src/test/rustdoc-gui/scrape-examples-fonts.goml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"

store-value: (font, '"Fira Sans", Arial, NanumBarunGothic, sans-serif')

wait-for-css: (".scraped-example-title", {"font-family": |font|})
wait-for-css: (".more-examples-toggle summary", {"font-family": |font|})
wait-for-css: (".more-examples-toggle .hide-more", {"font-family": |font|})
wait-for-css: (".example-links a", {"font-family": |font|})
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
scrape_examples::test_many();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
scrape_examples::test_many();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
scrape_examples::test_many();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
scrape_examples::test_many();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
scrape_examples::test_many();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
scrape_examples::test_many();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
scrape_examples::test_many();
}
2 changes: 2 additions & 0 deletions src/test/rustdoc-gui/src/scrape_examples/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
/// test();
/// ```
pub fn test() {}

pub fn test_many() {}

0 comments on commit 8e059d5

Please sign in to comment.