Comments (5)
Or use text-shadow
. Or an invert
filter.
from twentynineteen.
From a design perspectiv I would prefer the example of @anevins12.
Text-shadow is in my opinion not an elegant design solution. And with invert filter, you can't control die color of text to make sure, that it fits to the Corporate Identity with the website.
from twentynineteen.
A quick update on this:
As noted over in #121, our image filters + overlays actually help us out here in some respect. Even if a user uploads a 100% white background image, the lightest possible background color that can be rendered while using our overlays is #35729D (the browser fallback described in that thread will result in slightly darker shade: #316B8A). White text on top of that passes WCAG AA. We do have a slight text-shadow on the text as well.
From what I can tell, this is essentially what WCAG recommends as per their notes here:
https://webaim.org/articles/contrast/#sc143
Gradients, background images, and transparencies
Text over gradients, semi-transparent colors, and background images still need to meet contrast requirements, but WCAG does not provide any guidance on how to measure their contrast. We recommend testing the area where contrast is lowest.
@anevins12 can you let me know if that sounds right on your end? I'm not sure where that 0.55
opacity black minimum you mentioned is sourced from.
Thank you!
(Also worth noting: I'm recommending an enhancement in #284 that will allow users to turn off those filters and use a 70% black overlay instead. That should align with these guidelines too).
from twentynineteen.
That works too. I didn't realise there was a blue filter on top of the image already.
The 0.55 opacity figure was from my own research; which produces a 4.7:1 contrast ratio of text on top of the whitest hero image. What you're suggesting with the filters is the equivalent of this, but with blue instead of black.
from twentynineteen.
The 0.55 opacity figure was from my own research; which produces a 4.7:1 contrast ratio of text on top of the whitest hero image. What you're suggesting with the filters is the equivalent of this, but with blue instead of black.
Sounds great. Thanks @anevins12!
from twentynineteen.
Related Issues (20)
- Video embed issues HOT 1
- Keyboard menu showing with touch menu on Mobile HOT 2
- Packagist and NPMJS HOT 1
- Editor vs. Preview/Front end alignments of blocks in columns. HOT 1
- Baskerville Old Face is a poor font choice for Windows HOT 4
- Metaboxes are overlapping the Block editor HOT 5
- Convert references to 'classic editor' and 'block editor' to proper nouns HOT 2
- Heading not aligned with the rest of the content HOT 3
- Two column block: sub-blocks not aligned in mobile view HOT 1
- No version number in doc block HOT 3
- Update version numbers for 5.0.2 release to sync with Core SVN
- .button class doesn't override link color HOT 1
- Search widget input field width is too narrow on wide screens HOT 1
- alignwide in editor causes horizontal scroll HOT 1
- Firefox Dropcap margin mismatch [Proposed Solution] HOT 2
- touch-keyboard-navigation.js conflicts with some lightboxes HOT 1
- After a word written in italic, inverted commas appear wrongly HOT 1
- Deleting all sass files HOT 2
- touch-keyboard-navigation.js breaks scrolling past links on touch HOT 2
- where are the SCSS files for the style-RTL.css HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twentynineteen.