<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: lismaria</title>
    <description>The latest articles on DEV Community by lismaria (@lismaria).</description>
    <link>https://dev.to/lismaria</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F701955%2F5cf0b4a5-c975-4582-9943-29b41c3d6341.png</url>
      <title>DEV Community: lismaria</title>
      <link>https://dev.to/lismaria</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lismaria"/>
    <language>en</language>
    <item>
      <title>Profile Card challenge - frontendmentor.io</title>
      <dc:creator>lismaria</dc:creator>
      <pubDate>Tue, 21 Sep 2021 11:03:58 +0000</pubDate>
      <link>https://dev.to/lismaria/profile-card-challenge-frontendmentor-io-3d51</link>
      <guid>https://dev.to/lismaria/profile-card-challenge-frontendmentor-io-3d51</guid>
      <description>&lt;p&gt;Hello my Beautiful Friends on the Internet!🙋🏻‍♀️&lt;/p&gt;

&lt;p&gt;This is a solution to the &lt;a href="https://www.frontendmentor.io/challenges/profile-card-component-cfArpWshJ" rel="noopener noreferrer"&gt;Profile card component challenge on Frontend Mentor&lt;/a&gt;. Frontend Mentor challenges help you improve your coding skills by building realistic projects. &lt;/p&gt;

&lt;p&gt;This is a perfect challenge to test your layout skills. The card layout doesn't shift, so it's also great for those that haven't dived into responsive websites yet!&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Overview&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The challenge&lt;/li&gt;
&lt;li&gt;Screenshot&lt;/li&gt;
&lt;li&gt;Links&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;My process&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built with&lt;/li&gt;
&lt;li&gt;What I learned&lt;/li&gt;
&lt;li&gt;Useful resources&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;CSS explanation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variables&lt;/li&gt;
&lt;li&gt;Background&lt;/li&gt;
&lt;li&gt;Card&lt;/li&gt;
&lt;li&gt;Animation&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Author&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The challenge
&lt;/h3&gt;

&lt;p&gt;The challenge is to build out this profile card component and get it looking as close to the design as possible. I am free to use any tools I like to complete the challenge. &lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshot
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcz52jp8rp1oqodpkxia.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcz52jp8rp1oqodpkxia.jpg" alt="Desktop Interface"&gt;&lt;/a&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhq7e1zync9rvo7c3lm8m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhq7e1zync9rvo7c3lm8m.jpg" alt="Mobile Interface"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Solution URL: &lt;a href="https://github.com/lismaria/FM1-ProfileCardComponent" rel="noopener noreferrer"&gt;solution-link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Live Site URL: &lt;a href="https://lismaria.github.io/FM1-ProfileCardComponent/" rel="noopener noreferrer"&gt;site-link&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My process
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Built with
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Semantic HTML5 markup&lt;/li&gt;
&lt;li&gt;CSS custom properties&lt;/li&gt;
&lt;li&gt;CSS Flexbox&lt;/li&gt;
&lt;li&gt;CSS Grid&lt;/li&gt;
&lt;li&gt;CSS Animations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What I learned
&lt;/h3&gt;

&lt;h4&gt;
  
  
  It's always a good idea to sketch 🥇
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Before starting off with the CSS, I sketched the design pretty roughly using pen and paper. Then I drew lines so as to get a better understanding of which layout algorithm might suit the best. I came up with 2 approaches. There came a point where I literally got stuck with my first approach so I knew which part of the second approach is gonna help me now. There are endless ways in which sketching the design will come handy. You should definitely give it a go!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Heading levels should only increase by one
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;A heading level following an &lt;code&gt;h1&lt;/code&gt; element should be an &lt;code&gt;h2&lt;/code&gt; element, not an &lt;code&gt;h3&lt;/code&gt; element. Why this matters? Well for sighted users, the different font sizes distinguish the hierarchy for us. The same is not helpful for screen readers. The screen reader identifies a  properly marked-up header hence applying the &lt;code&gt;h1&lt;/code&gt; to &lt;code&gt;h6&lt;/code&gt; hierarchically makes it easier to navigate.&lt;a href="https://dequeuniversity.com/rules/axe/4.2/heading-order" rel="noopener noreferrer"&gt;click here to know more&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Document should have one main landmark
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;In HTML5, you should use elements like &lt;code&gt;header&lt;/code&gt;, &lt;code&gt;nav&lt;/code&gt;, &lt;code&gt;main&lt;/code&gt;, and &lt;code&gt;footer&lt;/code&gt;. Once added, screen reader users can navigate to a section based on its ARIA landmark or HTML element. &lt;a href="https://dequeuniversity.com/rules/axe/4.2/region" rel="noopener noreferrer"&gt;click here to know more&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  CSS naming convention exists!
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;BEM which stands for Block, Element, and Modifier is a CSS naming convention for writing cleaner and more readable CSS classes. Though I might not have literally used this, it's okay for the first time. &lt;a href="https://codeburst.io/understanding-css-bem-naming-convention-a8cca116d252" rel="noopener noreferrer"&gt;click here to know more&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* Blocks are named as standard CSS classes */&lt;/span&gt;
&lt;span class="nc"&gt;.block&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Elements declared with 2 underscores, after block */&lt;/span&gt;
&lt;span class="nc"&gt;.block__element&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Modifiers declared with 2 dashes, after block or element */&lt;/span&gt;
&lt;span class="nc"&gt;.block--modifier&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Block, element and modifier together */&lt;/span&gt;
&lt;span class="nc"&gt;.block__element--modifier&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Useful resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://css-tricks.com/almanac/properties/b/background-position/" rel="noopener noreferrer"&gt;Background-Position&lt;/a&gt; - One of the most challenging part was to place the circles in the background. This post was life saver! Couldn't recommend enough.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=dHbYcAncAgQ" rel="noopener noreferrer"&gt;Pixel vs rem&lt;/a&gt; - This is an amazing YouTube video from &lt;em&gt;Coder Coder&lt;/em&gt; which helped me finally understand rem unit. I'd recommend it to anyone still learning this concept.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=x7tLPhnA06w&amp;amp;list=PL4cUxeGkcC9itC4TxYMzFCfveyutyPOCY" rel="noopener noreferrer"&gt;CSS Grid Tutorial&lt;/a&gt; &amp;amp; &lt;a href="https://www.youtube.com/watch?v=Y8zMYaD1bz0&amp;amp;list=PL4cUxeGkcC9i3FXJSUfmsNOx8E7u6UuhG" rel="noopener noreferrer"&gt;CSS Flexbox Tutorial&lt;/a&gt; - &lt;em&gt;The Net Ninja&lt;/em&gt; is my go to channel for almost any web development related stuff. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=oZPR_78wCnY" rel="noopener noreferrer"&gt;CSS Variables&lt;/a&gt; - &lt;em&gt;Web Dev Simplified&lt;/em&gt; is another great channel. He simplifies every concept and learning is so beginner level. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://codeburst.io/understanding-css-bem-naming-convention-a8cca116d252" rel="noopener noreferrer"&gt;BEM: Block-Element-Modifier&lt;/a&gt; - I was unaware of this convention. Tried for the first time!&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=YszONjKpgg4" rel="noopener noreferrer"&gt;CSS Animations&lt;/a&gt; - Wanna start of with CSS animations? Check this out. &lt;a href="https://www.youtube.com/watch?v=jgw82b5Y2MU&amp;amp;list=PL4cUxeGkcC9iGYgmEd2dm3zAKzyCGDtM5" rel="noopener noreferrer"&gt;If you have time follow this playlist&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  CSS explanation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Variables
&lt;/h3&gt;

&lt;p&gt;Also known as &lt;em&gt;CSS Custom Properties&lt;/em&gt; or &lt;em&gt;cascading variables&lt;/em&gt; contain specific values that are to be reused throughout the document.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Property name is begins with double hyphen &lt;code&gt;--&lt;/code&gt; and the property value can be any css valid value. Eg: &lt;code&gt;--main-bg: #c4c4c4;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;We use the custom property by specifying the name inside &lt;code&gt;var()&lt;/code&gt; function instead of regular property value. Eg: &lt;code&gt;background-color: var(--main-bg)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;It's a common best practice to define custom properties on the &lt;code&gt;:root&lt;/code&gt; &lt;em&gt;pseudo-class&lt;/em&gt;. This enables us to apply it globally across the HTML doc.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:root&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;/* Primary */&lt;/span&gt;
    &lt;span class="py"&gt;--cyanD&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;185&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;75%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;39%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="py"&gt;--Dblue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;229&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;23%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;23%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="py"&gt;--Gblue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;227&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;10%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;46%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c"&gt;/* Neutral */&lt;/span&gt;
    &lt;span class="py"&gt;--Dgray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;59%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;62.5%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* 1 rem = 10px */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You must have notice I have set the font-size to 62.5%. Well what this exactly means is, 62.5% of the default font-size of the browser which is usually 16px. This gives me 10px which makes it easier to convert pixel into rems. Before 1rem = 16px and now 1rem = 10px.&lt;/p&gt;

&lt;h3&gt;
  
  
  Background
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;I have set the body dimensions to 100% viewport width and height and overflow to hidden so that it hides of the stuff that don't fit in (else a scrollbar might appear).&lt;/li&gt;
&lt;li&gt;I have applied &lt;em&gt;CSS grid&lt;/em&gt; on this element so as to center the card as this is its parent.&lt;/li&gt;
&lt;li&gt;I have commented out the background image and position of the circles as I want them to animate in so substituted the values there.

&lt;ul&gt;
&lt;li&gt;The url of both the circles is comma-separated and put in the value of &lt;code&gt;background-image&lt;/code&gt; property. This will place both the circle as the background image.&lt;/li&gt;
&lt;li&gt;Similarly for the &lt;code&gt;background-position&lt;/code&gt; I have put the two values which will respectively position the circles.

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;top -65vh right 50vw&lt;/code&gt; will place the top circle 35% of viewport height from the bottom and place it 50% of viewport width from the right.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;top 50vh left 50vw;&lt;/code&gt; will place the bottom circle 50% from the top and 50% from the left.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;
&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2s&lt;/span&gt; &lt;span class="n"&gt;circles&lt;/span&gt; &lt;span class="n"&gt;ease-out&lt;/span&gt; &lt;span class="n"&gt;forwards&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--cyanD&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c"&gt;/* background-image: url(/images/bg-pattern-top.svg), url(/images/bg-pattern-bottom.svg); */&lt;/span&gt;
    &lt;span class="c"&gt;/* background-position: top -65vh right 50vw, top 50vh left 50vw; */&lt;/span&gt;
    &lt;span class="nl"&gt;background-repeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;no-repeat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;no-repeat&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;place-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Card
&lt;/h3&gt;

&lt;p&gt;The card has a background-color white and a border radius of around 15px. The dimension of the card is roughly 350 x 390 px. It also has a box-shadow.&lt;br&gt;
I decided to use &lt;strong&gt;CSS Grid layout&lt;/strong&gt; to position the child elements. To start of I created 5 rows of equal height. &lt;code&gt;grid-template-rows: repeat(5,1fr);&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;35rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;max-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;39rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;grid-template-rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt; &lt;span class="m"&gt;-20px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;70&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;94&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The blue background design extends from row 1 to row 3. &lt;code&gt;grid-row: 1/3;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card__bg&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;grid-row&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;    
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url(images/bg-pattern-card.svg)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;15px&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To position the profile picture, I initially placed it at row 3 &lt;code&gt;grid-row: 3/4;&lt;/code&gt;. Then I did a margin top of -5rem which eventually aligned the picture vertically as I wanted. Since &lt;code&gt;img&lt;/code&gt; is an inline element, I used &lt;code&gt;text-align: center;&lt;/code&gt; to align the picture horizontally centered.&lt;br&gt;
To make the square picture circled, I gave it a &lt;code&gt;border-radius:&lt;/code&gt; of &lt;code&gt;50%&lt;/code&gt; and colored the border white.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card__img&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;grid-row&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.card__img&lt;/span&gt; &lt;span class="nt"&gt;img&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The remaining rows are divided into 2 parts: primary(pri) and secondary(sec).&lt;br&gt;
The first section consists of the name, age and place. This is placed in row 5 &lt;code&gt;grid-row: 4/5;&lt;/code&gt; and styled according to the design.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card__pri&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;grid-row&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;    
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.card__pri&lt;/span&gt; &lt;span class="nt"&gt;section&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second part consist of the rest of the details. This is placed in row 5 &lt;code&gt;grid-row: 5;&lt;/code&gt;. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now I am using &lt;strong&gt;CSS Flexbox&lt;/strong&gt; to position the contents in this row. There are 3 sections and I wanted them spaced out evenly, hence i used &lt;code&gt;justify-content: space-evenly;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Now within each section, I am again using flexbox to align items to the center vertically and horizontally.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card__sec&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;grid-row&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-evenly&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--Dgray&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.card__sec&lt;/span&gt; &lt;span class="nt"&gt;section&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This part of the code was new to me. In this code we are selecting every element that is child to &lt;code&gt;.card__sec section&lt;/code&gt; and styling it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card__sec&lt;/span&gt; &lt;span class="nt"&gt;section&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Animation
&lt;/h3&gt;

&lt;p&gt;Coming to the animation part, I wanted the circles to float into the page on load. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;So at the start i.e., at &lt;code&gt;0%&lt;/code&gt; the opacity will be 0 which means that the circles wont be visible. I have set the position of circles in such a way that they are out of the main screen.&lt;/li&gt;
&lt;li&gt;At the end i.e., at &lt;code&gt;100%&lt;/code&gt; the opacity will be 1 and the circles will be clearly visible. This time the circles are positioned at the desired location.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;circles&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
        &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;top&lt;/span&gt; &lt;span class="m"&gt;-100vh&lt;/span&gt; &lt;span class="nb"&gt;right&lt;/span&gt; &lt;span class="m"&gt;100vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;top&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt; &lt;span class="m"&gt;100vw&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
            &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url(images/bg-pattern-top.svg)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sx"&gt;url(./images/bg-pattern-bottom.svg)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;background-position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;top&lt;/span&gt; &lt;span class="m"&gt;-65vh&lt;/span&gt; &lt;span class="nb"&gt;right&lt;/span&gt; &lt;span class="m"&gt;50vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;top&lt;/span&gt; &lt;span class="m"&gt;50vh&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt; &lt;span class="m"&gt;50vw&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;     
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each animation needs to be defined with the &lt;code&gt;@keyframes&lt;/code&gt; at-rule which is then called with the &lt;code&gt;animation&lt;/code&gt; property.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I have set the &lt;code&gt;animation&lt;/code&gt; property on the &lt;code&gt;body&lt;/code&gt; element. 

&lt;ul&gt;
&lt;li&gt;I want the total duration of the animation to be &lt;code&gt;2s&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;My &lt;code&gt;animation-name&lt;/code&gt; is &lt;code&gt;circles&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;The &lt;code&gt;animation-timing-function&lt;/code&gt; is set to &lt;code&gt;ease-out&lt;/code&gt;. This is used to set how you want the animation to progress. Ease-out will make the circles load quickly and then slows down the animation as it continues.&lt;/li&gt;
&lt;li&gt;On setting the &lt;code&gt;animation-fill-mode&lt;/code&gt; to &lt;code&gt;forwards&lt;/code&gt; the circle will retain the computed values set by the last keyframe ( &lt;code&gt;100%&lt;/code&gt; ) encountered during execution.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Here I have used the &lt;strong&gt;animation shorthand notation&lt;/strong&gt; .&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2s&lt;/span&gt; &lt;span class="n"&gt;circles&lt;/span&gt; &lt;span class="n"&gt;ease-out&lt;/span&gt; &lt;span class="n"&gt;forwards&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="err"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Author 🦸🏻‍♀️
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub - &lt;a href="https://github.com/lismaria" rel="noopener noreferrer"&gt;@lismaria&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Frontend Mentor - &lt;a href="https://www.frontendmentor.io/profile/lismaria" rel="noopener noreferrer"&gt;@lismaria&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Reach me out on &lt;a href="https://www.linkedin.com/in/lismariasaju/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;&lt;code&gt;H A P P Y   C O D I N G👩🏻‍💻👨🏻‍💻&lt;/code&gt;&lt;/em&gt;
&lt;/h2&gt;

</description>
      <category>css</category>
      <category>codenewbie</category>
      <category>html</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
