Frontend Mentor - Base Apparel coming soon page solution

This is a solution to the Base Apparel coming soon page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Receive an error message when the form is submitted if:
    • The input field is empty
    • The email address is not formatted correctly

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox

What I learned

I learned how to use flexbox to position elements on the page. I also learned how to use CSS custom properties and how to use regex in JavaScript to validate the email address.

const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;

Useful resources

  • MDN Web Docs - This helped me understand how to use regex in JavaScript.

Author