Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Newsletter Sign Up Form with Vanilla JS, PostCSS, Vite, unit+e2e tests

vite, vitest, cypress
n3ey•50
@vojtakala-it
A solution to the Newsletter sign-up form with success message challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Completed the challenge using:

  • Vanilla JS
  • Vanilla CSS
  • PostCSS

Added some animations and a spinner loader. JS throttling function to better handle resizing.

What I learned:

  • BEM notation is totally amazing must have if you work with Vanilla CSS makes navigation in your css much easier great for debugging helps when making responsive design with media queries
  • Vite Before I used webpack, Vite is easier to configure and feels more fresh and modern
  • PostCSS amazing stuff which uses JS to transform your CSS, such as: pxtorem you can write your code in px anywhere, which I find to be more accurate and overall easier to work with. PostCSS will take care of it and during build it'll transform your px to rem. autoprefixer adds vendor prefixes to your CSS based on browser compatibility, automatically
  • Cypress I know a little bit of e2e testing with Cypress before. Always good to use and practice.
  • Vitest Just like e2e testing being able to develop Test Driven Development style is a valuable skill never hurts to practice writing tests.
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on n3ey's solution.

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License