Good thinking from Paul Herbert on the Cloudfour blog about colorizing a component. You might look at a design comp and see a card component with a header background of #dddddd
, content background of #ffffff
, on an overall background of #eeeeee
. OK, easy enough. But what if the overall background becomes #dddddd
? Now your header looks lost within it.
That darker header? Design-wise, it’s not being exactly #dddddd
that’s important; it’s about looking slightly darker than the background. When that’s the case, a background of, say rgba(0, 0, 0, 0.135)
is more resiliant.
That will then remain resilient against backgrounds of any kind.
Direct Link to Article — Permalink
The post Building Flexible Components With Transparency appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.
About us and this blog
We are a digital marketing company with a focus on helping our customers achieve great results across several key areas.
Request a free quote
We offer professional SEO services that help websites increase their organic search score drastically in order to compete for the highest rankings even when it comes to highly competitive keywords.
Subscribe to our newsletter!
More from our blog
See all postsRecent Posts
- How to Optimize Your WordPress Robots.txt for SEO March 6, 2021
- CSS-Tricks Chronicle XXXIX March 6, 2021
- V8 stepping up to four-week release cycle March 6, 2021