Newsletter sign-up form ft. 11ty, Fluid custom props, and Vanilla JS
Design comparison
Solution retrospective
For this solution, I focused on two things: staying as close as possible to the design and providing a form validation that was intuitive and accessible.
For the first one, instead of copy-pasting the generated scales from Utopia.fyi, I made custom properties only as I needed them. In this case, the body text stays the same for the mobile and desktop designs, so I only created a custom fluid font size for the heading. This reduced the amount of unused code in the project, and also gave me a deeper understanding of the math behind fluid responsive design.
For design tokens, I made a simple implementation with 11ty as Heydon Pickering suggested in Easily Use Design Tokens in Eleventy which I think is suitable for small projects like this one.
Lastly, I think implementing the form validation is the most difficult part of this project. In particular, thinking about the possible scenarios that the user might run into while filling out the form and making sure your code accounts for those cases. For this solution, I used afterward and submit validation as Sandrina Pereira talks about in A Guide To Accessible Form Validation.
Looking forward to hear any feedback!
Community feedback
- @mandriva19Posted over 1 year ago
This is well made. animations are nice on submitting. responsiveness is also good and it's nice that you have included tablet view in your build.
few issues tho, I'm getting vertical scrollbar on 1366 laptop full screen https://i.imgur.com/iJwn56j.jpeg (same issue appears above 640px+)
and I think buttons must have pointer cursors on them. it just make sense.
nice overall, keep up!
Marked as helpful1@joshjavierPosted over 1 year agoThanks for the feedback, @mandriva19!
I removed extra spacing and reduced the min-height of the card from 688px to 640px, which should prevent the vertical scrollbar from showing on 1366x768 screens.
I also added a pointer cursor to buttons, since I agree that it makes sense in this case as that would be the expected behavior.
1
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