-
Notifications
You must be signed in to change notification settings - Fork 165
Adjust opacity of filter/overlay layer for IE and Edge #121
Comments
An update with examples when appying #124: |
As I noted in the other thread, unfortunately adjusting the opacity results in less-accessible text contrast. 😞 I agree that we should come up with a better solution for this though — |
Could this fall back to an |
Using an rgba color gives the same results since it is about the opacity of another layer than the layer that contains the text. I was thinking about using @supports and that is possible to prevent losing contrast on browsers supporting |
For what it's worth... :-) This is the highest similarity I get when adjusting opacity and background color for browsers that do not support
Tweak 2
I did not change the readability layer (fifth layer). Maybe a bit better like this? At least, the initial design does not change for supporting browsers. I am not sure whether accessibility tests pass for the initial design, so maybe that (or only the readability overlay) should be tweaked as well before going further or in another direction? Tweak 1. Chrome on the left (= initial design), Edge on the right: Tweak 2. Chrome on the left (= initial design), Edge on the right: |
Thank you for all your research on this, @LittleBigThing! I took a look this afternoon, and tweak 1 above appears to be a good balance of maintaining the current appearance while maintaining similar support in other browsers. Lets move forward with that direction.
I just did a quick preliminary check, and both of these result in WCAG AA-passing color contrast for all the text sitting on top. (The lightest possible background color while using That said, we'll keep tracking the accessibility portion of this over in #6. If we add an additional over/underlay we'll plan on making sure it works in both contexts. |
Ok, I'll try to propose a PR later today. |
Thank you! |
So, another shot at making the featured image visible in IE and Edge. Some remarks:
|
Oh also this:
|
Thanks again, @LittleBigThing! Just leaving a couple notes here:
I think leaving these in place for all browsers is fine for now — we don't currently need
I ran another test before merging, and here are the lightest colors possible with our filters:
They're fairly similar, but the IE/Edge solution has slightly more contrast. Not bad. 👍
You're right! That mixin appears to be unused. 😄 We should remove it. |
The blue layer that is set over featured images has a distinct effect and it makes the theme kind of unique (among default themes). However,
mix-blend-mode
that is used to achieve this is not supported by, for example, Internet Explorer and Edge. In these browsers, a blue rectangle is displayed without any transparency: the featured image is not visible at all.To kind of change this, the opacity value of the overlay could be lowered. This results in a similar (but different :-)) effect in browsers not supporting
mix-blend-mode
.We should probably look for a better solution...
Also, the color of the layer should be customisable.
The text was updated successfully, but these errors were encountered: