All things Shopify and commerce
A picture containing black colors that has a transparent background will appear totally black on phone with dark mode theme. How can I solve this.
Hey @Rabi3
Can you try white or some other colour on the back of your transparent photo? you can do this with some CSS code or manually add the background colour.
Hello.. if I add a white background it will appear white in dark mode while all the rest will be in black..
Can you share your store URL, let me see and then i can suggest you a solution.
please check the slideshow before the footer (24/7 support, satisfaction guarantee, safe & secure checkout)
Thank you for sharing the URL
Your section before the footer is white and to keep it always white give it a white background color. Does this work for you?
If the phone is not on dark mode either the transparent background or the white background will work since shopify theme background is also white.
However, in dark mode on the phone all the background will be black and this section will look white which is not consistent.
If I keep the background transparent, the black items will have a black background and will not appear anymore.
got it, then for the solution you can use CSS , here is a reference
/* For light mode */
@media (prefers-color-scheme: light) {
.your-element {
background-color: white; /* Set a light background color */
color: black; /* Set a contrasting text color */
}
}
/* For dark mode */
@media (prefers-color-scheme: dark) {
.your-element {
background-color: black; /* Set a dark background color */
color: white; /* Set a contrasting text color */
}
}
where shall I add this code?
User | RANK |
---|---|
50 | |
45 | |
39 | |
28 | |
21 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023