Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: remove CSS @media (min-width: 701px) #103164

Merged
merged 2 commits into from
Oct 19, 2022

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Oct 17, 2022

The two rules within it can and should be done without the separate media query:

  • There ain't no rule saying a viewport can't be 700.5px wide, since hardware pixels can be finer than CSS pixels.

    Screenshot

    image

  • The rule for the first example-wrap child should probably apply on mobile.

    Screenshots

    Before

    rustdoc-before

    After

    rustdoc-after

  • The rule for the source sidebar is overriden by the mobile rule setting max-width: 100vw, so it can be merged with the rest of the styles.

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 17, 2022
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jsha (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 17, 2022
The two rules within it can and should be done without the separate
media query:

  * There ain't no rule saying a viewport can't be `700.5px` wide, since
    hardware pixels can be finer than CSS pixels.

  * The rule for the first example-wrap child should probably apply
    on mobile.

  * The rule for the source sidebar is overriden by the mobile rule
    setting `max-width: 100vw`, so it can be merged with the rest
    of the styles.
Since it's possible to have a 700.5px viewport width, the JS needs to not
switch to mobile mode in such a setup.
assert-css: (".sidebar", {"display": "block", "left": "-1000px"})

// Scroll down.
scroll-to: "//h2[@id='blanket-implementations']"
assert-window-property: {"pageYOffset": "651"}
assert-window-property: {"pageYOffset": "627"}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would benefit from a store-window-property command.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add one. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@notriddle notriddle assigned GuillaumeGomez and unassigned jsha Oct 18, 2022
@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 18, 2022

📌 Commit d4e4b08 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 18, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 18, 2022
…h, r=GuillaumeGomez

rustdoc: remove CSS `@media (min-width: 701px)`

The two rules within it can and should be done without the separate media query:

  * There ain't no rule saying a viewport can't be `700.5px` wide, since hardware pixels can be finer than CSS pixels.

    <details><summary>Screenshot</summary>

    ![image](https://user-images.githubusercontent.com/1593513/196283804-e946fbe3-d914-4819-ba2d-b4a6a07f190a.png)

    </details>

  * The rule for the first example-wrap child should probably apply on mobile.

    <details><summary>Screenshots</summary>

    ## Before

    ![rustdoc-before](https://user-images.githubusercontent.com/1593513/196282813-88b861c7-7b05-4de5-a421-914396f86a04.png)

    ## After

    ![rustdoc-after](https://user-images.githubusercontent.com/1593513/196282842-e57760c2-72d5-4dad-94f5-1d7175043326.png)

    </details>

  * The rule for the source sidebar is overriden by the mobile rule setting `max-width: 100vw`, so it can be merged with the rest of the styles.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 19, 2022
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#101889 (doc: rewrite doc for uint::{carrying_add,borrowing_sub})
 - rust-lang#102507 (More slice::partition_point examples)
 - rust-lang#103164 (rustdoc: remove CSS ``@media` (min-width: 701px)`)
 - rust-lang#103189 (Clean up code-color and headers-color rustdoc GUI tests)
 - rust-lang#103203 (Retrieve LLVM version from llvm-filecheck binary if it is not set yet)
 - rust-lang#103204 (Add some more autolabels)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2ae06ca into rust-lang:master Oct 19, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 19, 2022
@notriddle notriddle deleted the notriddle/media-min-width branch October 19, 2022 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants