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

Remove whitespaces and use CSS to align line numbers to the right instead #94696

Merged
merged 2 commits into from
Mar 7, 2022

Conversation

GuillaumeGomez
Copy link
Member

Instead of generating whitespaces to create padding, we simply use the CSS rule: text-align: right.

Nice side-effect: it reduces the generated HTML size from 75.004 to 74.828 (MegaBytes) on the std source pages (it's not much but it's always a nice plus 😆 ).

There are no changes in the generated UI.

r? @notriddle

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Mar 7, 2022
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd,@jsha

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 7, 2022
@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 7, 2022

📌 Commit f23d6d3 has been approved by notriddle

@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 Mar 7, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2022
…askrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#93350 (libunwind: readd link attrs to _Unwind_Backtrace)
 - rust-lang#93827 (Stabilize const_fn_fn_ptr_basics, const_fn_trait_bound, and const_impl_trait)
 - rust-lang#94696 (Remove whitespaces and use CSS to align line numbers to the right instead)
 - rust-lang#94700 (rustdoc: Update minifier version)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 77562f2 into rust-lang:master Mar 7, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 7, 2022
@GuillaumeGomez GuillaumeGomez deleted the align-line-numbers-right branch March 7, 2022 23:36
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 14, 2022
…askrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#93350 (libunwind: readd link attrs to _Unwind_Backtrace)
 - rust-lang#93827 (Stabilize const_fn_fn_ptr_basics, const_fn_trait_bound, and const_impl_trait)
 - rust-lang#94696 (Remove whitespaces and use CSS to align line numbers to the right instead)
 - rust-lang#94700 (rustdoc: Update minifier version)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) 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.

5 participants