Design comparison
Solution retrospective
Hello!
This is the 5th project in FEM challenge. With this one, I used React and Typescript to build the structure and Sass for styling. Still new to Typescript and venturing on how to improve it. While making this project, I have several questions in mind...
- How to add hover color state in the icons?
- How do pseudo works on Jeremy's background?
- How to use svg?
Would appreciate any thoughts and open discussions regarding this challenge. Cheers!
Community feedback
- @denieldenPosted over 2 years ago
Hi Rio, very great work on this challenge! 😉 I was unable to take a closer look at the code in the repository as the ink is broken but...
There are many ways to use
svg
with relative advantages and disadvantages and the correct use depends on the needs of the case:- insert it via an
img
element but you lose almost all the advantages - insert it in a css class in the
content
property so you can manipulate it at will - insert it directly into the html being able to manipulate it in various ways... the disadvantage is that often the svg code is very long and not very nice to see in the html
Here are a few tips for improve your code:
- add
header
tag and wrap thenav
for improve the Accessibility - use
transition
on the element with hover effect - instead of using
px
use relative units of measurement likerem
even for large dimensions such as containers - You can't add
hover
color status in icons using theimg
element... either you use a class containing the svg in the pseudoelement or you use thesvg
directly inside the html
Overall you did well 😁 Hope this help!
0 - insert it via an
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