Design comparison
SolutionDesign
Solution retrospective
Hi, The main question I have is why does my view-icon share the opacity of my overlay? any other feedback is appreciated!!!
Thanks in advance.
Community feedback
- @DexLuthorPosted almost 2 years ago
Hey manπ Great job done there :)
I have a few nitpickings, if you don't mind:
- I can see there a whole bunch of empty
alt=""
orsrcset=""
. Maybe it would make sense to either make them work or get rid of them, if you consider them to be useless in your case - you've used
<hr>
, but if you zoom in you will see it looks quite ugly (that's the default styling of it). Consider e.g.
hr { border: none; height: 1px; background-color: var(--Verydarkblue); }
- some1 has also mentioned to me that using
gap
forflex
isn't supported (supported by 93% of users) everywhere currently. Consider margins/paddings instead - you have the styles below twice for overlay π»
height: 100%; width: 100%;
- with respect to your question now. AFAIK
opacity
property is being inherited. So when you setopacity
to.overlay
to 0.5 yourimg
inside thatdiv
inherits the sameopacity
. Another way to work it around is to usebackground-color: rgba(r,g,b, opacity)
. This won't be inherited
0 - I can see there a whole bunch of empty
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord