thegreenwebfoundation / tgwf2015

The wordpress theme in use on www.thegreenwebfoundation.org
GNU General Public License v3.0
0 stars 1 forks source link

Adjust background image css, to increase contrast #9

Open mrchrisadams opened 3 years ago

mrchrisadams commented 3 years ago

This change adds a css linear-gradient to add a tint to background images - to increase the contrast, when we have images that use light colours and when we have light text.

All modern browsers should support it, and I think for other browsers the rules are ignored.

Before:

White text against white parts of a background result in low contrast and poor readability.

Screenshot 2021-02-19 at 11 17 27

After applying the tint means we should always have a minimum amount of contrast, even when backgrounds are light.

Screenshot 2021-02-19 at 11 16 54

We can adjust this by changing the alpha level from 0.5 if we want it to be darker, or lighter.