CSS tip - maintain tile color (remove darkening effect when overlaying text)

I was searching the Community for this, then figured it out myself when I couldn’t find anyone else referring to it.

This CSS will remove the “graying” effect when you overlay text on top of a Tile. I’m using this because my tiles are basically just solid colors and I’d like to maintain the look even after adding text as an overlay. This also forces it to be black text, bolded.

[data-test="tile-item"] .tile-overlay {background: none;}
[data-test="tile-item"] .tile-subtitle {color: black; font-weight: bold;}

It seems that this doesn’t play well with Safari/IOS…

I recently tried this in one of my apps, using essentially the same CSS:

[data-test="tile-item"] .tile-overlay {
	background: none;
[data-test="tile-item"] .tile-subtitle {
  white-space: break-spaces;
  color: white;
  font-weight: bold;

In the builder and on Android devices, I see the expected result, which is:

But with Safari/IOS…


Any CSS masters know how to fix this one?


I’ve been experiencing this myself with users on iPhone XR and 12. It would great to have a work around, otherwise I have to rebuild the screen :frowning: thanks!

Great catch! Hoping there’s a workaround.

Also, it would be even better to have a native option to disable the dimming effect — it’s especially needed when tile images are simply a flat color and you’re trying to match other styling in the app.


yup, that’s exactly what I’m trying to do

So I managed to resolve this one, but to be honest I’m not really sure what the problem was.

After a bunch of testing different IOS versions and other trial and error (thanks @ThinhDinh for prodding me in different directions and providing some clues), I finally ended up (in desperation) changing the image that was being used with the tiles - and that immediately resolved it!

Originally I had a simple blank 300x100 image that I’d uploaded to Glide. I changed that to fetch an identical image dynamically from dummyimage.com, and that did the trick.

I’m at a complete loss to explain that, but it’s working now and thats all I really care about :joy:


I need that trick right now too!!

Interesting stuff! I’ll keep that in mind!

Yeah as we talked to each other in the chat, this is strange behaviour. What did you use to generate the original image?

1 Like

To be honest, I don’t recall. It was done quite some months ago - I wouldn’t do it that way now - I suspect I just made a png myself using the Mac preview client.


With Prince “Purple Rain” music and my lyrics:
“Purple tiles, purple tiles…
Only want to see you designing these purple tiles !
I know I know, it’s tough…”
:purple_heart: purple, so…

1 Like