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

Document how to remove the automatic white background for images with the dark theme #879

Closed
12rambau opened this issue Aug 17, 2022 · 5 comments · Fixed by #914
Closed
Labels
kind: documentation Improvements or additions to documentation

Comments

@12rambau
Copy link
Collaborator

12rambau commented Aug 17, 2022

I didn't follow when this modification was included but this morning all the images of my documentation has gained a white background.

Experimenting a bit I realized that the images that have not the "only-dark" class are automatically earning this new white colored background. In the case of my documentation that is using images that work for both I don't need such a change and I don't want to duplicate my images or add extra parameter to every figures to leave them as they are.

Is there a global html parameter to deactivate this modification ?
Is it really needed ?

image

@choldgraf
Copy link
Collaborator

I think the question here comes down to deciding which is more common:

  • People have images that work in both black/white themes, and adding a white background makes it worse in dark mode
  • People have images that only work in a white theme, and adding a white background makes the default better in dark more

My feeling was that the second option is more common which is why we added this (we got several reports of people saying that their plot outlines etc didn't show up properly because they were in black). But if others generally disagree we can figure out another way around this, maybe with a config flag or something?

@12rambau
Copy link
Collaborator Author

I agree with your guess I just wanted to check if other would agree with a config parameter

@choldgraf
Copy link
Collaborator

a config parameter seems reasonable to me - though couldn't you also just turn this off with your own manual CSS? e.g.:

      .bd-content img:not(.only-dark) {
        background: unset;
      }

@drammock
Copy link
Collaborator

My feeling was that the second option is more common

That is also my impression

couldn't you also just turn this off with your own manual CSS

I had the same thought. IMO either we provide a config flag or we provide a CSS snippet in the docs so users don't have to figure it out themselves. Slight preference for the latter

@12rambau
Copy link
Collaborator Author

a config parameter seems reasonable to me - though couldn't you also just turn this off with your own manual CSS? e.g.:

This is what I did in my own documentation (openforis/sepal-doc@cb30410). fine by me as well

@12rambau 12rambau added the kind: documentation Improvements or additions to documentation label Aug 19, 2022
@choldgraf choldgraf changed the title all images are displayed with a white background in the black theme Document how to remove the automatic white background for images with the dark theme Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants