Skip to content

Conversation

@best-rion
Copy link

@best-rion best-rion commented Oct 24, 2024

In spring-security documentation page I was having difficulty to read diagrams in dark mode. Because their backgrounds were transparent and text black. So I converted the background of all diagrams to white and fixed the problem.

It provides a better user experience.

ImageMagick was used for conversion. The command used in the process :

~/spring-security/docs/modules/ROOT/assets/images/servlet$
mogrify -background white -alpha remove -alpha off find . -name '*.png'

Correct Image Rendering in Dark Mode

Closes gh-14834

@pivotal-cla
Copy link

@best-rion Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 24, 2024
@pivotal-cla
Copy link

@best-rion Thank you for signing the Contributor License Agreement!

@sjohnr sjohnr added in: docs An issue in Documentation or samples type: enhancement A general enhancement labels Oct 24, 2024
@jzheaux
Copy link
Contributor

jzheaux commented Oct 25, 2024

Hi, @best-rion! I appreciate all your work here. Instead of changing the image transparency, though, will you please take a look at this ticket and this feature?

Essentially, I think you can do the following to each image reference:

+ [.invert-dark]
image::<image-name>

And then all the images can remain transparent.

@jzheaux
Copy link
Contributor

jzheaux commented Oct 25, 2024

Also, would you please include the following ticket at the end of your comment:

Correct Image Rendering in Dark Mode

Closes gh-14834

This integrates with our ticket workflow a little better. It also allows folks to research more deeply when they want to know why a given change was made.

@best-rion
Copy link
Author

Hi, @best-rion! I appreciate all your work here. Instead of changing the image transparency, though, will you please take a look at this ticket and this feature?

Essentially, I think you can do the following to each image reference:

+ [.invert-dark]
image::<image-name>

And then all the images can remain transparent.

Do you mean changing background-color through css instead of using images with white background?

@jzheaux
Copy link
Contributor

jzheaux commented Oct 25, 2024

Yes. spring-ui-antora's CSS has a class, invert-dark, that we can use.

@jzheaux
Copy link
Contributor

jzheaux commented Nov 5, 2024

Hi, @best-rion, are you able to make the requested changes? I'm happy to take care of it, if not; I just appreciate your willingness and wanted to check with your plans first.

If I don't hear from you in the next few days, then I'll go ahead and close this PR in favor of adding the CSS style classes.

@best-rion
Copy link
Author

Yeah, go ahead. I have been busy since then. Do whatever you can, just fix the readability problem. I will appreciate that.

@best-rion best-rion closed this by deleting the head repository Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: docs An issue in Documentation or samples status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation images should render clearly in both light and dark mode

5 participants