/FM-profile-card-component

solution for https://www.frontendmentor.io/challenges/profile-card-component-cfArpWshJ

Primary LanguageCSS

Frontend Mentor - Profile card component solution

This is a solution to the Profile card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

  • Build out the project to the designs provided

Screenshot

Links

My process

Built with

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

What I learned

  • Working with backgrounds is fun!
body {
    height: 100vh;

    background-color: var(--cyan-600);
    margin: 0;
    font-family: var(--family);
    font-size: var(--fs-base);

    /* MULTIPLE BACGKROUNDS! */
    background-image: url("images/bg-pattern-top.svg"), url("images/bg-pattern-bottom.svg");
    /* Great background positioning! */
    background-position: calc(50% - 30rem) calc(50% - 25rem), calc(50% + 30rem) calc(50% + 30rem);
    background-repeat: no-repeat;
}
  • Finally, fix for corrupted hr in flex-direction: column found (not without the help of stackoverflow)
.profile-card__hr {
    /* Marvellous! */
   margin: 1.5rem calc(-1 * var(--card-padding));
   align-self: stretch;

   border: 0;
   border-top: 1px solid var(--gray-200);
}

Useful resources

  • w3schools - Told me how I do multiple backgrounds for one element.

Author