Design comparison
Solution retrospective
What did you find difficult while building the project?
- Identify the right spaces between the items.
Which areas of your code are you unsure of?
- The selector at .overlay is not working to change the view icon img on .overlay:hover to a stronger opacity than .overlay. This is something that i will check again later.
Do you have any questions about best practices?
- Should be used ::after for this overlay effects or position: absolute?
Community feedback
- @vanzasetiaPosted over 1 year ago
Hi, Sarah Soares! 👋
You can use
hsla
orrgba
color format to only reduce the opacity of the cyan color. This way, the eye icon can haveopacity: 1
.I have a few suggestions for improving your solution.
- Replace the
<article class="card">
with<main>
. All the page content should live inside landmark elements.<article>
is not a landmark element. - Use interactive elements for any elements that have interactivity. Interactive elements can either be links or buttons.
- For your information, anchor tags are for navigation. The
<button>
element is for an action like opening a modal, submitting a form, toggling an element, etc. It is essential to use the correct elements. - Wrap the text with a meaningful element like a paragraph element. There should not be text in
<span>
and<div>
alone. - Use
rem
orem
instead ofpx
for font sizes. Never usepx
unit. Relative units such asrem
andem
can adapt when the users change the browser's font size setting. Learn more — Why you should never use px to set font-size in CSS
I recommend creating the overlay of the Equilibrium using pseudo-element and absolute positioning; use both of them. This way, the HTML can be simpler. You can see the solution from @IlnaraAckermann as your reference: Frontend Mentor | Css3, HTML5, flexbox, pseudo-class and pseudo-elements coding challenge solution
I hope you find this useful. Have fun coding! 😄
0 - Replace the
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