NFT preview card component

Solution retrospective
- What did you think of my solution?
- Do I need to improve anything?
- I would really like your feedback.
-I'm not using preprocessors yet, but I plan on doing so soon.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @correlucas
👾 Fala Mateus Moura, beleza?
De novo outra análise do seu código, essa solução tá certinha, inclusive responsiva. As únicas coisas que faltam ajustar é a sombra que tá muito forte e o efeito hover que está sem solução e não tá tão suave.
Adicionar transição:
.link-image:hover::after { transition: all ease 0.3s } .link-image:after { transition: all ease 0.3s } h1 a:hover, section a:hover { color: hsl(178, 100%, 50%); transition: 500ms; }
O valor correto para a sombra:
box-shadow: 5px 5px 15px 5px rgb(0 0 0 / 14%);
Usa esse site aqui pra criar as box-shadow e só jogar código no css: https://www.cssmatic.com/box-shadow
Espero ter ajudado, pra cima ein!
Marked as helpful - @pradeeps4ini
Hey, Mateus. How are you, dude?
Congrats on completing the project.
I would like to give some suggestions.
-
Learn about CSS custom properties (variables). They help in make the code reusable and modifiable without changing the same value repeatedly.
-
You are using "display: flex;" on multiple elements. You can create an utility class, ".flex {display:flex;}". And use it on the elements where you want to use flexbox. This way you won't have to write same property multiple times.
-
You don't need to provide alt text for decorative images. For example clock and icon-ethereum image. Give a descriptive alt for images that convey some meaning. Clock and icon-ethereum don't convey any meaning here. They are for decorative purpose only.
-
Try to limit use of id's in CSS. They have high specificity and can cause cascade and specificity issues. Try to use classes and element selectors.
Marked as helpful -
- @hamilton-i7
Hi there, Mateus!👋
You did a very good job on this challenge👏 Great use of flexbox to center the card throughout different screen sizes👍
There's just a couple of things I'd suggest:
- Try to use relative units such as
rem
orem
whenever possible. For instance, you may also use it onpadding
andmargin
. That way, you ensure your website will scale properly if the root font size changes - You could use a combination of
max-width
andwidth
instead of justwidth
to make sure the card is able to scale down better on the really small screen sizes, like below:
main { max-width: 21.875rem; width: 100%; }
Hope you find this helpful! Happy coding😎
Marked as helpful - Try to use relative units such as
- @afaiz-space
Hey @Theuz1nh0,
<div id="informations"> <div> >--- **add div element** <img src="./images/icon-ethereum.svg" alt="icon ethereum"><span id="icon-ethereum"> 0.041 ETH</span> </div> <div> >------ **add div element** <img src="./images/icon-clock.svg" alt="icon clock"><span id="icon-clock"> 3 days left</span> </div> </div>
- after add div element then add
justify-content: space-between;
in #informations id. - remove
margin-right: 37%;
from icon-ethereum id.
Marked as helpful - after add div element then add
Join 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