Skip to content

Commit

Permalink
Rollup merge of rust-lang#99810 - GuillaumeGomez:fix-settings-slider-…
Browse files Browse the repository at this point in the history
…small-width, r=notriddle

Fix settings slider on small width screens

Fixes rust-lang#99794.

Screenshot of the fix:

![Screenshot from 2022-07-27 14-17-08](https://user-images.githubusercontent.com/3050060/181250007-55f982d1-89db-45b7-a4f1-0d1729e6a3e3.png)

cc ```@jsha```
r? ```@notriddle```
  • Loading branch information
matthiaskrgr authored Jul 28, 2022
2 parents 4dba881 + 1564305 commit fbbbac9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustdoc/html/static/css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@

.toggle {
position: relative;
display: inline-block;
width: 100%;
height: 27px;
margin-right: 20px;
display: flex;
align-items: center;
Expand All @@ -58,6 +56,7 @@
.slider {
position: relative;
width: 45px;
min-width: 45px;
display: block;
height: 28px;
margin-right: 20px;
Expand Down
9 changes: 9 additions & 0 deletions src/test/rustdoc-gui/settings.goml
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,12 @@ assert-false: "noscript section"
javascript: false
reload:
assert-css: ("noscript section", {"display": "block"})
javascript: true

// Check for the display on small screen
show-text: true
reload:
size: (300, 1000)
click: "#settings-menu"
wait-for: "#settings"
assert-css: ("#settings .slider", {"width": "45px"}, ALL)

0 comments on commit fbbbac9

Please sign in to comment.