<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Filip Cieślik on Medium]]></title>
        <description><![CDATA[Stories by Filip Cieślik on Medium]]></description>
        <link>https://medium.com/@filipcieslik?source=rss-2e16171cbfcb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1hHu6igJlqShaux6.</url>
            <title>Stories by Filip Cieślik on Medium</title>
            <link>https://medium.com/@filipcieslik?source=rss-2e16171cbfcb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 16:14:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@filipcieslik/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introduction to CSS Grid you may have missed — Part 2]]></title>
            <link>https://filipcieslik.medium.com/introduction-to-css-grid-you-may-have-missed-part-2-c122fb651cd4?source=rss-2e16171cbfcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/c122fb651cd4</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[css-grid]]></category>
            <category><![CDATA[css-grid-layout]]></category>
            <dc:creator><![CDATA[Filip Cieślik]]></dc:creator>
            <pubDate>Wed, 30 Dec 2020 09:03:38 GMT</pubDate>
            <atom:updated>2020-12-30T09:03:38.170Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Introduction to CSS Grid you may have missed — Part 2</em></h3><h3>Introduction</h3><p><a href="https://filipcieslik.medium.com/introduction-to-css-grid-you-may-have-missed-part-1-a8353135ba8c">The first part</a> of the article covered the basic terminology of CSS Grid.<br>The whole idea of splitting this topic into a series of smaller articles was to help you better understand the concept behind the grid before moving on to more complex things. I hope that now you feel more confident and you are ready to dive into more examples.</p><h3>What will you learn?</h3><p>In this part, I would like to cover most of the functions that can be used. These functions will ease the pain of writing clean and reusable layouts for cross devices and different types of media queries. Without any further ado, let’s check them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GSgRJ0d663ZWZmd7" /><figcaption>Photo by <a href="https://unsplash.com/@ro_ka?utm_source=medium&amp;utm_medium=referral">Robert Katzki</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Functions, functions. Functions everywhere!</h3><h4>Repeat function</h4><p>This is pretty straightforward. Instead of repeating columns/rows values or specific patterns, you can simply use this function. Let’s have a look at the examples below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/de9d985f5b49148169aaacae03c66e07/href">https://medium.com/media/de9d985f5b49148169aaacae03c66e07/href</a></iframe><h4>Minmax function</h4><p>The <em>minmax</em> function accepts two parameters that represent the minimum and maximum values. These values set a range of a grid row <em>(</em>height<em>) </em>or column <em>(</em>width<em>).</em></p><p>Note that this function works best with strict minimum values <em>(</em>e.g. in pixels<em>) </em>and some flexible maximum values, as the grid stretches itself to 100% of the available width.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9dfc26910e3908849ada17a7efd37a21/href">https://medium.com/media/9dfc26910e3908849ada17a7efd37a21/href</a></iframe><p>And the result of the above code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zU4_msb4VWafb0BAOZSGJw.png" /><figcaption>minmax function</figcaption></figure><h4>Fit-content function</h4><p>It accepts only one parameter and that is the maximum value. Any grid column or row that has this property set will take as little space as possible <em>(</em>depending on the content<em>) </em>but no more than the maximum value set.</p><p>You may see some similarities with the <em>minmax</em> function when 0 is set as the property value. One important difference is that the <em>minmax </em>will try to occupy the maximum space allowed. The fit-content makes sure that no more space than necessary is being taken.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/13b3c81c2a449aabd6e8ab3e795ff2f9/href">https://medium.com/media/13b3c81c2a449aabd6e8ab3e795ff2f9/href</a></iframe><p>And the result of the above code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*6wjK0JoPGB9rzL12iqVVTA.png" /><figcaption>fit-content function</figcaption></figure><h4>Min-content and Max-content functions</h4><p>These functions are not purely CSS Grid ones. You may have already used them as they are commonly used in the CSS.</p><p>But how do they work? If the <em>min-content</em> is set to the column, the content will take as little space as possible. For example, if you have a text <em>(span</em> or <em>p) </em>in the column, it will be wrapped and put in one line. The <em>max-content</em> on the opposite will make sure that the content takes as much space as it can <em>(</em>in terms of text it will be putting everything in one line<em>)</em>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/76ffac253828bc0f012d6437c162aae9/href">https://medium.com/media/76ffac253828bc0f012d6437c162aae9/href</a></iframe><p>And the result of the above code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DtVwFo_7QwpEtzpOARkDVw.png" /><figcaption>min-content and max-content functions</figcaption></figure><h4>Grid-auto-flow property</h4><p>If you do not change this property the standard way of putting items in the grid container is from left to right. This means that when the first line of the grid container is full <em>(</em>no space on the screen<em>)</em>, the next item will be placed into the next row.</p><p><strong>The default value of grid-auto-flow is ROW!</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee72fc3a21fd374d2fb349c0d6d16273/href">https://medium.com/media/ee72fc3a21fd374d2fb349c0d6d16273/href</a></iframe><p>And the visualization of both grids:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rriNaysasF99v_qLzmEMSg.png" /><figcaption>Default grid-auto-flow</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q6inMnwK4aALrIKe3IHJfA.png" /><figcaption>grid-auto-flow set to ‘columns’</figcaption></figure><h4>Positioning</h4><p>With every new grid container creation, we also get grid lines automatically. By using them we can position the item as we want.</p><p>What is most crucial to understand is that while positioning an item, we must define four grid lines (grid-row-start, grid-row-end, grid-column-start, and grid-column-end).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d04a8a155999293538d74bd3bfcd6aad/href">https://medium.com/media/d04a8a155999293538d74bd3bfcd6aad/href</a></iframe><p>And the result of the above code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*dIEZHr4DnrKVBpQjEv7-XQ.png" /><figcaption>Positioning items</figcaption></figure><p>Note that you can start positioning an item at grid line number 1 and end it on line number -1. This will always be the last line, regardless of how many there are in your grid.</p><p>There is also a possibility to define how many grid lines in a column or a row should be covered by an element by adding the<em> ‘span’</em> word:</p><blockquote>grid-column: 1 / span 2</blockquote><h4>Dynamic number of rows and/or columns</h4><p>Quite often you will need to have a dynamic number of items, according to the width of the container and the space available on the screen. You can achieve it by combining the repeat function with <em>auto-fit</em> &amp; <em>auto-fill</em><strong>.</strong></p><p>When you are using the repeat function with <em>auto-fit </em>or<em> auto-fill</em>, the grid container creates as many grid tracks (columns/rows) as possible without overflowing the container.</p><p>With <em>auto-fit</em>, when there are not enough grid items to fill the number of tracks created, those empty tracks are collapsed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/575dae630f43795ec86c1a03fde3ad5e/href">https://medium.com/media/575dae630f43795ec86c1a03fde3ad5e/href</a></iframe><p>And the result of the above code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ucHuqSACKjDTIUEP4RcoYA.png" /><figcaption>Visualization of grid items with auto-fit</figcaption></figure><p>With <em>auto-fill</em>, everything is the same as <em>auto-fit</em>, except empty tracks are not collapsed. They are preserved.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e14e8480d30f009c1b01ee917e02f7af/href">https://medium.com/media/e14e8480d30f009c1b01ee917e02f7af/href</a></iframe><p>And the result of the above code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mN4ULLcX9K38OEIEDVMleg.png" /><figcaption>Visualization of grid items with auto-fill</figcaption></figure><h3>Summary</h3><p>That’s all for this part. I hope that after reading this article you will try to use the full potential of the CSS Grid. Remember that only practice makes the master. So thanks for reading and keep coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c122fb651cd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to CSS Grid you may have missed — Part 1]]></title>
            <link>https://filipcieslik.medium.com/introduction-to-css-grid-you-may-have-missed-part-1-a8353135ba8c?source=rss-2e16171cbfcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8353135ba8c</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[css-grid]]></category>
            <dc:creator><![CDATA[Filip Cieślik]]></dc:creator>
            <pubDate>Wed, 09 Dec 2020 05:51:03 GMT</pubDate>
            <atom:updated>2020-12-09T06:03:42.602Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Introduction to CSS Grid you may have missed — Part 1</em></h3><h3><strong>Introduction</strong></h3><p>On October 17th 2017, Microsoft’s Edge browser shipped its implementation of CSS Grid. You may think that it was something completely irrelevant but in fact, it was a milestone for many reasons.</p><p>First, all major browsers started supporting this layout tool.</p><p>Second, all main browsers introduced and deployed their implementations in a single year — a great example of cross-browser collaboration.</p><p>Third, all developers gained a new and very powerful tool for creating responsive layouts without being concerned about browser support.</p><h3><strong>What will you learn?</strong></h3><p>In this series of articles, I would like to show you the most crucial features of CSS Grid. What is more, in the third part I would like to code a simple gallery page with CSS Grid.</p><p>The article does not cover all the topics, but the idea behind it is to help you get writing your own pages/designs/blogs/you-name-it as soon as possible.</p><p>If you think this is not enough to start coding, just have a look at <strong>the Pareto Principle</strong>. In short, sometimes 20% of the input lets you assert 80% of the outcome.</p><p>And, of course, a quote — as every good article has at least one.</p><blockquote>“Progress isn’t made by early risers. It’s made by lazy men trying to find easier ways to do something.”</blockquote><blockquote>― <strong>Robert Heinlein</strong></blockquote><p>I highly recommend using <strong>Mozilla Firefox Developer Edition</strong> that has great support for CSS Grid visualization <em>(</em>including implicit and explicit grids<em>)</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*l3oeV0lIdyfEG1QP2vuK8g.png" /><figcaption>Mozilla Firefox Developer Edition</figcaption></figure><h3><strong>Boring specs and terminology</strong></h3><p>The CSS Grid is quite complex. Perhaps, even more complex than Flexbox <em>(h</em>ere I will pause, and express my opinion that it is still good to use Flexbox for simple layouts and that CSS Grid is not a replacement for it<em>)</em>.</p><p>However, let’s start with basic terminology to better understand everything.</p><h3><strong>The CSS Grid is declarative</strong></h3><p>When you think of declarative API you may think as well of ReactJS. Websites, SPAs have evolved into massive and difficult layouts that are either hard to code or maintain across multiple device types. The CSS Grid eliminates the process of creating these layouts dependent on media queries or the device type. It replaces all with a set of declarative rules.</p><p>Part of Grid documentation:</p><blockquote>/**<br>* Define the space for each grid item by declaring the grid<br>* on the grid container.<br>*/</blockquote><h3><strong>Grid container</strong></h3><p>Most of the available websites and web applications are built with ‘boxes’. These boxes are placed in a specific order and within some boundaries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d9QTCOY5eT85UUdm" /><figcaption>Photo by <a href="https://unsplash.com/@tirzavandijk?utm_source=medium&amp;utm_medium=referral">Tirza van Dijk</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In the CSS grid context, a grid container <em>(</em>box<em>) </em>is a parent that holds grid elements <em>(</em>other boxes<em>)</em>. It also defines the placement of grid lines <em>(</em>both horizontal and vertical<em>)</em>.</p><p><strong>How to define a grid container?<br></strong>In order to use it, you need to add a grid display property to the HTML element. Once applied, you will have a block-level box on this element and any direct children will fall into grid formatting context. This means they will start acting like grid items, rather than block/inline elements.</p><p>On the example below you may notice standalone text <em>‘Am I a grid item?’</em> that is not wrapped with any HTML tag.</p><p>It is worth mentioning that CSS Grid will turn it into a grid item as well, so in the example, below we have 4 grid items <em>(</em>children<em>)</em>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8343ef1c41c024808a0d2b2a703f5ea/href">https://medium.com/media/f8343ef1c41c024808a0d2b2a703f5ea/href</a></iframe><p>And how it looks in Firefox dev tools:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*HmNMTEOu8JCHtwhsPWxUkg.png" /><figcaption>Grid container visualization in Firefox</figcaption></figure><p>Here is how it looks in the browser with the Firefox Overlay Grid option enabled:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xGqCsp_KZXpmfaU_l0KSPA.png" /><figcaption>Grid container</figcaption></figure><p>Horizontally placed numbers are grid lines that define columns <em>(</em>in that case only one column that starts with 1 and ends with 2<em>), </em>and vertically placed numbers that represent the start and the end of each row.</p><p>More about them you will find in the next point. Dashed lines represent grid-gap property between rows.</p><p>Stackblitz demo:</p><p><a href="https://stackblitz.com/edit/web-platform-vp8dxy?file=index.html">https://stackblitz.com/edit/web-platform-vp8dxy</a></p><p><strong>How to define columns and rows?<br></strong>To create rows and columns within a grid container, you have to use these properties:</p><p><em>grid-template-columns </em>and<em> grid-template-rows</em></p><p><em>grid-template-columns</em> defines the number of the explicit columns, and <em>grid-template-rows</em> defines the number of the explicit rows. Once you set values into these properties, they will create row and column tracks within the grid container.</p><p>Check the below example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb6e5a3765f96c32941ad95b3876e288/href">https://medium.com/media/eb6e5a3765f96c32941ad95b3876e288/href</a></iframe><p>This will create 3 new columns <em>(</em>100px width each<em>) </em>and 3 new rows <em>(</em>100px width each<em>)</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*-T4oKt2svDzqc6rO8qnjaQ.png" /><figcaption>Grid rows and columns visualization in Firefox</figcaption></figure><p><strong>Explicit vs Implicit grid container</strong></p><p>If you place more items than you have available cells in your grid, or when an item is placed outside of the explicit grid, the container automatically generates tracks by adding lines. The explicit grid together with these additional implicit tracks and lines forms the so-called implicit grid.</p><p>Check the below example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a647e80d552c842b8de7b699ee802cc/href">https://medium.com/media/8a647e80d552c842b8de7b699ee802cc/href</a></iframe><p>Our grid has only three explicit rows. The fourth item is placed into the automatically generated grid track and it takes the height of the content. For example: if <em>div.item4</em> has a height of 50px, then the automatically generated grid track will have the same height.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*pM5dTfDeeez3nn970sXROg.png" /><figcaption>Grid container auto-generated tracked (in purple)</figcaption></figure><h3><strong>Grid line</strong></h3><p>In the example below, I created a Grid Container with three items <em>(</em>children<em>) </em>in it. By default, all items are placed in rows <em>(</em>you can change it by applying <em>grid-auto-flow</em>: columns or <em>grid-template-columns</em>: 1fr<em>)</em>.</p><p>Grid lines are the horizontal and vertical lines that divide the created grid. These lines define rows and/or columns, dependent on grid items.</p><p>Here is how it looks with Firefox Development visualization <em>(grid </em>lines in purple<em>)</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*sHV-7Dz5djycYg6aLsb5Eg.png" /><figcaption>Grid container</figcaption></figure><h3>Grid cell</h3><p>A grid cell is the smallest unit in the grid layout. As you may have already noticed, a grid cell is defined by four grid lines.</p><p>Here is how it looks with Firefox Development visualization <em>(</em>ITEM 1<em>)</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*bgKyJO3Sv00qFtKj8dGvdg.png" /><figcaption>Grid cell in the browser</figcaption></figure><p>and with Firefox dev tools <em>(</em>in purple<em>)</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YVvg6XWf5HxOBeyLjzHLMw.png" /><figcaption>Grid cell in the Firefox dev tools</figcaption></figure><h3>Grid area</h3><p>A grid area is a field that covers at least one grid cell. It is possible that the whole grid area will cover the entire grid.</p><p>In the example below, the area covered by eight cells is also a grid area.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*UnykJ0XaM_wGn4BlJ8leMg.png" /><figcaption>Grid area</figcaption></figure><p>Note that <em>grid-area</em> is a shorthand property that specifies a grid item’s size and location within the grid.</p><h3>Grid track</h3><p>Try to think of the grid track as a space between two grid lines <em>(</em>either in a row or a column<em>)</em>. You can also name them as you want or start using grid tracks based on area name, by adding a proper suffix <em>(</em>e.g. if the area is named content you can define track between <em>content-start</em> and <em>content-end)</em>.</p><p>Here is how it looks with Firefox Development visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*wVVzyg8Retp7F_XrstECUQ.png" /><figcaption>Grid tracks</figcaption></figure><h3>Fractional units</h3><p>One of the most crucial things when learning CSS Grid is to understand fractional unit <em>(</em>shorthand —<em> fr)</em>. This unit eases the pain of calculating percentages of space taken by each item.</p><p>Let’s have a look at the below example to better understand this concept:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ee069976cecb2b86c0a5acf2ec504b1/href">https://medium.com/media/2ee069976cecb2b86c0a5acf2ec504b1/href</a></iframe><p>Stackblitz demo:</p><p><a href="https://stackblitz.com/edit/web-platform-xetdup?file=index.html">https://stackblitz.com/edit/web-platform-xetdup?file=index.html</a></p><p>And here is how it looks with Firefox Development visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0o1NNQIuXA4TvsjfSBXNGw.png" /><figcaption>Fractional units</figcaption></figure><p>Note that you are <strong>NOT</strong> bound to just whole numbers!</p><p>In the example above, the total fraction is 1fr + 2fr + 1.5fr + 0.5fr = <strong>5fr</strong>.</p><p>If the parent container width equals 1200px then:</p><p><strong>1fr</strong> =&gt; 1fr/5fr * 1200px = 240px</p><p><strong>2fr</strong> =&gt; 2fr/5fr * 1200px = 480px</p><p><strong>1.5fr</strong> =&gt; 1.5fr/5fr * 1200px = 360px</p><p><strong>0.5fr</strong> =&gt; 0.5fr/5fr * 1200px = 120px</p><p>With fractional units, a lot of flexibility was introduced. Make sure to use them in order to start laying out contents with the CSS Grid layout.</p><p>Most people think that fractional unit divides grid column or row into equally spaced areas. This is not true in all of the cases. Let’s have a look at another example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cf10bd048492865b443d8e07d27d584/href">https://medium.com/media/3cf10bd048492865b443d8e07d27d584/href</a></iframe><p>And a quick glance at the spec:</p><blockquote>The fr unit fills up the available space BUT it is NEVER smaller than the minimum size of the grid container or the content of the row or column.</blockquote><p>It means that in case of any image or grid item with <em>min-height</em>/<em>min-width </em>property, you may encounter some unexpected results by applying <em>fr</em>.</p><h3>Grid template areas</h3><p>This is quite a declarative and visual way of creating your layout. Let’s have a look at the code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c75b593834f5b8f5a79d256aca11393/href">https://medium.com/media/8c75b593834f5b8f5a79d256aca11393/href</a></iframe><p>Check stackblitz demo:</p><p><a href="https://stackblitz.com/edit/web-platform-sc1ukg">https://stackblitz.com/edit/web-platform-sc1ukg</a></p><p>Here is how it looks with Firefox Development visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*3tGCY21EvTaJXZVY2rRjOw.png" /><figcaption>Grid template areas</figcaption></figure><p>Each section in quotes is a row and each word represents a column. Dot “. “ stands for an empty grid cell, and it can be repeated. Spaces are not relevant and you can play around with the format.</p><p>If you are using <strong>prettier</strong> or any other formatting plugin it would be a good idea to suppress the grid-template-areas code fragment, so it won’t be changed while formatting.</p><p>This is useful in case of any layout changes in terms of media-query or the device that is being used.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cc9f606c471d4ee099a3cc71026edcf3/href">https://medium.com/media/cc9f606c471d4ee099a3cc71026edcf3/href</a></iframe><p>Here is how it looks with Firefox Development visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*9hbjpie0Z_G793HVyGNFuQ.png" /><figcaption>Grid template areas</figcaption></figure><h3>Naming lines</h3><p>When you are working on a complex grid with many rows or columns it may get complicated to place your items in proper grid cells. Named lines are an alternative solution for this problem.</p><p>There is a simple layout with multiple columns and rows. Each item is assigned to a column/row number:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d2de65ac3e9c578db47f1d9e5481792/href">https://medium.com/media/5d2de65ac3e9c578db47f1d9e5481792/href</a></iframe><p>Stackblitz demo:</p><p><a href="https://stackblitz.com/edit/web-platform-26fx9b?file=index.html">https://stackblitz.com/edit/web-platform-26fx9b?file=index.html</a></p><p>Here is how it looks with Firefox Development visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*51vvn7RQFYI-MTIlWVlqlQ.png" /><figcaption>Naming lines</figcaption></figure><p>Now the same example with named lines:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7567836d777dd525702c2e9ce63bdddf/href">https://medium.com/media/7567836d777dd525702c2e9ce63bdddf/href</a></iframe><p>It looks the same in Firefox Development visualization. Currently, named lines are not being displayed in another way.</p><p>Notice that each name of the line is defined in the brackets:</p><blockquote>grid-template-columns: [start] 1fr [middle] 1fr [middle-end] 1fr [end];</blockquote><p>You do not have to name all the lines of each column or row. You can name only those that are significant or important for your layout, like the start or end of columns.</p><h3>Summary</h3><p>That’s all for this part. I hope that by the end of this article the basic terminology will no longer be ambiguous for you.</p><p>In the next article, I would like to cover the most crucial functions of the CSS Grid.</p><p>Thanks for reading and keep coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8353135ba8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>