So I have a custom cursor that uses mix-blend-mode: exclusion
in my website.
The cursor's original colour (without considering mix-blend-mode
) is cyan
and most elements below it are either white
, black
, blue
or magenta
, so the colours you can see there are these:
body {
margin: 0;
display: flex;
flex-wrap: wrap;
height: 100vh;
overflow: hidden;
}
.box {
width: 50vw;
height: 50vh;
}
.circle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 25vh;
width: 50vh;
height: 50vh;
mix-blend-mode: difference;
background: #0FF;
}
<div class="box" style="background: #FFF;"></div>
<div class="box" style="background: #00F;"></div>
<div class="box" style="background: #000;"></div>
<div class="box" style="background: #F0F;"></div>
<div class="circle"></div>
However, that doesn't look the same in Chrome than it does in Firefox.
Chrome (Version 81.0.4044.113 (Official Build) (64-bit)
):
Firefox (Version 75.0 (64-bit)
):
I'd like to know if there's a way to make both looks the same.
I have been playing around with other values for mix-blend-mode
(exclusion
, in particular) and filter
, but I can't get anything to look consistent in both and maintain a similar behaviour.
Funny enough, if you change the colour of the cusror (.circle
in the example), it works fine for most other values...