<?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>Forem: Büşra Memiş</title>
    <description>The latest articles on Forem by Büşra Memiş (@busramemis).</description>
    <link>https://forem.com/busramemis</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%2F147483%2F6745b2fe-83c8-46c3-9603-d8f8ba49fa43.jpg</url>
      <title>Forem: Büşra Memiş</title>
      <link>https://forem.com/busramemis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/busramemis"/>
    <language>en</language>
    <item>
      <title>CSS Grid Layout</title>
      <dc:creator>Büşra Memiş</dc:creator>
      <pubDate>Tue, 04 Feb 2020 10:25:43 +0000</pubDate>
      <link>https://forem.com/busramemis/css-grid-layout-3kc1</link>
      <guid>https://forem.com/busramemis/css-grid-layout-3kc1</guid>
      <description>&lt;h3&gt;
  
  
  What is Grid?
&lt;/h3&gt;

&lt;p&gt;The grid creates the skeleton structure of the web. It consists of horizontal and vertical grid lines called Row (Column) and Column (Column). By referring these lines, the placement of the elements to be used on the web is provided.&lt;/p&gt;

&lt;p&gt;Grid not only allowed the designer to create more organized and planned structures during the design phase, but also facilitated the responsive coding of front end developers.&lt;/p&gt;

&lt;p&gt;Below you can see the grid in-site placement. 👇&lt;/p&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%2Fi%2Fdqpguekzan7qoalplsam.png" 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%2Fi%2Fdqpguekzan7qoalplsam.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the past, many methods and tricks have been used in the CSS for aligning the elements and responsive coding, of course, everything changed a lot when flex came, and it was easier 😊 but then the CSS grid entered our life 😍.&lt;/p&gt;

&lt;p&gt;While the Flexbox allows us to encode one-dimensional, in the grid layout model, it allows children to align the elements in both dimensions as desired in a pre-defined flexible container. There is a logic that comes from flexbox, actually on the grid but you can think of it as 2 dimensional and more.&lt;/p&gt;

&lt;h3&gt;
  
  
  Grid Terminology
&lt;/h3&gt;

&lt;p&gt;There are some concepts we need to know on the grid before we get to the coding part. After learning them, we will switch to the coding part.&lt;br&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%2Fi%2Ft4174up8thke8meg0zxt.png" 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%2Fi%2Ft4174up8thke8meg0zxt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Line :&lt;/strong&gt; You can think of it as horizontal or vertical lines. They are called by number.&lt;/p&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%2Fi%2Fpac57a6hjr6h58iij4t6.png" 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%2Fi%2Fpac57a6hjr6h58iij4t6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Container :&lt;/strong&gt; The main box provides the formation of structures such as a row, column, cell.&lt;br&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%2Fi%2F0o8fvjdeg0d59qf115y2.png" 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%2Fi%2F0o8fvjdeg0d59qf115y2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Row :&lt;/strong&gt;They are structures consisting of horizontal parts.&lt;br&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%2Fi%2Fw289vxqbj65kmm3ulsig.png" 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%2Fi%2Fw289vxqbj65kmm3ulsig.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Cell :&lt;/strong&gt;It is the smallest unit of the grid. It is located between 4 grid lines.&lt;br&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%2Fi%2Fmierd893h8lpgtawlfrb.png" 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%2Fi%2Fmierd893h8lpgtawlfrb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Column :&lt;/strong&gt;They are structures consisting of vertical parts.&lt;br&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%2Fi%2Ffuajdclfxgc1v0t42x0i.png" 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%2Fi%2Ffuajdclfxgc1v0t42x0i.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Area :&lt;/strong&gt;It is a structure consisting of many grid cells.&lt;br&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%2Fi%2F9pulw6z00zl87ml8t85c.png" 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%2Fi%2F9pulw6z00zl87ml8t85c.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Gap :&lt;/strong&gt;They are spaces between column or row.&lt;br&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%2Fi%2Foirl4mjrcu9owcon7vy0.png" 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%2Fi%2Foirl4mjrcu9owcon7vy0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Track :&lt;/strong&gt; It is the general term of the grid column or grid-row.&lt;/p&gt;

&lt;p&gt;Now that we pass the terminology part, let's come to the point now. Let's start using Css Grid. I will use more than one example while describing the subtopics. I will show the images of these examples first and then the codes. &lt;/p&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%2Fi%2F8tsmu6n1wnt0121009t4.png" 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%2Fi%2F8tsmu6n1wnt0121009t4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First of all, let's create an html structure with parent and child elements.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h4&gt;
  
  
  🔻 grid-template-columns &amp;amp; grid-template-rows
&lt;/h4&gt;

&lt;p&gt;By giving display: grid to the main container, we now make the creation of a grid template. There is a structure consisting of 3 columns and 2 rows in our image. We create this with &lt;code&gt;grid-template-columns&lt;/code&gt; and &lt;code&gt;grid-template-rows&lt;/code&gt; properties. CSS properties are already showing what they are doing from their names. You can see the code describing the general view below. Creating the grid structure is that easy.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h4&gt;
  
  
  🔻 grid-gap (Gutter)
&lt;/h4&gt;

&lt;p&gt;It only gives space between the grid cells.&lt;/p&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%2Fi%2Fnz89d1ds6twnzhwail0v.png" 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%2Fi%2Fnz89d1ds6twnzhwail0v.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;grid-column-gap&lt;/code&gt; only gives space between columns, while &lt;code&gt;grid-row-gap&lt;/code&gt; gives space between rows. You can give space to both column and row at the same time by using the &lt;code&gt;grid-gap&lt;/code&gt; shortcut. In the meantime, we will come across these short properties more.&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;.container&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="py"&gt;grid-column-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="py"&gt;grid-row-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="py"&gt;grid-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25px&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;h4&gt;
  
  
  🔻 repeat &amp;amp; fr Unit :
&lt;/h4&gt;

&lt;p&gt;It came with many functions with Grid. One of them is &lt;code&gt;repeat ()&lt;/code&gt;. You have seen that we have written 150px several times in both column and row section above. Instead, we can write 3 in the form of 150px.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;fr(fraction) :&lt;/strong&gt; This unit came with css grid. Refers to available space. Let's understand how.&lt;/p&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%2Fi%2Fwj97iot9xphvfotmct6o.png" 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%2Fi%2Fwj97iot9xphvfotmct6o.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We had a 900px wide container. We will fit the items inside using fr.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;code&gt;grid-template-columns: 1fr 2fr 3fr&lt;/code&gt;: You might think like this. it fits the total width according to the fr value. In other words, you do not need to give the values to the items by considering the total width and by calculating the px.&lt;/p&gt;

&lt;p&gt;By the way, you can use any kind of css unit. I also used % valued expression, which refers to the same code above.&lt;/p&gt;

&lt;h4&gt;
  
  
  🔻Grid Child Element Positions
&lt;/h4&gt;

&lt;p&gt;Let's come to the beautiful sides of the grid. No matter how you do your html structure. You can position the items anywhere you want.&lt;br&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%2Fi%2F5vglfi82ve5wizph28qy.png" 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%2Fi%2F5vglfi82ve5wizph28qy.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I mentioned that the lines are numbered in the terminology section. As seen in the image, we will pull item number 1 to the bottom right corner.&lt;/p&gt;

&lt;p&gt;I will tell from the longest to the short way. Let's enter the column values with &lt;code&gt;grid-column-start&lt;/code&gt; and &lt;code&gt;grid-column-end&lt;/code&gt; and draw them in a different column. It also corresponds to 3 and 4. If we want to get our work done in one line, you can also enter the start and end values by typing &lt;code&gt;grid-column&lt;/code&gt;. The same goes for the row.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;grid-column: column-start / column-end&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;grid-row: row-start / row-end&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The good thing is that you can write both row and column code in a single existing line.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;grid-area: row-start / column-start / row-end / column-end&lt;/code&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h4&gt;
  
  
  🔻Spanning
&lt;/h4&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%2Fi%2Fccjqkzhp8559kzauywj4.png" 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%2Fi%2Fccjqkzhp8559kzauywj4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have said that we position the items as we want. It also has several different methods. I will explain by explaining how I made the number 2 in the image.&lt;/p&gt;

&lt;p&gt;You can do it by giving &lt;code&gt;grid-column &amp;amp; grid-row&lt;/code&gt; values, which I said in the previous title. Also, if you want to extend an item from a certain place to the end, it is enough to write -1 for it. You don't need to count columns or rows.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;grid-column: 1 / -1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Another method is spanning. You can think of each item as a span. And when we look at number 2, we see that it occupies a total of 3 spans. So our code is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;grid-column: span 3&lt;/code&gt; or &lt;code&gt;grid-column: 1 / span 3&lt;/code&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Naming Grid Areas:
&lt;/h3&gt;

&lt;p&gt;In this section, I will show you how you create a template by naming it. Apart from creating the basic structure you have learned so far, we will add extra code. It is also &lt;code&gt;grid-template-areas&lt;/code&gt;. After creating our classic display: grid and &lt;code&gt;grid-template-columns &amp;amp; grid-template-rows&lt;/code&gt; structure, we create a template for our area.&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;grid-template-areas&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;"header header header"&lt;/span&gt;
                     &lt;span class="s1"&gt;" aside main main"&lt;/span&gt;
                     &lt;span class="s1"&gt;"aside item-1 item-2"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After adding the names for each column and row, we add these names one by one to the fields.&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;.header&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="py"&gt;grid-area&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;header&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;&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%2Fi%2Feuahj20nv098pa0g42qb.png" 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%2Fi%2Feuahj20nv098pa0g42qb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can find all the code of this layout below.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;




&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;. (dot):&lt;/strong&gt; It means an empty cell and in your template '.' the place you put remains empty.&lt;/p&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%2Fi%2F6b1xvyq7pl0hdbb0i65u.png" 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%2Fi%2F6b1xvyq7pl0hdbb0i65u.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🔻max-content, min-content, minmax()
&lt;/h4&gt;

&lt;p&gt;Other values that come with the CSS grid are &lt;code&gt;min-content &amp;amp; max-content&lt;/code&gt;. With these, you can adjust the col or row values according to the content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;max-content:&lt;/strong&gt; occupies the width or height as much as the content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;min-content:&lt;/strong&gt; takes up as much space as the widest word.&lt;/p&gt;

&lt;p&gt;Another thing is the &lt;code&gt;minmax ()&lt;/code&gt; function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;minmax ():&lt;/strong&gt; allows to enter both min and max values at the same time.&lt;/p&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%2Fi%2Fl20dop9i4e4g7i6rxi2n.png" 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%2Fi%2Fl20dop9i4e4g7i6rxi2n.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h4&gt;
  
  
  🔻auto-fill, auto-fit
&lt;/h4&gt;

&lt;p&gt;I love the grid on its own, but I guess it's one of the things I love most about grid this feature. First I will show the difference, then I will touch on the part I love.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;auto-fill:&lt;/strong&gt; Fills the line with as many lines as it can fill. So there are absolutely gaps.&lt;/p&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%2Fi%2Fv8jgbn2p06dlyifqshtn.png" 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%2Fi%2Fv8jgbn2p06dlyifqshtn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;auto-fit:&lt;/strong&gt; Acts to cover all available areas.&lt;/p&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%2Fi%2Fdfnqcywu8xcm5myd9614.png" 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%2Fi%2Fdfnqcywu8xcm5myd9614.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we come to my favorite part. Using &lt;code&gt;auto-fit&lt;/code&gt;, we can gain responsiveness without the need for any media query code. Do not forget to examine the code and minimize the browser from Codepen.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/jJEwZa?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  🔻Explicit Grid &amp;amp; Implicit Grid
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&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-columns&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;2&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="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;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;150px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;grid-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25px&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;Let's have a grid layout with the code above. We have a total of 6 items. The appearance of this is as follows.&lt;/p&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%2Fi%2Feo4jghicgys7vfagb15d.png" 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%2Fi%2Feo4jghicgys7vfagb15d.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We wrote only code for 2 col and 2 rows in css, but we had 6 items. their columns are pushed to the line below by pairs. Certain terms are given for the part covering the layout and for others. They are like this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explicit grid:&lt;/strong&gt; The layout we wrote for the grid. Their col and rows are defined in the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implicit grid:&lt;/strong&gt; Automatically created for tracks other than the written ones.&lt;/p&gt;

&lt;p&gt;Well, can we also write CSS for the tracks left on the implicit grid? Of course, property is also considered for this. 😄&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;grid-auto-rows&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;200&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;Rows&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;Implicit&lt;/span&gt; &lt;span class="nt"&gt;grid&lt;/span&gt; &lt;span class="nt"&gt;are&lt;/span&gt; &lt;span class="nt"&gt;affected&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;grid-auto-flow:&lt;/strong&gt; Controls how auto-placed items are placed on the grid.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&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%2Fi%2Fnrcfgcxk5bnd5eoh4pzs.png" 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%2Fi%2Fnrcfgcxk5bnd5eoh4pzs.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🔻Grid items Alignment
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;align-items&lt;/code&gt;, &lt;code&gt;justify-items&lt;/code&gt; and &lt;code&gt;place-items&lt;/code&gt; properties are used to align the items in the grid container.&lt;/p&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%2Fi%2Fsdumn97n9eikjp1kx2ap.gif" 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%2Fi%2Fsdumn97n9eikjp1kx2ap.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;align-items:&lt;/strong&gt; Allows grid items (row) to align on the horizontal axis.&lt;br&gt;
&lt;code&gt;align-items: start | end | center | stretch (default value)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;justify-items:&lt;/strong&gt; Allows grid items (col) to align on the vertical axis.&lt;br&gt;
&lt;code&gt;justify-items: start | end | center | stretch (default value)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;place-items:&lt;/strong&gt; You make alignments on both axes at once.&lt;br&gt;
&lt;code&gt;place-items: align-items - justify-items&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you just want to do a single item custom alignment, you can do it using align-self, justify-self, and place-self.&lt;/p&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%2Fi%2Fxwjn1gvw8v59qsayrylr.gif" 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%2Fi%2Fxwjn1gvw8v59qsayrylr.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  🔻Aligning Tracks
&lt;/h4&gt;

&lt;p&gt;When the items do not cover the entire container, you can use the &lt;code&gt;align-content&lt;/code&gt; and &lt;code&gt;justify-content&lt;/code&gt; properties when you want to make an alignment with them.&lt;/p&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%2Fi%2Fcef559jfhdthqg7qzv3m.gif" 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%2Fi%2Fcef559jfhdthqg7qzv3m.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;align-content:&lt;/strong&gt; provides alignment on the vertical axis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;justify-content:&lt;/strong&gt; allows alignment on the horizontal axis.&lt;/p&gt;
&lt;h3&gt;
  
  
  Browser Support Status
&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%2Fi%2Fx1onvtfk1o7jh2dmznz0.png" 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%2Fi%2Fx1onvtfk1o7jh2dmznz0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
You can follow the current support status at the address below. 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://caniuse.com/#search=grid" rel="noopener noreferrer"&gt;https://caniuse.com/#search=grid&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👉🏼&lt;a href="https://codepen.io/collection/DNgaZy/#" rel="noopener noreferrer"&gt;Codepen Collection:&lt;/a&gt; If you want to see all sample codes via codepen, you can click on the link and examine it.&lt;/p&gt;

&lt;p&gt;👉🏼&lt;a href="https://github.com/busramemis/Css-Grid-Layout" rel="noopener noreferrer"&gt;Github:&lt;/a&gt; You can also access all sample projects on github.&lt;/p&gt;



&lt;p&gt;If you want to learn more about the grid, I will leave a few links and content.&lt;/p&gt;

&lt;p&gt;🔽 Rachel Andrew's speech 👌🏻 :&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Felq4z_rdPQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;🔽 W3 : &lt;a href="https://www.w3schools.com/css/css_grid.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/css/css_grid.asp&lt;/a&gt;&lt;br&gt;
🔽 CssTricks: &lt;a href="https://css-tricks.com/snippets/css/complete-guide-grid/" rel="noopener noreferrer"&gt;https://css-tricks.com/snippets/css/complete-guide-grid/&lt;/a&gt;&lt;br&gt;
🔽 CssReferense : &lt;a href="https://cssreference.io/css-grid/" rel="noopener noreferrer"&gt;https://cssreference.io/css-grid/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After all this information, I put you an online exercise so that you can test yourself 👇🏻:&lt;br&gt;
&lt;a href="https://cssgridgarden.com/" rel="noopener noreferrer"&gt;https://cssgridgarden.com/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;PS: I don't have a very good English. So i am so sorry for wrong sentences.&lt;br&gt;
Stay tuned for more.😊&lt;/p&gt;

</description>
      <category>css</category>
      <category>grid</category>
      <category>beginners</category>
      <category>codepen</category>
    </item>
    <item>
      <title>Draw with CSS</title>
      <dc:creator>Büşra Memiş</dc:creator>
      <pubDate>Fri, 24 Jan 2020 12:12:42 +0000</pubDate>
      <link>https://forem.com/busramemis/draw-with-css-285i</link>
      <guid>https://forem.com/busramemis/draw-with-css-285i</guid>
      <description>&lt;p&gt;For a while, I started coding the visuals I encountered on the internet with CSS. I do this through my codepen account. I also collected all the drawings I did in a GitHub repo. &lt;/p&gt;

&lt;p&gt;All the work I've done until now:&lt;/p&gt;

&lt;h3&gt;
  
  
  🔸 Emoji
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/yLybROK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🔸 Snowman
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/povwgOe?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🔸 Pokemon Ball
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/QWwgzJN?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🔸 Santa Claus
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/oNgwabV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🔸 Gameboy
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/zYxaoYM?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🔸 Slot Machine
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/OJPpvZG?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🔸 Wall-e Eyes
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/LYEjGMr?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🔸 Groot
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/NWPYwgW?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🔸 Sweet Home
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/busramemis/embed/mdyGprK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I created a codepen collection so that you can see all these projects together. You can reach them all by clicking &lt;a href="https://codepen.io/collection/njaZGk"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can also access projects via Github. I created a repo called &lt;a href="https://github.com/busramemis/Draw-Exercises"&gt;Draw Exercises&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>sass</category>
      <category>codepen</category>
    </item>
  </channel>
</rss>
