Design comparison
Solution retrospective
I am proud of two things:
- Using Regex for form validation
- Beginning to organise my CSS according to custom element styles and custom utility classes.
In previous projects involving HTML and CSS, I would use viewport width (vw) units everywhere to make every responsive according to the viewport width. However, after watching a video on CSS units and when to use each one, I tried my best to utilise different CSS units to make specific use cases more appropriate than viewport width units (vw).
Additionally, this was my first time doing form validation by myself without following a tutorial. Granted I did watch a video that gave me the solution using Regex, but the logic I did by myself.
What specific areas of your project would you like help with?- Am I handling the form correctly?
- Am I separating concerns correctly?
- Is my code readable, scalable, and maintainable?
Feedback would be much appreciated!
Community feedback
- @Grego14Posted 7 months ago
Hello! 🎉 congratulations on completing the challenge! 🎉
I recommend leaving the alt attribute to the img element empty if the image has no semantic meaning or is only for decoration.
I don't recommend using units like vw for font sizes, as it can get very small on some devices, but you can use the clamp and there you would be assigning a minimum, preferred and maximum value.
When you get elements from the DOM using JavaScript I recommend that you use the getElementById(...) function.
I do not recommend adding styles using javascript.
main.style.width = "35%";
Better add a class and from there add the styles.
main.someClase{ width: 35%; }
When the success message is shown and changing the width to 35% that width causes overflows, maybe you should use min-width: 35%.
I hope this helps! 😁
Marked as helpful0
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