spring-security icon indicating copy to clipboard operation
spring-security copied to clipboard

dark-mode problem due to transparency has been fixed

Open best-rion opened this issue 1 year ago • 2 comments

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'

best-rion avatar Oct 24 '24 13:10 best-rion

@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.

pivotal-cla avatar Oct 24 '24 13:10 pivotal-cla

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

pivotal-cla avatar Oct 24 '24 13:10 pivotal-cla

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 avatar Oct 25 '24 03:10 jzheaux

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.

jzheaux avatar Oct 25 '24 03:10 jzheaux

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?

best-rion avatar Oct 25 '24 09:10 best-rion

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

jzheaux avatar Oct 25 '24 20:10 jzheaux

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.

jzheaux avatar Nov 05 '24 15:11 jzheaux

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

best-rion avatar Nov 08 '24 00:11 best-rion