-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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: clean up line numbers on code examples #102118
Conversation
`display: inline-flex` was used as part of e961d39, the original commit that added these line numbers. Does anyone know why it was done this way?
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @CraftSpider (or someone else) soon. Please see the contribution instructions for more information. |
df39b76
to
f66769f
Compare
@@ -10,7 +10,7 @@ assert-property: ("html", {"scrollTop": "0"}) | |||
click: '//a[text() = "barbar"]' | |||
assert-property: ("html", {"scrollTop": "125"}) | |||
click: '//a[text() = "bar"]' | |||
assert-property: ("html", {"scrollTop": "166"}) | |||
assert-property: ("html", {"scrollTop": "156"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line wrapping changed because of the slightly wider header box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I guess it's a good thing then!
Apart from my question, it looks great! |
Thanks! @bors r+ rollup |
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#102113 (OpTy: fix a method taking self rather than &self) - rust-lang#102118 (rustdoc: clean up line numbers on code examples) - rust-lang#102123 (Add note to clippy::non_expressive_names doc) - rust-lang#102125 (rustdoc: remove no-op CSS `.content .item-info { position: relative }`) - rust-lang#102127 (Use appropriate variable names) - rust-lang#102128 (Const unification is already infallible, remove the error handling logic) - rust-lang#102133 (Use valtrees for comparison) - rust-lang#102135 (Improve some AllTypes fields name) - rust-lang#102144 (Extend const_convert with const {FormResidual, Try} for ControlFlow.) - rust-lang#102147 (rustdoc: remove no-op CSS `.location:empty { border: none }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
First commit switches from
display: inline-flex; width: 100%
todisplay: flex
.display: inline-flex
was used as part of e961d39, the original commit that added these line numbers. Does anyone know why it was done this way?Second commit makes it so that toggling this checkbox will update the page in real time, just like changing themes does.
Preview: https://notriddle.com/notriddle-rustdoc-test/line-numbers/std/vec/struct.Vec.html