Skip to content

help menu for doc make the whole page blur #52

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

Closed
Kerollmops opened this issue Sep 20, 2016 · 11 comments
Closed

help menu for doc make the whole page blur #52

Kerollmops opened this issue Sep 20, 2016 · 11 comments
Labels
C-bug Category: This is a bug

Comments

@Kerollmops
Copy link

Kerollmops commented Sep 20, 2016

When pressing ? the whole page is blur, a little error in the css I supposed

@onur
Copy link
Member

onur commented Sep 20, 2016

Thanks for reporting.

But I am not sure when this occurs, can you give a link?

@Kerollmops
Copy link
Author

Kerollmops commented Sep 20, 2016

go on this page https://docs.rs/keen/1.2.0/keen/ and press the key ?

@onur onur added the C-bug Category: This is a bug label Sep 20, 2016
@onur
Copy link
Member

onur commented Sep 20, 2016

woah thanks for reporting, I have an addon replacing ? content thats why I've never seen it. Let me investigate what is causing this blur.

@Kerollmops
Copy link
Author

What is this addon ? 😄 And what is it for ?

@onur
Copy link
Member

onur commented Sep 20, 2016

Ahh it's nothing related with rust. VimFx was replacing help content for me.

This issue is caused by this CSS rules defined in rustdoc.css:

body.blur > :not(#help) {
    filter: blur(8px);
    -webkit-filter: blur(8px);
    opacity: .7;
}

It is adding a blur filter to every child element of body.blur except #help child. Problem is, help is placed inside body.blur > div.rustdoc > #help in docs.rs. I don't know how to override this, I hope someone can help.

@Kerollmops
Copy link
Author

Kerollmops commented Sep 20, 2016

Why not using -Z unstable-options --extend-css dark.css.

https://blog.guillaume-gomez.fr/articles/2016-09-16+Generating+doc+with+rustdoc+and+a+custom+theme

@onur
Copy link
Member

onur commented Sep 20, 2016

Well actually docs.rs is not just extending css. It is adding some navigation and moving rustdoc content to div.rustdoc. You can see it in rustdoc.hbs. I don't think --extend-css will make any difference.

@Kerollmops
Copy link
Author

Can we just erase this rule:

body.blur > :not(#help) {
    filter: blur(8px);
    -webkit-filter: blur(8px);
    opacity: .7;
}

by this one:

div.rustdoc.blur > :not(#help) {
    filter: blur(8px);
    -webkit-filter: blur(8px);
    opacity: .7;
}

and erase the previous rule: http://stackoverflow.com/questions/15901030/reset-remove-css-styles-for-element-only

This is ugly, no ?

@Kerollmops
Copy link
Author

In fact that's the javascript script !
It touch the DOM and add the .blur class to the body element.

@onur onur closed this as completed in a8a3ece Sep 20, 2016
@onur
Copy link
Member

onur commented Sep 20, 2016

@Kerollmops your rule worked with a little bit workaround, thanks again!

@Kerollmops
Copy link
Author

Great 👍

hadronized pushed a commit to hadronized/docs.rs that referenced this issue Nov 30, 2016
Closes: rust-lang#52

Thanks @Kerollmops for reporting and finding a workaround for this!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants