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

Allow blur to work even when rustdoc is not the main <body> #77651

Closed

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 7, 2020
@GuillaumeGomez GuillaumeGomez added A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 7, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 7, 2020

You also need to update the styles, right now they hard-code <body>.

@jyn514 jyn514 changed the title More specific blur Allow blur to work even when rustdoc is not the main <body> Oct 7, 2020
@GuillaumeGomez
Copy link
Member Author

Forgot to commit it, sorry... Force-pushed it.

@jyn514
Copy link
Member

jyn514 commented Oct 7, 2020

Hmm, I'm a little nervous changing from a class to an ID will break docs.rs' fragile parsing code. I don't have something to point to, but we hard-code a lot of styles and I'd prefer to not to change the rustdoc HTML more than we have to 😅

@GuillaumeGomez
Copy link
Member Author

It makes it stronger because otherwise I'll have to loop over elements with the rustdoc class. I can give a hand on the docs.rs side to ensure it won't break anything. 😉

@jyn514
Copy link
Member

jyn514 commented Oct 7, 2020

I can give a hand on the docs.rs side to ensure it won't break anything. 😉

Well the issue is it will have to be compatible with the HTML before and after the change, which sounds difficult if you're changing from a class to an ID.

I'm also no longer sure this should be fixed on rustdoc's end ... I think this is actually a regression, take a look at https://github.com/rust-lang/docs.rs/blob/38ba774e14eb4f658d834218d003583e423c5f37/templates/style/base.scss#L42-L55

@GuillaumeGomez
Copy link
Member Author

You can have both .rustdoc and #rustdoc. I personally think it's better to use an ID but if you think it's too much of a burden, I can keep the class and iterate over the elements. As you prefer.

@GuillaumeGomez GuillaumeGomez deleted the more-specific-blur branch October 8, 2020 08:11
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) 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.

3 participants