-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Update rustdoc code blocks so they use grid: display #105894
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
Update rustdoc code blocks so they use grid: display #105894
Conversation
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@@ -1978,8 +1982,6 @@ in storage.js | |||
} | |||
|
|||
.scraped-example .code-wrapper .example-wrap { | |||
display: grid; | |||
grid-template-columns: max-content auto; | |||
width: 100%; | |||
overflow-x: auto; |
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.
This overflow rule is redundant now, since the overflow-x is now set on all example-wrap blocks. For simplicity’s sake, overflow-y can also be lifted up to there.
assert-css: (".docblock > .example-wrap > pre", {"width": "1756px"}) | ||
|
||
// Confirm that there is no change when line numbers are displayed. | ||
local-storage: {"rustdoc-line-numbers": "true"} |
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.
This test only works if you reload the page.
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.
Good catch, thanks!
Actually this approach is very problematic because of the interactions between tooltips and |
…es-code-blocks, r=notriddle rustdoc: Simplify CSS for scraped code examples code blocks It's another approach than rust-lang#105894 for rust-lang#105823. I simply removed the extra style added for the scraped code blocks which appears to be unneeded. r? `@notriddle`
It's another approach to #105823.
It generalizes the usage of
display: grid
for code blocks instead of just using it for scraped examples.r? @notriddle