Skip to content

Conversation

@agriyakhetarpal
Copy link
Contributor

@agriyakhetarpal agriyakhetarpal commented Nov 19, 2025

The code originating from the PST stylesheets here:

/* Adjust images in dark mode (unless they have class .only-dark or
* .dark-light, in which case assume they're already optimized for dark
* mode).
*/
img:not(.only-dark, .dark-light) {
filter: brightness(0.8) contrast(1.2);
}
/* Give images a light background in dark mode in case they have
* transparency and black text (unless they have class .only-dark or .dark-light, in
* which case assume they're already optimized for dark mode).
*/
.bd-content img:not(.only-dark, .dark-light) {
background-color: rgb(255 255 255);
border-radius: 0.25rem;
}
unfortunately causes the Scientific Python logo and any custom logos provided by users to appear darker and with increased contrast in dark mode. This PR addresses that issue by adding the dark-light class to all logos to ensure compliance with that rule. I view this as a bug and as an unintended side effect of using these stylesheets, as I believe it would be better for us to leave the decision to adjust logos in dark mode to the respective projects through their own stylesheets.

This is another one of the current dark mode issues; xref #618. Another piece of reasoning behind this: our dark mode support is already pretty sensitive, and we don't want projects' logos to inadvertently break WCAG 1.4.3 when switching to dark mode if their colours are very close to the minimum-contrast threshold!

P.S. I thought about removing this code section from the stylesheets I linked above entirely, but since it's coming from the PST, I decided not to, assuming there must be a reason they included it, and deviating from the PST styles in general warrants a separate discussion elsewhere.


BEFORE

image

AFTER

image

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for scientific-python-hugo-theme ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a5bfd36
🔍 Latest deploy log https://app.netlify.com/projects/scientific-python-hugo-theme/deploys/691d48b559cfcc0008e23979
😎 Deploy Preview https://deploy-preview-679--scientific-python-hugo-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 93
Accessibility: 100
Best Practices: 100
SEO: 91
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant