Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does CSS mix-blend-mode work with transform?

Apparently mix-blend-mode doesn't play nice with transform: translate() and z-index. Applying any of these to some text element will immediately cancel the mix-blend-mode affect.

Questions

  1. Is this a known limitation?
  2. Is there a CSS-based workaround?

I know I can use JavaScript to mimic the transform: translate() functionality, but this isn't really ideal.

like image 889
Shukri Adams Avatar asked May 04 '26 00:05

Shukri Adams


1 Answers

I faced the same issue and the workaround I found was replacing transform: translate() by position:absolute, margin-top:<y>px and margin-left:<x>px.

NB: Negative margins are valid so it still works with negative x and y.

like image 123
STTR13 Avatar answered May 05 '26 19:05

STTR13