Did Chrome / Safari recently change the way mix-blend-mode is handled
Asked Answered
L

1

5

I made a webpage a couple of weeks ago, using the (then) recent version of Chrome (probably v56 or v57 but i dont know for sure), Safari and Firefox during development (on OSX). http://dirkluetter.de/projecttype/kamera

Firefox (v52 & v53) still displays the Page as intended. Screenshot Firefox v52

While the most recent Chrome version (v58) does not anymore. Screenshot Chrome v58

I used mix-blend-mode and background-blend-mode CSS properties which worked fine then - and still do on FF. Now Chrome / Safari seem to ignore the property, while Firefox still displays the page as intended. Did something change recently in the way Webkit browsers handle mix-blend-mode? i cant find any infos regarding a change on this ... there are several other questions regarding mix-blend-modes and chrome but the ones i checked where not related to mine.

Linderman answered 19/4, 2017 at 18:44 Comment(1)
This looks like the breaking change, but I'm not sure why specifically crrev.com/438298Stool
S
6

I'm not sure exactly what's going on, but I can get it to work in Chrome by adding background: white to the root element and moving the mix-blend-mode to a wrapper element inside of body.

html {
  background: white;
  display: flex;
  height: 100%;
}

body {
  margin: 0;
  background-blend-mode: luminosity;
  background-image: url(https://upload.wikimedia.org/wikipedia/commons/1/15/AreeiroMetroLx2.JPG);
  background-color: #006699;
  background-size: cover;
}

div {
  mix-blend-mode: multiply;
}

p {
  color: magenta;
}
<div>
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sollicitudin felis ultrices lacus venenatis, in porta dui sagittis. Aliquam maximus massa diam, ut elementum sem efficitur mollis. Proin mattis magna ante, sit amet semper nulla semper at. Vivamus hendrerit tortor nec lacus venenatis, vitae molestie odio consectetur. Vivamus fermentum id ligula et scelerisque. Etiam eu metus nec lacus aliquet convallis at sed mi. Integer euismod lorem risus, sit amet molestie mi egestas vitae. In quis consequat ligula. Pellentesque erat elit, ultricies et massa ut, cursus congue dolor. Suspendisse risus est, aliquet nec justo a, bibendum convallis justo.
</div>
Stool answered 19/4, 2017 at 20:17 Comment(2)
Although a workaround, i guess this is the best (and only?) solution for now. Let's hope for the chrome dev team to fix this asap.Linderman
Bug still exist in V59Linderman

© 2022 - 2024 — McMap. All rights reserved.