rmcg.dev/projects/FrontendMentor/newbie/intro-component-with-signup...
Robert McGovern 6797bf0b5e added advice-generator-app challenge and beginning of base apparel 2022-10-04 10:19:15 +01:00
..
css finished javascript of intro challenge 2022-09-28 21:06:27 +01:00
design added base files for the remaining newbiew projects I have 2022-09-07 10:53:05 +01:00
images added base files for the remaining newbiew projects I have 2022-09-07 10:53:05 +01:00
js forgot to commit javascript changes, so added in check for in error visible before attempting to remove CSS class 2022-09-29 10:01:45 +01:00
screenshots finished javascript of intro challenge 2022-09-28 21:06:27 +01:00
.gitignore added base files for the remaining newbiew projects I have 2022-09-07 10:53:05 +01:00
README-orig.md finished javascript of intro challenge 2022-09-28 21:06:27 +01:00
README.md finished javascript of intro challenge 2022-09-28 21:06:27 +01:00
index.html fixed html validation errors, hopefully also the hidden being true. I am setting it in JavaScript 2022-09-28 21:26:29 +01:00
rmcg.dev.code-workspace added advice-generator-app challenge and beginning of base apparel 2022-10-04 10:19:15 +01:00
style-guide.md mobile version styled 2022-09-19 12:24:48 +01:00

README.md

Frontend Mentor - Intro component with sign up form solution

This is a solution to the Intro component with sign up form challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

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:
    • Any input field is empty. The message for this error should say "[Field Name] cannot be empty"
    • The email address is not formatted correctly (i.e. a correct email address should have this structure: name@host.tld). The message for this error should say "Looks like this is not an email"

Screenshot

Mobile Mobile with Errors Desktop Desktop with Errors

These screenshots represent the Mobile and Destktop versions, with and without the error states.

My process

As usual I started with a mobile first approach, aiming to put most things into CSS properties, so that for the desktop version I was mostly just updating the values of the properties.

I'm not sure why I decided to not use a lot of classes, and instead put styling directly onto the html elements. I think it was just to be a little different than normal. I know that in a real project that I wouldn't use this approach.

For the JavaScript I tried to minimise how much I was doing there, and looked to leverage combining text with an element id so I could unhide or hide the error message.

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Mobile-first workflow

What I learned

Main thing I learnt was that the checkValidity() method triggers checks for ALL HTML inputs on the page, not just the specific one you targeted. This surprised me, and was consistent across Safari, Firefox and Chrome.

Continued development

Continue working through challenges. I really must put some time into learning BEM / the version that Kevin Powell uses.

Author

Acknowledgments

Matt for this useful service.