<?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: Alba Silvente Fuentes</title>
    <description>The latest articles on DEV Community by Alba Silvente Fuentes (@dawntraoz).</description>
    <link>https://dev.to/dawntraoz</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%2F369146%2F8e4f6c13-cf4c-4902-a68d-ca8184e9ec90.jpeg</url>
      <title>DEV Community: Alba Silvente Fuentes</title>
      <link>https://dev.to/dawntraoz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dawntraoz"/>
    <language>en</language>
    <item>
      <title>Official deprecation announcement Storyblok Vue 2 &amp; Nuxt 2 SDKs</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Mon, 08 Jul 2024 10:00:00 +0000</pubDate>
      <link>https://dev.to/storyblok/official-deprecation-announcement-storyblok-vue-2-nuxt-2-sdks-n1g</link>
      <guid>https://dev.to/storyblok/official-deprecation-announcement-storyblok-vue-2-nuxt-2-sdks-n1g</guid>
      <description>&lt;p&gt;Dear community,&lt;/p&gt;

&lt;p&gt;We want to announce some changes to the &lt;a href="https://github.com/storyblok/storyblok-vue-2" rel="noopener noreferrer"&gt;Storyblok Vue 2 SDK&lt;/a&gt; &amp;amp; &lt;a href="https://github.com/storyblok/storyblok-nuxt-2" rel="noopener noreferrer"&gt;Storyblok Nuxt 2 SDK&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The future of the Vue Ecosystem: Vue 2 &amp;amp; Nuxt 2 Deprecation
&lt;/h2&gt;

&lt;p&gt;Following the official end-of-life (EOL) for Vue 2 on December 31st, 2022, we will &lt;strong&gt;end &lt;a href="https://github.com/storyblok/storyblok-vue-2" rel="noopener noreferrer"&gt;Storyblok Vue 2 SDK&lt;/a&gt; support by August 31st, 2024&lt;/strong&gt;.  During this extended support period, we will be solving bug fixes and supporting customers and community members. After August 2024, we will discontinue all support for this package, and all the efforts will be centered on the repository for the latest version of Vue (3.x): &lt;a href="https://github.com/storyblok/storyblok-vue" rel="noopener noreferrer"&gt;Storyblok Vue SDK&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For Nuxt 2 users, the official EOL is June 30th, 2024. &lt;strong&gt;From the &lt;a href="https://github.com/storyblok/storyblok-nuxt-2" rel="noopener noreferrer"&gt;Storyblok Nuxt 2 SDK&lt;/a&gt;, the support will continue until December 31st, 2024&lt;/strong&gt;. After 2024, we will stop maintaining it, and the official Nuxt (3.x) SDK will be &lt;a href="https://github.com/storyblok/storyblok-nuxt" rel="noopener noreferrer"&gt;Storyblok Nuxt SDK&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With these changes, we want to ensure that our open-source SDKs for the Vue ecosystem are in sync with the latest trends. &lt;/p&gt;

&lt;p&gt;For detailed insights into the Vue 2 &amp;amp; Nuxt 2 depreciation, the latest changes, and technical recommendations, we recommend exploring the following resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Deprecation pages for both frameworks: &lt;a href="https://v2.vuejs.org/lts/" rel="noopener noreferrer"&gt;official Vue 2 deprecation&lt;/a&gt; and &lt;a href="https://v2.nuxt.com/lts/" rel="noopener noreferrer"&gt;official Nuxt 2 deprecation&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Migration guides: &lt;a href="https://v3-migration.vuejs.org/" rel="noopener noreferrer"&gt;official Vue 3 migration guide&lt;/a&gt; and &lt;a href="https://nuxt.com/docs/getting-started/upgrade" rel="noopener noreferrer"&gt;official Nuxt 3 upgrade guide&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Migrating to Vue 3 &amp;amp; Nuxt 3 Storyblok SDKs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1 - New packages names&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For Vue projects, instead of installing the package by &lt;code&gt;npm i -D @storyblok/vue-2&lt;/code&gt;, you should now run &lt;code&gt;npm install @storyblok/vue&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For Nuxt projects, the old way was &lt;code&gt;npm install @storyblok/nuxt-2&lt;/code&gt;. Now you should run &lt;code&gt;npx nuxi@latest module add storyblok&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2 - How to register them in your project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For Vue, you should still register the plugin at &lt;code&gt;main.js&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The old way in Vue 2 SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StoryblokVue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;apiPlugin&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@storyblok/vue-2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./App.vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;StoryblokVue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;your-token&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;use&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;apiPlugin&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;New way at Vue SDK (v3.x):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createApp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StoryblokVue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;apiPlugin&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@storyblok/vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./App.vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;StoryblokVue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;YOUR_ACCESS_TOKEN&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;use&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;apiPlugin&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;ul&gt;
&lt;li&gt;For Nuxt, you should still register the module inside &lt;code&gt;nuxt.config.js&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The old way in Nuxt 2 SDK: (check config &lt;a href="https://github.com/storyblok/storyblok-nuxt-2?tab=readme-ov-file#options" rel="noopener noreferrer"&gt;options available&lt;/a&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;buildModules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@storyblok/nuxt-2/module&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;your-access-token&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="c1"&gt;// or set the accessToken as publicRuntimeConfig (take priority if both are set) &lt;/span&gt;
  &lt;span class="nx"&gt;publicRuntimeConfig&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;storyblok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;STORYBLOK_ACCESS_TOKEN&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;New way at Nuxt SDK (v3.x): (check config &lt;a href="https://github.com/storyblok/storyblok-nuxt?tab=readme-ov-file#options" rel="noopener noreferrer"&gt;options available&lt;/a&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineNuxtConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;nuxt&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineNuxtConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@storyblok/nuxt&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;storyblok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;STORYBLOK_ACCESS_TOKEN&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;strong&gt;3 - Linking components between Storyblok Block Library and your Nuxt project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Nuxt 2, the folder used was &lt;code&gt;~/components/storyblok&lt;/code&gt;; for Nuxt 3, by default is &lt;code&gt;~/storyblok&lt;/code&gt;, but you can change it as stated in the &lt;a href="https://github.com/storyblok/storyblok-nuxt?tab=readme-ov-file#1-creating-and-linking-your-components-to-storyblok-visual-editor" rel="noopener noreferrer"&gt;Storyblok Nuxt SDK README&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The rest can be used and implemented the same way as in Vue 2 &amp;amp; Nuxt 2 SDKs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Always consider that the preferred way of using the composables available inside the SDKs is using &lt;a href="https://vuejs.org/api/sfc-script-setup.html" rel="noopener noreferrer"&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;If you have any questions or concerns not addressed in this communication and provided links, please &lt;a href="https://support.storyblok.com/hc/en-us/requests/new" rel="noopener noreferrer"&gt;submit a support ticket&lt;/a&gt;, and we will be happy to provide additional details.&lt;/p&gt;

&lt;p&gt;Looking forward to a future of innovation and collaboration!&lt;/p&gt;

&lt;p&gt;Warm regards,&lt;/p&gt;

&lt;p&gt;The Storyblok DevRel Team&lt;/p&gt;

</description>
      <category>vue</category>
      <category>nuxt</category>
      <category>storyblok</category>
    </item>
    <item>
      <title>Storyblok Nuxt 3 news 🗞</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Fri, 24 Feb 2023 17:21:39 +0000</pubDate>
      <link>https://dev.to/storyblok/storyblok-nuxt-3-news-1jcd</link>
      <guid>https://dev.to/storyblok/storyblok-nuxt-3-news-1jcd</guid>
      <description>&lt;p&gt;Hi, community 👋&lt;/p&gt;

&lt;p&gt;We have some exciting news to share with you about the Storyblok Nuxt 3 ecosystem! 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  SDK Updates
&lt;/h2&gt;

&lt;p&gt;Our Nuxt 3 SDK (&lt;a href="https://github.com/storyblok/storyblok-nuxt" rel="noopener noreferrer"&gt;@storyblok/nuxt&lt;/a&gt;) has removed axios and upgraded to the Nuxt 3 stable version 🎉&lt;/p&gt;

&lt;p&gt;To take advantage of this update, install the latest version or update the SDK to &lt;a href="https://github.com/storyblok/storyblok-nuxt/releases/tag/v5.1.0" rel="noopener noreferrer"&gt;v5.1.0&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The SDK now uses the Fetch API under the hood. If your environment doesn't support it, install a polyfill like &lt;a href="https://github.com/matthew-andrews/isomorphic-fetch" rel="noopener noreferrer"&gt;isomorphic-fetch&lt;/a&gt;. More information can be found on the &lt;a href="https://github.com/storyblok/storyblok-js-client#fetch-use-polyfill-if-needed---version-5" rel="noopener noreferrer"&gt;storyblok-js-client README&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As &lt;a class="mentioned-user" href="https://dev.to/arisa_dev"&gt;@arisa_dev&lt;/a&gt; mentioned in our last article, we are looking forward to your feedback about the SDKs and any ideas you may have to keep improving them. 🚀&lt;/p&gt;

&lt;p&gt;Thanks to my colleagues &lt;a class="mentioned-user" href="https://dev.to/alexjoverm"&gt;@alexjoverm&lt;/a&gt;, &lt;a class="mentioned-user" href="https://dev.to/robertobutti"&gt;@robertobutti&lt;/a&gt;, and &lt;a class="mentioned-user" href="https://dev.to/manuelschroederdev"&gt;@manuelschroederdev&lt;/a&gt; for supporting me during this process.&lt;/p&gt;

&lt;h2&gt;
  
  
  New article on the Ultimate Tutorial series
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fp0fcvkv8affr9ho82aer.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fp0fcvkv8affr9ho82aer.jpg" alt="Cover of the Ultimate Tutorial Nuxt 3 — Part 6 — Manage Multilingual Content in Storyblok and Nuxt" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yesterday, we also released part 6 of our Ultimate Tutorial series, which covers managing multiple languages in your Storyblok Nuxt 3 site. Check it out at &lt;a href="https://www.storyblok.com/tp/manage-multilingual-content-in-storyblok-and-nuxt" rel="noopener noreferrer"&gt;Manage Multilingual Content in Storyblok and Nuxt&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you haven't followed the previous articles and want to learn how to integrate Storyblok into your Nuxt 3 project, you can check out our first part of the Ultimate Tutorial series: &lt;a href="https://www.storyblok.com/tp/add-a-headless-CMS-to-nuxt-3-in-5-minutes" rel="noopener noreferrer"&gt;Add a headless CMS to Nuxt 3 in 5 minutes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let's build better websites together! Give us your opinion, and we will grow thanks to you 🫂&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>vibecoding</category>
      <category>metal</category>
      <category>careeradvice</category>
    </item>
    <item>
      <title>Article preview: A Guide To Image Optimization On Jamstack Sites</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Tue, 20 Dec 2022 16:58:12 +0000</pubDate>
      <link>https://dev.to/storyblok/article-preview-a-guide-to-image-optimization-on-jamstack-sites-5fl7</link>
      <guid>https://dev.to/storyblok/article-preview-a-guide-to-image-optimization-on-jamstack-sites-5fl7</guid>
      <description>&lt;p&gt;This November, I published an article about &lt;strong&gt;Image Optimization On Jamstack Sites&lt;/strong&gt; in Smashing Magazine. In this recap, I want to tell you what it is about, the sections and concepts covered in it, and show you the demo used to demonstrate the theory explained.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.smashingmagazine.com/2022/11/guide-image-optimization-jamstack-sites/" rel="noopener noreferrer"&gt;&lt;img src="https://media2.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%2Fuqdl0a0um0mhwlaz8c21.jpg" alt="Smashing Magazing cover for the article 'A guide to Image Optimization on Jamstack sites'" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Who is this article intended for?
&lt;/h2&gt;

&lt;p&gt;For developers and designers who want to improve the quality and performance of their projects containing images.&lt;/p&gt;

&lt;p&gt;Anyone who wants to learn new image optimization techniques, reaffirm their knowledge on the subject, or catch up on the latest trends.&lt;/p&gt;

&lt;h2&gt;
  
  
  What sections make up this article?
&lt;/h2&gt;

&lt;p&gt;The article comprises 5 sections covering theory, problems in working with images, and their theoretical and practical solutions, ending with a step-by-step case study.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It begins with a brief introduction to the importance of web performance today, its relationship to images, and how images impact the health of Jamstack sites.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.smashingmagazine.com/2022/11/guide-image-optimization-jamstack-sites/#fixes-to-common-problems" rel="noopener noreferrer"&gt;&lt;strong&gt;Fixes to common problems&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, we present the most common problems when using images in our projects and what would be the optimization technique or theoretical solution for each one of them.&lt;/p&gt;

&lt;p&gt;This section talks about the types of compression, the use of next-generation formats such as WebP and AVIF, the mandatory definition of &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; attributes in &lt;code&gt;img&lt;/code&gt; and &lt;code&gt;source&lt;/code&gt; tags, the optimization of images by device, resolution, and size, the &lt;code&gt;lazy&lt;/code&gt; or &lt;code&gt;eager&lt;/code&gt; loading technique, and the use of server and client cache.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.smashingmagazine.com/2022/11/guide-image-optimization-jamstack-sites/#the-benefits-of-using-an-image-service-cdn" rel="noopener noreferrer"&gt;&lt;strong&gt;The benefits of using an Image Service CDN&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we show a solution to each of the problems mentioned in the previous section by simply using an image CDN and discovering its simplicity and the advantages, flexibility, and scalability that it provides to our projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.smashingmagazine.com/2022/11/guide-image-optimization-jamstack-sites/#case-study-image-component-in-a-jamstack-site" rel="noopener noreferrer"&gt;&lt;strong&gt;Case study: Image component in a Jamstack site&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And with all the theories presented, it only remained to show an example project of how all these techniques could be carried out using Storyblok as a Headless CMS and image CDN provider. In this part, we present a static site generated by Nuxt 3, a custom image component created with Vue 3 and script setup, although it could be implemented in any other technology.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storyblok space (Duplicate): &lt;a href="https://app.storyblok.com/#!/build/172320" rel="noopener noreferrer"&gt;https://app.storyblok.com/#!/build/172320&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub repository: &lt;a href="https://github.com/Dawntraoz-Storyblok/sb-pokemon-gallery" rel="noopener noreferrer"&gt;https://github.com/Dawntraoz-Storyblok/sb-pokemon-gallery&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Live site: &lt;a href="https://sb-pokemon-gallery.dawntraoz.com/" rel="noopener noreferrer"&gt;https://sb-pokemon-gallery.dawntraoz.com/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.smashingmagazine.com/2022/11/guide-image-optimization-jamstack-sites/#conclusion" rel="noopener noreferrer"&gt;&lt;strong&gt;Conclusions&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lastly, we raise the importance of constant work on image optimization and maintenance, naming resources that allow you to keep up with the latest trends, testing the status of your images, and providing tips for creating standards in your company.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Official article: If you are interested in the topic and want to know more, read the original article &lt;a href="https://www.smashingmagazine.com/2022/11/guide-image-optimization-jamstack-sites/" rel="noopener noreferrer"&gt;A guide to image optimization on Jamstack sites&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How can this article help you?
&lt;/h2&gt;

&lt;p&gt;This article can help you establish a clear vision of what you need to take your project's images to another level and how to do it in a scalable way. You will learn how to maintain their quality while allowing the user to have the best experience, regardless of device or connection speed.&lt;/p&gt;




&lt;p&gt;We would love to hear your feedback on the article. Feel free to contact us through any channel or speak directly to the author at Alba (&lt;a href="https://twitter.com/dawntraoz" rel="noopener noreferrer"&gt;@dawntraoz&lt;/a&gt;).&lt;/p&gt;

</description>
      <category>php</category>
    </item>
    <item>
      <title>A content creator using Figma</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Sun, 12 Dec 2021 19:21:07 +0000</pubDate>
      <link>https://dev.to/dawntraoz/a-content-creator-using-figma-34e7</link>
      <guid>https://dev.to/dawntraoz/a-content-creator-using-figma-34e7</guid>
      <description>&lt;p&gt;In this post, I want to tell you about my experience as a content creator using Figma. How I'm designing images and banners to share on social networks, online courses assets and even a printed business card.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1469774773265780739-693" src="https://platform.twitter.com/embed/Tweet.html?id=1469774773265780739"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1469774773265780739-693');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1469774773265780739&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;Previous article&lt;/p&gt;

&lt;h2&gt;
  
  
  A Front-end Developer using Figma
&lt;/h2&gt;

&lt;p&gt;In it, I told about the basic concepts of &lt;em&gt;Figma&lt;/em&gt; and my first experience with the tool. How I defined the design system for my website, what resources I used to define it, and how I created my first slides with the components of my design system.&lt;/p&gt;

&lt;p&gt;If you are interested in reading it, here is the link: &lt;a href="https://www.dawntraoz.com/blog/a-front-end-developer-using-figma"&gt;A front end developer using Figma&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now we can start seeing how I have used &lt;em&gt;Figma&lt;/em&gt; to create and share online content. Let's start!&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Figma for social media
&lt;/h2&gt;

&lt;p&gt;When you create tech content, you don't always start with a marketing background, which isn't necessary either. In my case, and I understand that could be the case of many content creators, I started creating articles because I wanted to have my own summaries of code and techniques that I had struggled with.&lt;/p&gt;

&lt;p&gt;The reason for publishing it simply came about when I thought about making it public so that more people could find answers to their problems. And that's how the motivation to create my own blog and to make it evolve, little by little, started 🚀.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Social sharing card images.
&lt;/h3&gt;

&lt;p&gt;The first thing I started designing to share online were the social media cards for every major page of my site: Home page, Projects, Talks &amp;amp; podcasts and Technical articles (my blog).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The image below is the card created to share &lt;a href="https://dawntraoz.com/blog/"&gt;my blog's URL&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3pldg63wouox9v7px7l4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3pldg63wouox9v7px7l4.jpeg" alt="Social sharing card image for dawntraoz's blog" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To begin, I looked for the recommended frame size for images that are displayed when sharing a website on social networks, also known as &lt;em&gt;Open Graph&lt;/em&gt; images, which was &lt;strong&gt;1200×630&lt;/strong&gt;. Then, I chose the equivalent frame in &lt;em&gt;Figma&lt;/em&gt; called &lt;strong&gt;Facebook post&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Use images that are at least 1200×630 for the best display on high resolution devices.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With the frame picked, I started to build the &lt;strong&gt;base&lt;/strong&gt; of all the cards and reuse the components of my design system.&lt;/p&gt;

&lt;p&gt;First the &lt;strong&gt;top part&lt;/strong&gt;, adding the logo and the URL of my website. Then I added the section with the &lt;strong&gt;main content&lt;/strong&gt; using the heading component, some texts, and the logos of my titles.&lt;/p&gt;

&lt;p&gt;And finally, at the &lt;strong&gt;bottom of the card&lt;/strong&gt;, I used the label component to add my nick in any social network and the group of networks' logos I have under that nickname.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figqo89e1kzmpivwt8gp1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figqo89e1kzmpivwt8gp1.png" alt="Base template for social sharing image for dawntraoz's blog made in Figma" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The purpose of these cards was to make the content of the page more &lt;strong&gt;eye-catching&lt;/strong&gt; when sharing it online. The image below represents what it would look like if you share it on any social network, or messaging platform such as &lt;em&gt;Telegram&lt;/em&gt;, &lt;em&gt;Discord&lt;/em&gt;, &lt;em&gt;Slack&lt;/em&gt;, …&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjddfxfila37jir7542s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjddfxfila37jir7542s.png" alt="Representation on how the social sharing image for Dawntraoz's blog looks like" width="599" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Social banners.
&lt;/h3&gt;

&lt;p&gt;When I started sharing the cards, I realized that they had nothing to do with the way I presented myself on my social media or professional platforms.&lt;/p&gt;

&lt;p&gt;For that, I decided to take the same idea and implement it in banners for &lt;a href="https://www.linkedin.com/in/dawntraoz"&gt;&lt;em&gt;LinkedIn&lt;/em&gt;&lt;/a&gt;, &lt;a href="https://twitter.com/dawntraoz"&gt;&lt;em&gt;Twitter&lt;/em&gt;&lt;/a&gt;, &lt;a href="https://github.com/Dawntraoz"&gt;&lt;em&gt;GitHub&lt;/em&gt;&lt;/a&gt; and &lt;a href="https://www.polywork.com/dawntraoz"&gt;&lt;em&gt;Polywork&lt;/em&gt;&lt;/a&gt;. To do so, I simply reused the card but in different frame types, using &lt;strong&gt;Twitter Header&lt;/strong&gt; for &lt;em&gt;Twitter&lt;/em&gt; &amp;amp; &lt;em&gt;GitHub&lt;/em&gt;, &lt;strong&gt;LinkedIn cover&lt;/strong&gt; for &lt;em&gt;LinkedIn&lt;/em&gt; &amp;amp; &lt;em&gt;Polywork&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47zucw1muscalg9hy8ca.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47zucw1muscalg9hy8ca.png" alt="Social banner image for dawntraoz's networks designed in Figma" width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this way, there is a match between the branding of my website and my socials. As you can see below, the banner on my &lt;em&gt;Twitter&lt;/em&gt; profile looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faeuwum1564if687yjzlk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faeuwum1564if687yjzlk.png" alt="Screenshot of the Dawntraoz's Twitter profile with a banner designed in Figma" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Instagram's artworks.
&lt;/h3&gt;

&lt;p&gt;Once I got the hang of social media, I decided to start an &lt;em&gt;Instagram&lt;/em&gt; account. A &lt;strong&gt;new format&lt;/strong&gt;, totally different to how I used to share on &lt;em&gt;Twitter&lt;/em&gt;, but I wanted to try it out and exploit my &lt;em&gt;Figma&lt;/em&gt; design system a bit more.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Post&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;My idea was to make small &lt;strong&gt;summaries of the articles&lt;/strong&gt; already written on my blog and link to them. To do this, I decided to create &lt;em&gt;Instagram&lt;/em&gt; posts with multiple images, and have the possibility to add &lt;strong&gt;up to 10 “slides”&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each summary consists of a &lt;strong&gt;cover page&lt;/strong&gt;, a brief description of the &lt;strong&gt;content&lt;/strong&gt; with use cases, and a &lt;strong&gt;back cover&lt;/strong&gt; with links to the article on the 3 platforms where it is published.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5bsbtft6isoy1fdbwes.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5bsbtft6isoy1fdbwes.png" alt="Instagram post summary for the article Alignment with Flexbox" width="800" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The image above shows an example summary for the article &lt;a href="https://www.dawntraoz.com/blog/alignment-flexbox/"&gt;Alignment with Flexbox&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To keep the images of a single summary grouped together, I have defined an &lt;a href="https://help.figma.com/hc/en-us/articles/360040451373-Create-dynamic-designs-with-auto-layout"&gt;&lt;strong&gt;Auto Layout&lt;/strong&gt;&lt;/a&gt; in horizontal mode with &lt;strong&gt;120px&lt;/strong&gt; of &lt;strong&gt;padding&lt;/strong&gt; and 120px of spacing between items. And to define the size of the images to be posted on &lt;em&gt;Instagram&lt;/em&gt;, each of the frames within this Auto Layout uses the &lt;strong&gt;Instagram Post&lt;/strong&gt; frame (&lt;strong&gt;1080×1080&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6uaqbo70aczma55idteh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6uaqbo70aczma55idteh.png" alt="Alignment with flexbox Instagram summary cover showcase" width="800" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the frames were created, to position the content within them optimally, I defined a &lt;strong&gt;90px size&lt;/strong&gt; grid called &lt;strong&gt;Instagram Grid&lt;/strong&gt; and saved it in the Grid styles to reuse it in future posts.&lt;/p&gt;

&lt;p&gt;Then I simply started adding the components that already existed in my design system and let my imagination run wild.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuj553hvmewq6x8hjhus.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuj553hvmewq6x8hjhus.jpeg" alt="90px size grid in light red in Figma Grid Styles" width="513" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And finally, when I have finished creating the post, I select all the slides and export them in PNG format.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To see the possibilities of exporting, you can follow &lt;a href="https://help.figma.com/hc/en-us/articles/360040028114-Guide-to-exports-in-Figma"&gt;this guide to exports in Figma&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Grid composition&lt;/strong&gt; (3 posts in 1 frame).&lt;/p&gt;

&lt;p&gt;After uploading my first three summaries, I felt like giving a &lt;strong&gt;different format&lt;/strong&gt; to the next one. It crossed my mind to define an image that would occupy the 3 squares of the &lt;em&gt;Instagram&lt;/em&gt; grid. I had seen many people do this kind of composition before, and I wanted to create one of my own.&lt;/p&gt;

&lt;p&gt;For this, I reused the previous Auto Layout and instead of adding 3 frames of 1080×1080, I added a &lt;strong&gt;frame of (1080×3)×1080&lt;/strong&gt;. This way I was able to build it all together from the beginning and then cut it into the parts that compose it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7qqfmdas0lbym6bngr3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7qqfmdas0lbym6bngr3.png" alt="Dawntraoz setup instagram grid composition artwork" width="800" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And after a few summaries and compositions, this is how my &lt;strong&gt;account's wall&lt;/strong&gt; at &lt;a href="https://www.instagram.com/dawntraoz/"&gt;@dawntraoz&lt;/a&gt; looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4gwcmt9hnevkcm61ulst.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4gwcmt9hnevkcm61ulst.png" alt="Instagram dawntraoz.tech account wall showcase" width="414" height="467"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Highlights.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a &lt;strong&gt;bonus&lt;/strong&gt;, when promoting the posts via Stories, I decided to store these Stories in &lt;strong&gt;Highlights&lt;/strong&gt; and create icons in &lt;em&gt;Figma&lt;/em&gt; to make them catchy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fptzxddnqy1u77afdjzoh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fptzxddnqy1u77afdjzoh.png" alt="Instagram highlights artworks made in Figma" width="800" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For icons, I always use the &lt;a href="https://iconic.app/"&gt;iconic.app&lt;/a&gt; library because I find them simple and ideal for any use case. Go and have a look for yourself 🚀&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using Figma for online courses and workshops
&lt;/h2&gt;

&lt;p&gt;In the previous section, I showed you the designs I created for personal use. In this section, however, although there is not much difference in the use of &lt;em&gt;Figma&lt;/em&gt;, the designs will be for &lt;strong&gt;external projects&lt;/strong&gt; that have wanted to count on me as a content creator.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Focus on Storyblok lessons&lt;/strong&gt;.
&lt;/h3&gt;

&lt;p&gt;Recently, I taught 3 lessons of the &lt;a href="https://www.headlesscreator.com/course/focus-on-storyblok"&gt;Focus on Storyblok&lt;/a&gt; course at &lt;a href="https://www.headlesscreator.com/"&gt;Headless Creator&lt;/a&gt;. And although they always take care of saving and publishing the videos of the lessons, I took care of the documentation.&lt;/p&gt;

&lt;p&gt;To show the documentation to the students I created an open-source project published on a subdomain of my website, &lt;a href="https://focus-on-storyblok.dawntraoz.com/"&gt;focus-on-storyblok.dawntraoz.com&lt;/a&gt;, and for each lesson I decided to create an &lt;em&gt;Open Graph&lt;/em&gt; image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkr15hindn18or0cx7n7e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkr15hindn18or0cx7n7e.png" alt="Social sharing card images for Dawntraoz's lessons on the Focus on Storyblok course at Headless creator" width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, whenever I share any of the lessons on social media, you can see what it's all about at a glance!&lt;/p&gt;

&lt;h3&gt;
  
  
  2. “How to migrate from WP to a Headless CMS” workshop.
&lt;/h3&gt;

&lt;p&gt;I recently gave a workshop based on the article &lt;a href="https://www.smashingmagazine.com/2021/07/wordpress-headless-cms-storyblok/"&gt;How To Migrate From WordPress To A Headless CMS&lt;/a&gt;, which I published in July 2021 at &lt;em&gt;Smashing Magazine&lt;/em&gt;. To make the content of the workshop, I came up with the idea of creating slides that represented the two brands, my personal brand and the &lt;em&gt;Smashing Magazine&lt;/em&gt; one.&lt;/p&gt;

&lt;p&gt;Combining my components with my colors and theirs, my typography with their logo and the inclination of the square shapes with the angle used in their logo, I got the format I wanted!&lt;/p&gt;

&lt;p&gt;What do you think, do you think it looks good?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkycebzsvrwvmychbtpky.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkycebzsvrwvmychbtpky.png" alt="How to migrate from WP to a Headless CMS slides showcase made in Figma" width="800" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Referring again to my first article on &lt;em&gt;Figma&lt;/em&gt;, to export the slides in an interactive format, I made use of the &lt;a href="https://www.figma.com/community/plugin/838925615018625519/Pitchdeck-Presentation-Studio"&gt;Pitchdeck Presentation Studio&lt;/a&gt; plugin.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Using Figma for articles artworks
&lt;/h2&gt;

&lt;p&gt;One of the things that excites me most about &lt;em&gt;Figma&lt;/em&gt; is that, one minute you're creating an article about it, and the next minute you're using it to create the artwork for that article.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You know the phrase 'All roads lead to Rome', well in this case '&lt;strong&gt;All creations lead to Figma&lt;/strong&gt;'.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A proof of this, is the artworks in the article &lt;a href="https://www.dawntraoz.com/blog/positioning-elements-with-grid"&gt;Positioning elements with grid&lt;/a&gt; on my personal blog. They were all created in Figma, and one example of this is the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F157aet1p3g23akmz65gp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F157aet1p3g23akmz65gp.png" alt="Artwork example for articles created in Figma for the article Positioning elements with Grid" width="604" height="185"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Figma for selling a Notion Template
&lt;/h2&gt;

&lt;p&gt;This use case is a bit different from the rest, because it doesn't talk about content creation, but about &lt;strong&gt;product design&lt;/strong&gt;. Just sometimes it goes hand in hand if you want to monetize what you do.&lt;/p&gt;

&lt;p&gt;One day, after seeing a couple of friends launch their first products, I decided to create my own, just to try it out. That's how I started to package the pages and templates I created for personal use in my &lt;em&gt;Notion&lt;/em&gt; space, and begun the selling process.&lt;/p&gt;

&lt;p&gt;Although it was a whole new world for me, I managed to find this video on &lt;a href="https://www.youtube.com/watch?v=Wb03KzYFENk"&gt;how to sell &lt;em&gt;Notion&lt;/em&gt; templates&lt;/a&gt; which gave me some useful tips and platforms, such as &lt;a href="https://gumroad.com/"&gt;&lt;em&gt;Gumroad&lt;/em&gt;&lt;/a&gt;, where I now sell my product.&lt;/p&gt;

&lt;p&gt;Publishing on &lt;em&gt;Gumroad&lt;/em&gt; requires creating exemplary &lt;strong&gt;cover images of the product&lt;/strong&gt;'s content and a good description of what it includes. To help you with this, &lt;em&gt;Gumroad&lt;/em&gt; has a &lt;a href="https://help.gumroad.com/"&gt;help section&lt;/a&gt; where they give you all the tips you need to produce a good product.&lt;/p&gt;

&lt;p&gt;And, of course, I decided to use &lt;em&gt;Figma&lt;/em&gt; to bring those covers to life. Which, according to &lt;em&gt;Gumroad&lt;/em&gt;, had to be in two specific formats: &lt;strong&gt;1280×720&lt;/strong&gt; and &lt;strong&gt;600x600&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can see the specification in this guide: &lt;a href="https://help.gumroad.com/article/60-adding-a-cover-image"&gt;Adding a Cover Image&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that's what I did, I created 2 frames of those sizes and I tried combinations until I found the definitive covers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fykvd19t1ht5hpdp8g970.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fykvd19t1ht5hpdp8g970.png" alt="Covers design for the DEVniverse Notion Template" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;These are the covers of the &lt;em&gt;Notion&lt;/em&gt; template &lt;a href="https://dawntraoz.gumroad.com/l/devniverse"&gt;DEVniverse&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Using Figma to create a business card (physically printed)
&lt;/h2&gt;

&lt;p&gt;And last, but not least, as the face-to-face events were starting to come alive again, I really wanted to design my own business card, and that's what I did 🙈&lt;/p&gt;

&lt;p&gt;The first thing I did was to look for a printing company near me and follow a guide with formatting tips. I found one with a guide on &lt;a href="https://www.printenbind.nl/en/submitting/useful-tips/how-do-you-design-a-business-card"&gt;How do you design a business card?&lt;/a&gt;, and from it, I extracted the aspect ratio of my business card: ~1.5 (650×428)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02jv4mztsgm2n0gal2ry.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02jv4mztsgm2n0gal2ry.png" alt="Business card design for Dawntraoz - Alba Silvente Fuentes brand" width="800" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Something to keep in mind when selecting our brand colors:&lt;/strong&gt;&lt;br&gt;
As the color gamut of the RGB system is larger than that of CMYK, some RGB colors cannot be reproduced in CMYK. Therefore, if you send a file in RGB format for printing, it will not come out as expected.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In my case, the printed result was as in the image below, with a glossy finish on the front and a matte paper on the back, so people can write any necessary notes with a pen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi276dlihog1001bzpllr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi276dlihog1001bzpllr.png" alt="Business card for Dawntraoz - Alba Silvente Fuentes brand printed physically" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And these are all the fantasies I wanted to tell you, I hope it will be useful for you in the future or that it will inspire you to embark on new personal projects!&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful plugins
&lt;/h2&gt;

&lt;p&gt;To finish with resources, here are the plugins that I found useful during my adventure:&lt;/p&gt;

&lt;h3&gt;
  
  
  Code Highlighter
&lt;/h3&gt;

&lt;p&gt;For highlight your code, forget about using an external website as &lt;em&gt;Carbon&lt;/em&gt;, you can now make your own code component inside &lt;em&gt;Figma&lt;/em&gt; and used it to share your tips online!&lt;/p&gt;

&lt;p&gt;👉  &lt;a href="https://www.figma.com/community/plugin/764836637878472379/Figma-Code-Highlighter"&gt;Figma Code Highlighter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I used it mostly for &lt;em&gt;Instagram&lt;/em&gt; summaries and the design of the articles' page of my website.&lt;/p&gt;

&lt;h3&gt;
  
  
  TinyImage Compressor
&lt;/h3&gt;

&lt;p&gt;Export compressed JPG, PNG, SVG, WebP, GIF, WebM, AVIF and PDF image files from &lt;em&gt;Figma&lt;/em&gt;, or downsize and compress image fills in your file for faster performance.&lt;/p&gt;

&lt;p&gt;👉  &lt;a href="https://www.figma.com/community/plugin/789009980664807964/TinyImage-Compressor"&gt;TinyImage Compressor&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I always find it useful, I highly recommend it to have more export options than &lt;em&gt;Figma&lt;/em&gt;'s default ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Figmoji
&lt;/h3&gt;

&lt;p&gt;Simply select the &lt;em&gt;Twitter&lt;/em&gt; style emoji you want, and &lt;em&gt;Figmoji&lt;/em&gt; will add the SVG of the selected emoji.&lt;/p&gt;

&lt;p&gt;👉  &lt;a href="https://www.figma.com/community/plugin/736612173445813953/Figmoji"&gt;Figmoji&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's perfect to spice up &lt;em&gt;Instagram&lt;/em&gt; artworks and not have the emojis in text, but in a high quality format like SVG!&lt;/p&gt;

&lt;h2&gt;
  
  
  Extra: Nails artwork
&lt;/h2&gt;

&lt;p&gt;And well, just for laughs, I created my own technological nails on &lt;em&gt;Figma&lt;/em&gt; xD&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1scbpkmv5gi61zhyzuyd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1scbpkmv5gi61zhyzuyd.png" alt="Figma design for Jamstack nails including Netlify, Nuxt, Storyblok, Vue and TailwindCSS" width="580" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this was the result of doing them myself without any previous knowledge of aesthetics:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb9st177nbgkxhempbxbk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb9st177nbgkxhempbxbk.png" alt="Real painted Jamstack nails including Netlify, Nuxt, Storyblok, Vue and TailwindCSS logos" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now yes, I hope you found it useful or at least that entertained you for a while. Thanks for reading me and if you have any feedback you can reach me on any social network as &lt;a href="https://twitter.com/dawntraoz"&gt;@dawntraoz&lt;/a&gt; 💜&lt;/p&gt;

&lt;p&gt;Happy Christmas to you all! 🎄&lt;/p&gt;

</description>
      <category>design</category>
      <category>figma</category>
      <category>notion</category>
      <category>contentcreator</category>
    </item>
    <item>
      <title>Positioning elements with Grid</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Tue, 27 Jul 2021 09:37:25 +0000</pubDate>
      <link>https://dev.to/dawntraoz/positioning-elements-with-grid-588f</link>
      <guid>https://dev.to/dawntraoz/positioning-elements-with-grid-588f</guid>
      <description>&lt;p&gt;In this post, I will show you the Grid basics and how I use it to place the content in common situations.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1419954287355043842-493" src="https://platform.twitter.com/embed/Tweet.html?id=1419954287355043842"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1419954287355043842-493');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1419954287355043842&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Grid?
&lt;/h2&gt;

&lt;p&gt;Grid (&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout"&gt;CSS Grid Layout&lt;/a&gt;) is defined as a tool to divide a page into main regions or to define the relationship in terms of size, position and layer.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Grid layout is compatible with the vast majority of browsers, some like Opera Mini and IE do not support it, in &lt;a href="https://caniuse.com/?search=grid"&gt;Can I use&lt;/a&gt; you can see what properties are supported by which browsers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is also known as the two-dimension layout system that provide us with the best alternative to the tables we used in the past, and has taken our user interfaces to the next level.&lt;/p&gt;

&lt;p&gt;The grid layout allows us to align the elements in columns and rows, space the elements from the container element, position the child elements by overlapping them or forming layers, among other features.&lt;/p&gt;

&lt;p&gt;This facilitates the creation of dynamic and responsive layouts, as we will see throughout the article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to learn more?
&lt;/h2&gt;

&lt;p&gt;Although in this article we will see the initial concepts and a couple of use cases, tips and tricks, I recommend that if you are interested in knowing the ins and outs of Grid, you should take a look at these resources.&lt;/p&gt;

&lt;p&gt;In these courses and articles they explain Grid, show you different use cases and the little details they have learned from experience.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.smashingmagazine.com/2020/01/understanding-css-grid-container/"&gt;Understanding CSS Grid&lt;/a&gt; Series by Rachel Andrew at Smashing Magazine.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cssgrid.io/"&gt;Learn CSS Grid&lt;/a&gt; course by Wes Bos (free).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://css-tricks.com/snippets/css/complete-guide-grid/"&gt;A Complete Guide to Grid&lt;/a&gt; by Chris House at CSS-Tricks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Grid properties
&lt;/h2&gt;

&lt;p&gt;Now that you know the Grid concept, we are going to see the &lt;strong&gt;properties&lt;/strong&gt; we need to shape our layout, distinguishing between the properties of the &lt;em&gt;parent&lt;/em&gt; or &lt;em&gt;child&lt;/em&gt; element.&lt;/p&gt;

&lt;p&gt;Being the &lt;strong&gt;&lt;em&gt;parent&lt;/em&gt;&lt;/strong&gt; element, the one that contains one or more &lt;strong&gt;&lt;em&gt;child&lt;/em&gt;&lt;/strong&gt; elements that will be sized, aligned, layered and redistributed by the available space. Let's see an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"parent grid"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"child grid-item"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"child grid-item"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"child grid-item"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The parent will be in charge of defining the grid and the children will be in charge of positioning or aligning themselves in specific places, if necessary.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Parent&lt;/strong&gt; (grid &lt;em&gt;container&lt;/em&gt;) properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;display&lt;/strong&gt; - specifies the type of rendering box of an element. With the value &lt;em&gt;grid&lt;/em&gt;, every direct child will be in a grid context.
&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;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;grid&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-template&lt;/strong&gt; - a shorthand property for defining grid columns, rows, and areas at once.
&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;grid-template&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;none&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;grid-template-rows&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nt"&gt;grid-template-columns&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;grid-template-areas&lt;/span&gt; &lt;span class="nt"&gt;grid-template-rows&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nt"&gt;grid-template-columns&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But let's take a look at each property individually to see how to define them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-template-rows&lt;/strong&gt; - specifies the line names (optional) and track size of the grid rows (horizontal tracks).
&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;grid-template-rows&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;none&lt;/span&gt;&lt;span class="o"&gt;|[&lt;/span&gt;&lt;span class="nt"&gt;line-name&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;track-size&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;line-name-2&lt;/span&gt;&lt;span class="o"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiscul9zxx6dufihyqe4d.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiscul9zxx6dufihyqe4d.jpeg" alt="Defining grid row tracks size and line names" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-template-columns&lt;/strong&gt; - specifies the line names (optional) and track size of the grid columns (vertical tracks).
&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;grid-template-columns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;none&lt;/span&gt;&lt;span class="o"&gt;|[&lt;/span&gt;&lt;span class="nt"&gt;line-name&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;track-size&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;line-name-2&lt;/span&gt;&lt;span class="o"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;A &lt;strong&gt;grid track&lt;/strong&gt; is the space between any two lines on the grid. As we can see in the image below, between linename and linename2 we have defined a column track of 1fr in size.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvn36vwk141v19snje1w3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvn36vwk141v19snje1w3.jpeg" alt="Defining grid column tracks size and line names" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To give value to the size of each row/column track, we must specify the values separating them by spaces and using different units:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;By common units&lt;/strong&gt;: length (px, rem, ...), percentage (%) and fr.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The &lt;strong&gt;fr&lt;/strong&gt; unit represents a fraction of the available space in the grid container.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;By grid items content&lt;/strong&gt;: &lt;em&gt;min-content,&lt;/em&gt; minimum size of the content, &lt;em&gt;max-content&lt;/em&gt;, maximum size of the content and &lt;em&gt;auto&lt;/em&gt;, similar to minmax(min-content, max-content).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;By functions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;minmax(min-size, max-size)&lt;/em&gt; - It defines a size range, greater than or equal to &lt;em&gt;min&lt;/em&gt;, and less than or equal to &lt;em&gt;max&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;repeat(n-columns, track-size)&lt;/em&gt; - It allows defining numerous columns that exhibit a recurring pattern in a more compact form.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;fit-content(track-size)&lt;/em&gt; - It uses the space available, but not less than the &lt;em&gt;min-content&lt;/em&gt; and not more than the &lt;em&gt;max-content&lt;/em&gt; of the children.
&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="c"&gt;/* Common units */&lt;/span&gt;
&lt;span class="nt"&gt;grid-template-columns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;linename&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;linename2&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;linename3&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;linename4&lt;/span&gt;&lt;span class="o"&gt;];&lt;/span&gt;
&lt;span class="nt"&gt;grid-template-rows&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;linename&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;linename2&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;linename3&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;auto&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;linename4&lt;/span&gt;&lt;span class="o"&gt;];&lt;/span&gt;

&lt;span class="c"&gt;/* Grid items content */&lt;/span&gt;
&lt;span class="nt"&gt;grid-template-columns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt; &lt;span class="nt"&gt;max-content&lt;/span&gt; &lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;grid-template-rows&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt; &lt;span class="nt"&gt;min-content&lt;/span&gt; &lt;span class="nt"&gt;max-content&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="c"&gt;/* Functions (&amp;amp; combined) */&lt;/span&gt;
&lt;span class="nt"&gt;grid-template-columns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;repeat&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;minmax&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;span class="nt"&gt;grid-template-rows&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;minmax&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;60&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;fit-content&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;75&lt;/span&gt;&lt;span class="o"&gt;%);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;grid-template-areas&lt;/strong&gt; - specifies named grid areas by setting the grid cells and assigning names to them.&lt;/p&gt;

&lt;p&gt;No grid item is associated to these areas, but any child element can reference any area with the grid placement properties (grid-row/grid-column, grid-area), which we will see below.&lt;br&gt;
&lt;/p&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;grid-template-areas&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;none&lt;/span&gt;&lt;span class="o"&gt;|.|&lt;/span&gt;&lt;span class="nt"&gt;area-strings&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The best way to understand this property is to exemplify it, and you will see it clearly.&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-columns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;300&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt; &lt;span class="nt"&gt;repeat&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
  &lt;span class="nt"&gt;grid-template-rows&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;minmax&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;60&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="err"&gt;4&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt; &lt;span class="nt"&gt;minmax&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;60&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&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;"sidebar header  header  header"&lt;/span&gt;
                &lt;span class="s1"&gt;"sidebar content content content"&lt;/span&gt;
                    &lt;span class="s1"&gt;"sidebar footer  footer  footer"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The defined &lt;strong&gt;strings&lt;/strong&gt; in grid-template-areas are the &lt;strong&gt;row tracks,&lt;/strong&gt; and the times that a name is repeated is the &lt;strong&gt;columns&lt;/strong&gt; that occupies that area in that row. As you can see in the image below, the header occupies 3 columns and 1 row:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzrn008y4rehjbldolqzp.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzrn008y4rehjbldolqzp.jpeg" alt="Defined grid areas in a grid container" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-auto-columns&lt;/strong&gt; - specifies the &lt;strong&gt;size&lt;/strong&gt; of an &lt;strong&gt;implicitly&lt;/strong&gt; created (auto-created) grid &lt;strong&gt;column track&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;By definition, if we haven't explicitly defined in grid-template-columns the size of a column track where a grid item has been positioned, implicit grid tracks are created to contain it.&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="nt"&gt;grid-auto-columns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;implicit-tracks-size&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The size unit can be any of the ones we have used for grid-template-columns and grid-template-rows.&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-columns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;300&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  &lt;span class="nt"&gt;grid-auto-columns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr2e5x2vh8rb6wrebyao9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr2e5x2vh8rb6wrebyao9.jpeg" alt="Defined grid auto columns size" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-auto-rows&lt;/strong&gt; - specifies the &lt;strong&gt;size&lt;/strong&gt; of an &lt;strong&gt;implicitly-created&lt;/strong&gt; grid &lt;strong&gt;row track&lt;/strong&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;grid-auto-rows&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;implicit-tracks-size&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As &lt;em&gt;grid-auto-columns&lt;/em&gt;, we will use any size unit for the implicit row tracks:&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;6&lt;/span&gt;&lt;span class="nt"&gt;rem&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-auto-flow&lt;/strong&gt; - controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid (&lt;em&gt;we can think of it as the flex-direction of grid&lt;/em&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;grid-auto-flow&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;row&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;column&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;dense&lt;/span&gt;&lt;span class="o"&gt;|[&lt;/span&gt;&lt;span class="nt"&gt;row&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;column&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;dense&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While &lt;strong&gt;row&lt;/strong&gt; and &lt;strong&gt;column&lt;/strong&gt;, we can guess where the children of the grid will be placed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;row&lt;/em&gt;&lt;/strong&gt; placing the items in the &lt;strong&gt;available horizontal track&lt;/strong&gt;, if the current row becomes full then a new row will be started.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foinnk1stuyoq2ji255kk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foinnk1stuyoq2ji255kk.jpeg" alt="Result of setting row as a grid-auto-flow value" width="416" height="132"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;column&lt;/em&gt;&lt;/strong&gt; in the &lt;strong&gt;available vertical track&lt;/strong&gt;, once the items have filled all the rows in that particular column, then a new one will be created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F80i7xtx3xey8eshha4pt.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F80i7xtx3xey8eshha4pt.jpeg" alt="Result of setting column as a grid-auto-flow value" width="276" height="200"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead, &lt;strong&gt;dense&lt;/strong&gt; tries to &lt;strong&gt;fill in the gaps&lt;/strong&gt; earlier in the grid. In the image below, you can see how the third element (blue) is placed in the space left between the first and second element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkfd0swfs9irpt306hupv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkfd0swfs9irpt306hupv.jpeg" alt="Result of setting dense as a grid-auto-flow value" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;WARNING - &lt;strong&gt;grid-auto-flow: dense;&lt;/strong&gt; can cause items to appear visually out of order, causing accessibility problems.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;gap&lt;/strong&gt; - sets the gaps (gutters) between rows and columns. It is a shorthand for row-gap and column-gap.
&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;gap&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;row-col-gap&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;row-gap&lt;/span&gt; &lt;span class="nt"&gt;column-gap&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;(row-col-gap) As in &lt;em&gt;padding,&lt;/em&gt; if we specify a single value it will be set for both row and column.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;row-gap&lt;/strong&gt; - sets the size of the gap in y-axis, between row tracks.
&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;row-gap&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;20&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;column-gap&lt;/strong&gt; - sets the size of the gap in x-axis, between column tracks.
&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;column-gap&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;5&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;Child&lt;/strong&gt; (grid &lt;em&gt;item&lt;/em&gt;) properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-row&lt;/strong&gt; - specifies where a child is placed within the grid row tracks and how much it occupies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It can be a &lt;strong&gt;line&lt;/strong&gt; (placed in 1 row), a &lt;strong&gt;span&lt;/strong&gt; (placed in more than 1 row), or &lt;strong&gt;auto&lt;/strong&gt; (original placement), thereby specifying the inline-start and inline-end edge of the grid area it occupies.&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-row&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;grid-line&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;grid-row-start&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nt"&gt;grid-row-end&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's see what possibilities we have to define the start or end of the child item with the *-start and *-end properties.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-row-start&lt;/strong&gt; - specifies a grid item’s start position within the grid row.
&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;grid-row-start&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;]|&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;]|&lt;/span&gt;&lt;span class="nt"&gt;auto&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;line&lt;/strong&gt;: &lt;em&gt;number&lt;/em&gt; to refer to a numbered grid line, or &lt;em&gt;name&lt;/em&gt; to refer to a named grid line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;span [number|name]&lt;/strong&gt;: the child item will occupy the number of grid rows provided, or until it reaches the line with the specified name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;auto&lt;/strong&gt;: automatic placement on the original position, with a span of 1.&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-row-start&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* The item occupies 2 rows */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-row-end&lt;/strong&gt;: specifies a grid item’s end position within the grid row. The values that can be specified are the same as for grid-row-start.
&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;grid-row-end&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;]|&lt;/span&gt;&lt;span class="nt"&gt;auto&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Combining both would look like:&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-row&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="err"&gt;2&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="err"&gt;5&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Fit 2 rows and end in the numbered line 5 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8cmze74pm3h8rpexo5fd.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8cmze74pm3h8rpexo5fd.jpeg" alt="Result of setting grid-row as span 2 / 5" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-column&lt;/strong&gt; - specifies where a child is placed within the grid column tracks and how much it occupies. Same as &lt;em&gt;grid-row&lt;/em&gt; but this time with the vertical tracks.
&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;grid-column&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;grid-line&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;grid-column-start&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nt"&gt;grid-column-end&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A shorthand for the CSS properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-column-start&lt;/strong&gt; - specifies a grid item’s start position within the grid column by specifying a line, a span, or auto.
&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;grid-column-start&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;]|&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;]|&lt;/span&gt;&lt;span class="nt"&gt;auto&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-column-end&lt;/strong&gt; - specifies a grid item’s end position within the grid column, also by specifying a line, a span, or auto.
&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;grid-column-end&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;]|&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;]|&lt;/span&gt;&lt;span class="nt"&gt;auto&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;grid-area&lt;/strong&gt; - specifies where a child is placed within the grid and its size.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Its value can be expressed as a shorthand of grid-row-start / grid-row-end / grid-column-start / grid-column-end or with the name of the area created in grid-template-areas.&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-area&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;named-area&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;grid-row-start&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nt"&gt;grid-row-end&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nt"&gt;grid-column-start&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nt"&gt;grid-column-end&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's see a simple example for each case:&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="c"&gt;/* Given grid-template-areas: "content content sidebar"; */&lt;/span&gt;
  &lt;span class="nt"&gt;grid-area&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;content&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

  &lt;span class="c"&gt;/* Specifying line numbers:
  grid-row-start: 1
  grid-column-start: 1
  grid-row-end: auto
  grid-column-end: 3
  */&lt;/span&gt;
  &lt;span class="nt"&gt;grid-area&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nt"&gt;auto&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="err"&gt;3&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* OR grid-area: 1 / span 2; */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And these would be the properties that will help us to define the structure of our grid and position its elements individually. Now let's see how to align the elements in the same way, globally or from themselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alignment properties
&lt;/h2&gt;

&lt;p&gt;Whenever we want to align our layout elements, which are located in cells, we will have to use different properties from the parent but sometimes also from the children, depending on their behavior.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A &lt;strong&gt;grid cell&lt;/strong&gt; is the smallest unit on a grid. Once a grid is defined as a parent, the child items will lay themselves out in one cell each of the defined grid.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xef9bnhf415xmt1trf5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xef9bnhf415xmt1trf5.jpeg" alt="What is a grid cell visually explained" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's see the possibilities we have to align our content by the container or child item.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parent&lt;/strong&gt; (grid &lt;em&gt;container&lt;/em&gt;) properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;place-items&lt;/strong&gt; - allows you to align child items along the block (y-axis/column) and inline (x-axis/row) directions at once. A shorthand for align-items and justify-items.
&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;place-items&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;align-items&lt;/span&gt; &lt;span class="nt"&gt;justify-items&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To see the values that can be defined, let's take a look at each one of the properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;align-items&lt;/strong&gt; - specifies the alignment of grid items on the block direction (y-axis). It sets the &lt;em&gt;align-self&lt;/em&gt; value on all child items as a group (we will see this property in the child properties section).
&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;align-items&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;normal&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;center&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;start&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;end&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;stretch&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;center&lt;/strong&gt; causes the elements to be aligned to the center of themselves (grid item cell).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;start&lt;/strong&gt; &amp;amp; &lt;strong&gt;end&lt;/strong&gt; causes the elements to be aligned at the beginning of themselves (cell top) or end (cell bottom).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stretch&lt;/strong&gt; causes the grid items to have the same height as their cell, filling the whole space vertically. The value by default (&lt;em&gt;normal&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3tdv1d15yhq2opcos3pw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3tdv1d15yhq2opcos3pw.jpeg" alt="Align items values visual examples" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;justify-items&lt;/strong&gt; - specifies the alignment of grid items on the inline direction (x-axis). It sets the &lt;em&gt;justify-self&lt;/em&gt; value on all child items as a group.
&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;justify-items&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;normal&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;center&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;start&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;end&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;stretch&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;center&lt;/strong&gt; causes the elements to be aligned to the center of themselves horizontally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;start&lt;/strong&gt; &amp;amp; &lt;strong&gt;end&lt;/strong&gt; causes the elements to be aligned at the beginning or the end of themselves in the x-axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stretch&lt;/strong&gt; causes the grid items to have the same height as their cell, filling the whole space horizontally. The value by default (&lt;em&gt;normal&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91w1mm5wlb272xuzlofu.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91w1mm5wlb272xuzlofu.jpeg" alt="Justify items values visual examples" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;place-content&lt;/strong&gt; - allows you to align the content along the block (y-axis/column) and inline (x-axis/row) directions at once. A shorthand for align-content and justify-content.
&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;place-content&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;align-content&lt;/span&gt; &lt;span class="nt"&gt;justify-content&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's take a closer look at the possible values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;align-content&lt;/strong&gt; - specifies the distribution of space between and around content items in the block direction (y-axis).
&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;align-content&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;normal&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;center&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;start&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;end&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;space-around&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;space-between&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;space-evenly&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;stretch&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;center&lt;/strong&gt; causes the elements to be aligned at the center of the grid with respect to the y-axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;start&lt;/strong&gt; &amp;amp; &lt;strong&gt;end&lt;/strong&gt; causes the elements to be aligned at the beginning (top) or end (bottom) of the grid with respect to the y-axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;space-between&lt;/strong&gt; causes the grid items to be distributed evenly, being the first item at the start of the grid, and the last at the end.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;space-around&lt;/strong&gt; causes the grid items to be distributed evenly, having half-size space on top/bottom.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;space-evenly&lt;/strong&gt; causes the grid items to be distributed evenly, having equal space around them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stretch&lt;/strong&gt; causes the grid auto-sized items to have their size increased equally so that the combined size exactly fills the alignment container.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxijfqjd4neusddrqc5m.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxijfqjd4neusddrqc5m.jpeg" alt="Align content values visual examples" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;justify-content&lt;/strong&gt; - specifies the distribution of space between and around content items in the inline direction (x-axis).
&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;justify-content&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;normal&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;center&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;start&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;end&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;space-around&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;space-between&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;space-evenly&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;stretch&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;center&lt;/strong&gt; causes the elements to be aligned at the center of the grid with respect to the x-axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;start&lt;/strong&gt; &amp;amp; &lt;strong&gt;end&lt;/strong&gt; causes the elements to be aligned at the beginning (left) or end (right) of the grid with respect to the x-axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;space-between&lt;/strong&gt; causes the grid items to be distributed evenly, being the first item at the left of the grid, and the last at the right.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;space-around&lt;/strong&gt; causes the grid items to be distributed evenly, having half-size space on left/right.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;space-evenly&lt;/strong&gt; causes the grid items to be distributed evenly, having equal space around them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stretch&lt;/strong&gt; causes the grid auto-sized items to have their size increased equally so that the combined size exactly fills the alignment container.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwt0amzr83mpqekak2sx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwt0amzr83mpqekak2sx.jpeg" alt="Justify content values visual examples" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Child&lt;/strong&gt; (grid &lt;em&gt;item&lt;/em&gt;) properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;place-self&lt;/strong&gt; - allows you to align an individual child item along the block (y-axis/column) and inline (x-axis/row) directions at once. A shorthand for align-self and justify-self.
&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;place-self&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;align-self&lt;/span&gt; &lt;span class="nt"&gt;justify-self&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;align-self&lt;/strong&gt; - overrides the align-items value and aligns the item inside the grid area or cell along the block direction (y-axis).
&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;align-self&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;center&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;start&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;end&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;stretch&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;center&lt;/strong&gt; aligns the content to the center of the grid cell in the y-axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;start &amp;amp; end&lt;/strong&gt; aligns the content to the start/end of the grid cell in the y-axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stretch&lt;/strong&gt; fills the grid cell in the y-axis (normal value).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fykwnkqt3mh5xug2f9dxo.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fykwnkqt3mh5xug2f9dxo.jpeg" alt="Align self values visual examples" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;justify-self&lt;/strong&gt; - overrides the justify-items value and aligns the item inside the grid area or cell along the inline direction (x-axis).
&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;justify-self&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;center&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;start&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;end&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nt"&gt;stretch&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;center&lt;/strong&gt; aligns the content to the center of the grid cell in the x-axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;start &amp;amp; end&lt;/strong&gt; aligns the content to the start/end of the grid cell in the x-axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stretch&lt;/strong&gt; fills the grid cell in the x-axis (normal value).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj80vfu8azqtmvhvjl1ot.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj80vfu8azqtmvhvjl1ot.jpeg" alt="Justify self values visual examples" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BONUS&lt;/strong&gt; - &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Masonry_Layout"&gt;Masonry Layout&lt;/a&gt; is an experimental feature, a layout method where 1 axis uses common values (usually columns), and the other the masonry value. In the axis of the masonry (usually the row), instead of leaving gaps after the small elements, the elements of the next row move up to fill the gaps. (AWESOME, isn't it?)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Real use cases
&lt;/h2&gt;

&lt;p&gt;Now, I am going to show you how I usually solve, with CSS Grid layout, different situations that I found in website I've developed:&lt;/p&gt;

&lt;h3&gt;
  
  
  Situation 1 - Grid sidebar layout
&lt;/h3&gt;

&lt;p&gt;Imagine you are developing a layout that includes a sidebar on the left, which follows you as you scroll, and the rest of the website, header, content and footer, on the right.&lt;/p&gt;

&lt;p&gt;Here I show you an example of what I mean and how it could be distributed:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuan6kzvpa17xikvuyhbk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuan6kzvpa17xikvuyhbk.jpeg" alt="Situation 1 - Schema on how the grid should look" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To do this, we will first define the grid container and the cells or areas we will need to place our elements, and then the position of the child items in the grid:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"grid grid-cols-[300px,minmax(0,1fr)] grid-rows-[60px,1fr] min-h-screen"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;aside&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"sidebar"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"sticky top-0 h-screen"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Sidebar&lt;span class="nt"&gt;&amp;lt;/aside&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;header&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"row-span-1 col-start-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Header&lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"main"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"col-start-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Content&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;footer&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"col-start-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Footer&lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CSS Parent&lt;/strong&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="nc"&gt;.grid&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="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.grid-cols-&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="err"&gt;300&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;minmax&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;)]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;/* 2 column tracks, 1st 300px, 2nd max the space available */&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="m"&gt;300px&lt;/span&gt; &lt;span class="n"&gt;minmax&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;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.grid-rows-&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="err"&gt;60&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;/* 2 row tracks, 1st 60px, 2nd the space available */&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="m"&gt;60px&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="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.min-h-screen&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;min-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="c"&gt;/* Fill the full screen */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why is it important to define minmax(0, 1fr) instead of 1fr?&lt;/strong&gt; Because by defining minmax and adding the possibility to have a smaller size than 1fr, the content does not overflow. This way, elements like a slider can be added to that responsive column without any problem.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CSS Children&lt;/strong&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="c"&gt;/**
  * Aside - Sidebar
  */&lt;/span&gt;
  &lt;span class="nc"&gt;.sticky&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="n"&gt;sticky&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Follow you when scrolling */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.top-0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.h-screen&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="c"&gt;/* Fill the screen vertically */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c"&gt;/**
  * Header
  */&lt;/span&gt;
  &lt;span class="nc"&gt;.row-span-1&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="n"&gt;span&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="n"&gt;span&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Position: first row track */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.col-start-2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;grid-column-start&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="c"&gt;/* Position: second column track */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c"&gt;/**
  * Content &amp;amp; Footer
  */&lt;/span&gt;
  &lt;span class="nc"&gt;.col-start-2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;grid-column-start&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="c"&gt;/* Position: second column track (original position for the row) */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: The examples will be styled with TailwindCSS using JIT mode, but I'm still going to add the generated CSS for those who don't use it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Situation 2 - Grid post thumbnail layout
&lt;/h3&gt;

&lt;p&gt;In this situation, our goal is to represent the thumbnail of our article, showing the image, the title, the description, the date and a like button to save it in our list of interests.&lt;/p&gt;

&lt;p&gt;Let's imagine that the image below is the outline of how we want to represent it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdv0lmtezpqq3qlispyu.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdv0lmtezpqq3qlispyu.jpeg" alt="Situation 2 - Example grid post thumbnail layout" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first thing will be to define our elements in semantic HTML and start defining the grid in the parent, in this case the children will not need to specify their position because they will occupy the space that corresponds to them by location in the HTML.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"grid grid-cols-[120px,minmax(0,1fr),64px] grid-rows-1 gap-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="c"&gt;&amp;lt;!-- Figure: By default will be added in the first column of 120px --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;figure&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"image_url"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"image_alt"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"120"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"120"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/figure&amp;gt;&lt;/span&gt;

  &lt;span class="c"&gt;&amp;lt;!-- Header (Title, excerpt and date): By default will be added in the second (available space) column --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;header&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Heading&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pb-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Description or excerpt&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Date&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;

  &lt;span class="c"&gt;&amp;lt;!-- Like button: By default will be added in the last column of 64px --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"w-8 h-8 p-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"32"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"32"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Like Icon&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As before, let's differentiate between the style applied to the parent and the one applied to the children:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CSS Parent&lt;/strong&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="nc"&gt;.grid&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="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.grid-cols-&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="err"&gt;120&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;minmax&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="nt"&gt;fr&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;&lt;span class="err"&gt;64&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;/* 3 column tracks, 1st fixed of 120px, 2nd responsive from 0 to 1fr, and 3rd fixed of 64px */&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="m"&gt;120px&lt;/span&gt; &lt;span class="n"&gt;minmax&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;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="m"&gt;64px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.grid-rows-1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c"&gt;/* 1 row track responsive from 0 to 1fr */&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;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;minmax&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;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.gap-4&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* gap between row and column tracks of 1rem (16px) */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CSS Children&lt;/strong&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="c"&gt;/**
  * Header: Internal padding
  */&lt;/span&gt;
  &lt;span class="nc"&gt;.py-4&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c"&gt;/**
  * Button: Size and internal padding
  */&lt;/span&gt;
  &lt;span class="nc"&gt;.w-8&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;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* (32px) */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.h-8&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;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* (32px) */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.p-4&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&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;
  
  
  Situation 3 - Grid responsive layout
&lt;/h3&gt;

&lt;p&gt;Another quite common situation that I usually find is the grid responsive by nature, that as the screen grows more elements are added to the previous rows, automatically defining the columns.&lt;/p&gt;

&lt;p&gt;In this way, when the element of x pixels fits in the previous row it moves up and the next one moves to the position of this one.&lt;/p&gt;

&lt;p&gt;If the width of the grid in the image below were larger, item 5 would be part of the first row.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6or5tdvfhniskqxfrd1r.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6or5tdvfhniskqxfrd1r.jpeg" alt="Situation 3 - Responsive layout made with grid" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this situation it is even easier to define the grid container, with just &lt;em&gt;grid-template-columns&lt;/em&gt; we will be able to get that result, but in order to have space between the items we will add the gap property as well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTML&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"grid grid-cols-[repeat(auto-fit, 150px)] gap-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;Item 1&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;Item 2&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;Item 3&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;Item 4&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;Item 5&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CSS&lt;/strong&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="nc"&gt;.grid&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="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.grid-cols-&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;repeat&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;auto-fit&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;150&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;)]&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="n"&gt;auto-fit&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="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.gap-8&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;gap&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="c"&gt;/* (32px) */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically, in this article I intended to have listed what I will need to review in the future when defining a new grid. And a couple of use cases to keep it fresh.&lt;/p&gt;

&lt;p&gt;I hope you find it as useful as I did and have a wonderful week full of grids and layout!&lt;/p&gt;

</description>
      <category>css</category>
      <category>grid</category>
      <category>basics</category>
      <category>usecases</category>
    </item>
    <item>
      <title>My web performance journey with Nuxt, Storyblok &amp; Netlify</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Sat, 17 Apr 2021 19:51:23 +0000</pubDate>
      <link>https://dev.to/dawntraoz/my-web-performance-journey-with-nuxt-storyblok-netlify-2bl4</link>
      <guid>https://dev.to/dawntraoz/my-web-performance-journey-with-nuxt-storyblok-netlify-2bl4</guid>
      <description>&lt;p&gt;In this post I will show you the main web performance concerns I had while building my website and how a Jamstack architecture will help us solve them.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1383503718914555909-200" src="https://platform.twitter.com/embed/Tweet.html?id=1383503718914555909"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1383503718914555909-200');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1383503718914555909&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;To build my website I have used technologies such as: &lt;a href="https://nuxtjs.org/"&gt;Nuxt&lt;/a&gt;, my static site generator, &lt;a href="https://www.storyblok.com/"&gt;Storyblok&lt;/a&gt;, as my headlessCMS with an image service provider, and &lt;a href="https://www.netlify.com/"&gt;Netlify&lt;/a&gt; to host my full static site.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I'm using Lighthouse as the tool that will show us all the opportunities we have to improve or fix the performance of our project.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Resources treatment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Preload key requests
&lt;/h3&gt;

&lt;p&gt;We will always consider using &lt;strong&gt;link rel=preload&lt;/strong&gt; to prioritize fetching resources that are currently requested later in page load.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/uses-rel-preload/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;uses rel preload&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Preload critical assets to improve loading speed.&lt;/p&gt;

&lt;p&gt;Declare preload links in your HTML to instruct the browser to download key resources as soon as possible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preload"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"critical.css"&lt;/span&gt; &lt;span class="na"&gt;as=&lt;/span&gt;&lt;span class="s"&gt;"style"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preload"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"critical.js"&lt;/span&gt; &lt;span class="na"&gt;as=&lt;/span&gt;&lt;span class="s"&gt;"script"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → As I use &lt;strong&gt;Nuxt&lt;/strong&gt; as my static site generator, it is already leveraging my performance with this technique, check &lt;a href="https://nuxtjs.org/blog/going-full-static/#crazy-fast-static-applications"&gt;crazy fast static applications&lt;/a&gt; to learn more about how it's doing it for us.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Preconnect to required origins
&lt;/h3&gt;

&lt;p&gt;Consider adding &lt;strong&gt;preconnect&lt;/strong&gt; or &lt;strong&gt;dns-prefetch&lt;/strong&gt; resource hints to establish early connections to important third-party origins.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/uses-rel-preconnect/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;uses rel preconnect&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Informing the browser of your intention is as simple as adding a link &lt;strong&gt;preconnect&lt;/strong&gt; tag to your page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preconnect"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This lets the browser know that the page intends to connect to &lt;em&gt;example com&lt;/em&gt; and retrieve content from there.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In general, it's better to use &lt;em&gt;link rel="preload"&lt;/em&gt;, as it's a more comprehensive performance tweak, but we can keep &lt;em&gt;link rel="preconnect"&lt;/em&gt; for the edge cases like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/web/fundamentals/performance/resource-prioritization#use-case_knowing_where_from_but_not_what_youre_fetching"&gt;Use-case: Knowing Where From, but not What You're Fetching&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/web/fundamentals/performance/resource-prioritization#use-case_knowing_where_from_but_not_what_youre_fetching"&gt;Use-case: Streaming Media&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Link &lt;strong&gt;dns-prefetch&lt;/strong&gt; is another type related to connections. This handles the DNS lookup only, but it's got wider browser support, so it may serve as a nice fallback. You use it the exact same way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"dns-prefetch"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → A good example of this could be a link to google fonts, in my case, as I have the font files inside my project itself I didn't need to have this into account.&lt;/p&gt;

&lt;p&gt;But Nuxt already took this into account for you and they created a module to improve your font load performance: &lt;a href="https://www.npmjs.com/package/@nuxtjs/google-fonts"&gt;@nuxtjs/google-fonts&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Lazy load third-party resources with facades
&lt;/h3&gt;

&lt;p&gt;Some third-party embeds can be lazy loaded. Consider replacing them with a facade until they are required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/third-party-facades/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;third party facades&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Instead of adding a third-party embed directly to your HTML, &lt;strong&gt;load the page with a static element&lt;/strong&gt; that looks &lt;strong&gt;similar to&lt;/strong&gt; the &lt;strong&gt;embedded third-party&lt;/strong&gt;. The interaction pattern should look:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On load:&lt;/strong&gt; Add facade to the page (as the cover of a video).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On mouseover:&lt;/strong&gt; The facade preconnects to third-party resources.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On click:&lt;/strong&gt; The facade replaces itself with the third-party product.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → For &lt;strong&gt;Youtube videos&lt;/strong&gt; I started using &lt;a href="https://github.com/paulirish/lite-youtube-embed"&gt;lite-youtube-embed&lt;/a&gt; package, following the advice of &lt;a href="https://debbie.codes/"&gt;Debbie O'brien&lt;/a&gt; and &lt;a href="https://web.dev/"&gt;web.dev&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;The difference in the loading time of your page is brutal, not to mention that initially you don't have a lot of iframes lengthening the interaction time.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Reduce the impact of third-party code / Minimize third-party usage
&lt;/h3&gt;

&lt;p&gt;Third-party code can significantly impact load performance. Limit the number of redundant third-party providers and try to load third-party code after your page has primarily finished loading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/loading-third-party-javascript/?utm_source=lighthouse&amp;amp;utm_medium=lr#how_do_you_load_third-party_script_efficiently"&gt;loading third party javascript&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → If a third-party script is slowing down your page load, you have several options to improve performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load the script using the &lt;strong&gt;async&lt;/strong&gt; or &lt;strong&gt;defer&lt;/strong&gt; attribute to avoid blocking document parsing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-hosting the script&lt;/strong&gt; if the third-party server is slow.&lt;/li&gt;
&lt;li&gt;Consider removing the script if it doesn't add clear value to your site.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developers.google.com/web/fundamentals/performance/resource-prioritization#preconnect"&gt;Resource Hints&lt;/a&gt; like &lt;strong&gt;link rel=preconnect&lt;/strong&gt; or &lt;strong&gt;link rel=dns-prefetch&lt;/strong&gt; to perform a DNS lookup for domains hosting third-party scripts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → I'm using Google Analytics, a third party, but a package called &lt;a href="https://www.npmjs.com/package/vue-gtag"&gt;vue-gtag&lt;/a&gt; helps me to load only with user consent and, once active, it preconnects to googletagmanager and loads analytics asynchronously:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://www.googletagmanager.com"&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preconnect"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text/javascript"&lt;/span&gt; &lt;span class="na"&gt;async&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://www.google-analytics.com/analytics.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As I'm using the Storyblok image service provider, I preconnected to it, so it can improve the images load time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;link&lt;/span&gt; &lt;span class="nx"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;preconnect&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;//img2.storyblok.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c1"&gt;// Nuxt config&lt;/span&gt;
&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;link&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;span class="na"&gt;rel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;preconnect&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;//img2.storyblok.com&lt;/span&gt;&lt;span class="dl"&gt;'&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;h3&gt;
  
  
  5. Eliminate render-blocking resources
&lt;/h3&gt;

&lt;p&gt;Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles.&lt;/p&gt;

&lt;p&gt;You can reduce the size of your pages by only shipping the code and styles that you need. Click on a URL to inspect that file in the Sources panel. Styles in CSS files and code in JavaScript files are marked in two colors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Green (critical):&lt;/strong&gt; Styles that are required for first paint; code that's critical to the page's core functionality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Red (non-critical):&lt;/strong&gt; Styles that apply to content not immediately visible; code not being used in page's core functionality.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/render-blocking-resources/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;render blocking resources&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Let's see in depth how to eliminate scripts or stylesheets render-blocking our page load.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How to eliminate render-blocking scripts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you've identified critical code, move that code from the render-blocking URL to an inline script tag in your HTML page.&lt;/p&gt;

&lt;p&gt;If there's code in a render-blocking URL that's not critical, you can keep it in the URL, and then mark the URL with async or defer attributes.&lt;/p&gt;

&lt;p&gt;Code that isn't being used at all should be removed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How to eliminate render-blocking stylesheets&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Inline critical styles required for the first paint inside a &lt;em&gt;style block&lt;/em&gt; at the head of the HTML page. Then load the rest of the styles asynchronously using the preload link.&lt;/p&gt;

&lt;p&gt;Consider automating the process of extracting and inlining "Above the Fold" CSS using the &lt;a href="https://github.com/addyosmani/critical/blob/master/README.md"&gt;Critical tool&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → In Netlify we have a plugin for critical css called &lt;a href="https://www.npmjs.com/package/netlify-plugin-inline-critical-css"&gt;netlify-plugin-inline-critical-css&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Another cool technique is to split the style into different files, organized by media query. Then add a &lt;strong&gt;media attribute to each stylesheet link&lt;/strong&gt;. When loading a page, the browser only blocks the first paint to retrieve the stylesheets that match the user's device.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Keep CSS /JS files smaller
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Minify CSS /JavaScript
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Minification is the process of removing whitespace and any code that is not necessary to create a smaller but perfectly valid code file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Minifying CSS files&lt;/strong&gt; → reduce network payload sizes (&lt;a href="https://web.dev/unminified-css/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;read more about minifying CSS&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution CSS&lt;/strong&gt; → Minify with tools like webpack &lt;a href="https://web.dev/minify-css/#css-minification-with-webpack"&gt;https://web.dev/minify-css/#css-minification-with-webpack&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minifying JavaScript files&lt;/strong&gt; → reduce payload sizes and script parse time (&lt;a href="https://web.dev/unminified-javascript/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;read more about minifying JS&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution JS&lt;/strong&gt; → The new uglify-js: &lt;a href="https://github.com/terser/terser"&gt;https://github.com/terser/terser&lt;/a&gt; or continue using &lt;strong&gt;&lt;a href="https://webpack.js.org/guides/production/"&gt;webpack&lt;/a&gt;&lt;/strong&gt;, &lt;strong&gt;Teser&lt;/strong&gt; is already included in the prod.js file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → Nuxt is already using &lt;a href="https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-build#terser"&gt;Terser webpack plugin&lt;/a&gt; in its build configuration, taking care of the minification by itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Remove unused CSS /JavaScript
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Remove dead rules&lt;/strong&gt; from stylesheets and &lt;strong&gt;defer&lt;/strong&gt; the loading of &lt;strong&gt;CSS&lt;/strong&gt; not used for above-the-fold content to reduce unnecessary bytes consumed by network activity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/unused-css-rules/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;unused css rules&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Take into account Critical/Non-Critical CSS technique as per &lt;strong&gt;render-blocking stylesheets&lt;/strong&gt; section, but combined with a tool that deletes the CSS not used in your page, as the famous &lt;a href="https://purgecss.com/"&gt;PurgeCSS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remove unused JavaScript&lt;/strong&gt; to reduce bytes consumed by network activity. (&lt;a href="https://web.dev/unused-javascript/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;unused JS&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://bundlers.tooling.report/"&gt;detailed info and tool comparatives&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Let's see which techniques we can use if our frameworks doesn't do it for us:&lt;/p&gt;

&lt;h4&gt;
  
  
  Record code coverage to start analyzing the unused code in specific files:
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Coverage&lt;/strong&gt; tab in DEV Tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Start Instrumenting Coverage And Reload Page&lt;/strong&gt;  if you want to see what code is needed to load the page.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Instrument Coverage&lt;/strong&gt;  if you want to see what code is used after interacting with the page.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Build tool for support for removing unused code
&lt;/h4&gt;

&lt;p&gt;Webpack make easier avoid or remove unused code with the following techniques:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://bundlers.tooling.report/code-splitting/"&gt;Code Splitting&lt;/a&gt; - Extract common dependencies into &lt;strong&gt;shared bundles&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The process of &lt;strong&gt;breaking up bundled code into multiple smaller&lt;/strong&gt; bundles that can be loaded and executed independently as needed.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Nuxt takes care with webpack of code-splitting the application!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://bundlers.tooling.report/transformations/dead-code/"&gt;Unused Code Elimination&lt;/a&gt; - &lt;em&gt;Dead Code Elimination&lt;/em&gt; is the &lt;strong&gt;process of removing code&lt;/strong&gt; that is not used by the current application.&lt;/p&gt;

&lt;p&gt;There are a number of tools available with the most popular being &lt;strong&gt;Terser&lt;/strong&gt; and &lt;strong&gt;Closure&lt;/strong&gt; &lt;strong&gt;Compiler&lt;/strong&gt;. Webpack's &lt;strong&gt;Dead Code Elimination&lt;/strong&gt; is implemented by removing unused module exports, then relying on &lt;em&gt;Terser&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://bundlers.tooling.report/transformations/dead-code-dynamic/"&gt;Unused Imported Code&lt;/a&gt; - tricky optimization cases where a &lt;strong&gt;module's exports are used in a way that is difficult&lt;/strong&gt; to statically analyze.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamic imports&lt;/strong&gt; are one of these cases. &lt;strong&gt;Webpack&lt;/strong&gt; doesn't understand the special destructuring syntax to elimitate dead code:&lt;br&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;transformImage&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./image.utils.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But &lt;strong&gt;it allows to manually list the exports&lt;/strong&gt; that are used &lt;strong&gt;via&lt;/strong&gt; &lt;strong&gt;magic comment&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;transformImage&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="cm"&gt;/* webpackExports: "transformImage" */&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./image.utils.js&lt;/span&gt;&lt;span class="dl"&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;strong&gt;What I use&lt;/strong&gt; → Nuxt already does this for me, it's using webpack under the hood. It's splitting my code by pages, so I can forget about this magic webpackChunkName comment that you need to add on every route with dynamic import.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Enable text compression
&lt;/h3&gt;

&lt;p&gt;Text-based resources should be served with compression (gzip, deflate or brotli) to minimize total network bytes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/uses-text-compression/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;uses text compression&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Enable text compression on your server.&lt;/p&gt;

&lt;p&gt;When a browser requests a resource, it will use the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding"&gt;&lt;em&gt;Accept-Encoding&lt;/em&gt;&lt;/a&gt; HTTP request header to indicate what compression algorithms it supports.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Accept-Encoding: &lt;span class="nb"&gt;gzip&lt;/span&gt;, compress, br
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the browser supports &lt;a href="https://opensource.googleblog.com/2015/09/introducing-brotli-new-compression.html"&gt;Brotli&lt;/a&gt; (&lt;em&gt;br&lt;/em&gt;) you should use Brotli because it can reduce the file size of the resources more than the other compression algorithms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → My hosting, &lt;strong&gt;Netlify&lt;/strong&gt;, is already using Brotli compression by default.&lt;/p&gt;

&lt;p&gt;Brotli compression has gained widespread browser support and is particularly effective for text-based files such as HTML, JavaScript and CSS assets.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Netlify Edge is already &lt;strong&gt;encoding and caching suitable assets with Brotli&lt;/strong&gt;, and delivering correctly compressed assets &lt;strong&gt;depending&lt;/strong&gt; on the requesting &lt;strong&gt;browser&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Median Brotli / gzip comparisons, according to &lt;a href="https://blogs.akamai.com/2016/02/understanding-brotlis-potential.html"&gt;Akamai’s testing&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript files compressed with Brotli are &lt;strong&gt;14% smaller&lt;/strong&gt; than gzip.&lt;/li&gt;
&lt;li&gt;HTML files are &lt;strong&gt;21% smaller&lt;/strong&gt; than gzip.&lt;/li&gt;
&lt;li&gt;CSS files are &lt;strong&gt;17% smaller&lt;/strong&gt; than gzip.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Remove duplicate modules in JavaScript bundles
&lt;/h3&gt;

&lt;p&gt;Remove large, duplicate JavaScript modules from bundles to reduce unnecessary bytes consumed by network activity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt; → With webpack you have &lt;a href="https://www.npmjs.com/package/webpack-bundle-analyzer"&gt;https://www.npmjs.com/package/webpack-bundle-analyzer&lt;/a&gt; to check JS bundles and start cleaning up your project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → In Nuxt I already have that package, I just need to add a flag &lt;a href="https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-build#analyze"&gt;--analyze&lt;/a&gt; to my build command and voilà!&lt;/p&gt;

&lt;h2&gt;
  
  
  Reduce execution time
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. JavaScript execution time
&lt;/h3&gt;

&lt;p&gt;Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/bootup-time/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;bootup time&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → The combination of code splitting, minification and compression, removal of unused code and caching techniques will greatly improve execution time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → As always Nuxt is one step ahead, in this video you can check the technique they use with your own eyes: &lt;a href="https://www.youtube.com/watch?v=J6airiY8e84"&gt;https://www.youtube.com/watch?v=J6airiY8e84&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Minimizes main-thread work
&lt;/h3&gt;

&lt;p&gt;Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt; (&lt;a href="https://web.dev/mainthread-work-breakdown/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;mainthread work breakdown&lt;/a&gt;) → In the end, it's the compendium of many of the things we've already seen in this article or that we will see later on.&lt;/p&gt;

&lt;p&gt;In summary, the idea is to &lt;strong&gt;optimize both our JS and CSS code&lt;/strong&gt;, minimizing it and removing unused code, as well as the &lt;strong&gt;third-party&lt;/strong&gt; libraries we are using. Always serving the &lt;strong&gt;CSS and JS critical&lt;/strong&gt; to the page being viewed first and &lt;strong&gt;deferring&lt;/strong&gt; the rest.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. User Timing marks and measures (a cool tool, not an issue)
&lt;/h3&gt;

&lt;p&gt;Consider instrumenting your app with the User Timing API to measure your app's real-world performance during key user experiences. Read more about &lt;a href="https://web.dev/user-timings/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;user timings&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Initial server response time was short
&lt;/h3&gt;

&lt;p&gt;Keep the server response time for the main document short because all other requests depend on it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt; (&lt;a href="https://web.dev/time-to-first-byte/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;time to first byte&lt;/a&gt;) → When choosing a hosting you have to take this into account, if it is a static hosting, everything will already be configured correctly and the CDN will have many advantages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → In my case Netlify gives me a response of 33ms. You can check this speed test tool, to see my results and test with your site: &lt;a href="https://testmysite.io/6079b4e77b757f3e6f79af67/dawntraoz.com"&gt;testmysite.io/dawntraoz.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The DOM troubles
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Avoid large layout shifts
&lt;/h3&gt;

&lt;p&gt;These DOM elements contribute most to the CLS of the page.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cumulative Layout Shift (CLS) is a Core Web Vitals metric calculated by summing all layout shifts that aren’t caused by user interaction.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → This &lt;a href="https://webvitals.dev/cls"&gt;https://webvitals.dev/cls&lt;/a&gt; site give you detailed information on how your website CLS is performing.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Avoids an excessive DOM size
&lt;/h3&gt;

&lt;p&gt;A large DOM will increase memory usage, cause longer style calculations, and produce costly layout reflows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt; &lt;strong&gt;(&lt;/strong&gt;&lt;a href="https://web.dev/dom-size/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;dom size&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → In general, look for ways to create DOM nodes only when needed, and destroy nodes when they're no longer needed.&lt;/p&gt;

&lt;p&gt;We can make use of &lt;a href="https://nuxtjs.org/examples/lazy-loading-components/"&gt;lazy loading components&lt;/a&gt; in Nuxt.&lt;/p&gt;

&lt;p&gt;But also keep your HTML smaller or &lt;strong&gt;load more on scroll&lt;/strong&gt; technique could help.&lt;/p&gt;

&lt;h2&gt;
  
  
  Images, our bigger headache
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Properly size images
&lt;/h3&gt;

&lt;p&gt;Serve images that are appropriately-sized to save cellular data and improve load time. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solutions (&lt;/strong&gt;&lt;a href="https://web.dev/uses-responsive-images/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;uses responsive images&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Let's take a look at the different techniques recommended by Google:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Srcset:&lt;/strong&gt; The main strategy for serving appropriately sized images is called "&lt;a href="https://web.dev/serve-responsive-images/"&gt;responsive images&lt;/a&gt;". With responsive images, you generate multiple versions of each image, and then specify which version to use in your HTML or CSS using media queries, viewport dimensions, and so on.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"flower-large.jpg"&lt;/span&gt; &lt;span class="na"&gt;srcset=&lt;/span&gt;&lt;span class="s"&gt;"flower-small.jpg 480w, flower-large.jpg 1080w"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"50vw"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://web.dev/image-cdns/"&gt;&lt;strong&gt;Image CDNs&lt;/strong&gt;&lt;/a&gt;: are another main strategy for serving appropriately sized images. You can think of image CDNs like web service APIs for transforming images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → I'm using the one available in &lt;strong&gt;Storyblok&lt;/strong&gt;: &lt;a href="https://www.storyblok.com/docs/image-service"&gt;storyblok image service&lt;/a&gt;, always requesting the proper sizes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SVG&lt;/strong&gt;: another strategy is to use vector-based image formats. With a finite amount of code, an SVG image can scale to any size. See &lt;a href="https://developers.google.com/web/fundamentals/design-and-ux/responsive/images#replace_complex_icons_with_svg"&gt;Replace complex icons with SVG&lt;/a&gt; to learn more.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Defer offscreen images
&lt;/h3&gt;

&lt;p&gt;Consider &lt;strong&gt;lazy-loading&lt;/strong&gt; offscreen and hidden images after all critical resources have finished loading to lower time to interactive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/offscreen-images/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;offscreen images&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Lazy load your images. You can use the &lt;em&gt;loading&lt;/em&gt; property set to lazy as per MDN recommendation: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading"&gt;Lazy loading&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → In my case I'm using Vue Lazyload to lazy-load my images and background images: &lt;a href="https://github.com/hilongjw/vue-lazyload#demo"&gt;https://github.com/hilongjw/vue-lazyload#demo&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Efficiently encode images
&lt;/h3&gt;

&lt;p&gt;Optimized images load faster and consume less cellular data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/uses-optimized-images/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;uses optimized images&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → This should be fixed if you are using all the different techniques we see in this article. Using your image CDN service or the compression of your image should be enough.&lt;/p&gt;

&lt;p&gt;If you don't use any image CDN, you can use this online tool: &lt;a href="https://squoosh.app/"&gt;https://squoosh.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Serve images in next-gen formats
&lt;/h3&gt;

&lt;p&gt;Image formats like JPEG 2000, JPEG XR, and WebP often provide better compression than PNG or JPEG, which means faster downloads and less data consumption.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/uses-webp-images/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;uses webp images&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → If you use an image service, as I do, they also have a format filter to get the webp/jpeg format. So you can upload any kind of image, but you will always download the optimized one!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → I use &lt;strong&gt;img2.storyblok&lt;/strong&gt; service adding a filters:format(webp). But only when the browser support this format.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem I found&lt;/strong&gt; → I needed to filter by canvas rendering on the client side to avoid displaying webp images in browsers that don't support it like Safari (webp will work in future versions):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;format&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;canUseWebP&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/filters:format(webp)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/filters:format(/*jpeg OR png*/)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;// In methods&lt;/span&gt;
&lt;span class="nf"&gt;canUseWebP&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canUseWebP&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canUseWebP&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;canvas&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getContext&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2d&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canUseWebP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
       &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toDataURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;image/webp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;indexOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;data:image/webp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
     &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canUseWebP&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canUseWebP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canUseWebP&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Thanks to my colleagues in &lt;a href="https://twitter.com/passionpeopleNL"&gt;@passionPeopleNL&lt;/a&gt;, for shedding light on this matter!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Image elements have explicit &lt;em&gt;width&lt;/em&gt; and &lt;em&gt;height&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Set an explicit width and height on image elements to reduce layout shifts and improve CLS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/optimize-cls/?utm_source=lighthouse&amp;amp;utm_medium=lr#images-without-dimensions"&gt;optimize CLS&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Always include &lt;strong&gt;width&lt;/strong&gt; and &lt;strong&gt;height&lt;/strong&gt; size attributes on your images and video elements.&lt;/p&gt;

&lt;p&gt;Alternatively, reserve the required space with &lt;a href="https://css-tricks.com/aspect-ratio-boxes/"&gt;CSS aspect ratio boxes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → I have created a generic component for images.&lt;/p&gt;

&lt;p&gt;This way every time I define an image I will call this component, which will not only optimize my image using v-lazy and filtering the format, but the properties will not allow you not to pass the &lt;strong&gt;width&lt;/strong&gt; and &lt;strong&gt;height&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This way we will always make sure that we comply with the standard.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Use video formats for animated content
&lt;/h3&gt;

&lt;p&gt;Large GIFs are inefficient for delivering animated content. Consider using MPEG4/WebM videos for animations and PNG/WebP for static images instead of GIF to save network bytes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/efficient-animated-content/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;efficient animated content&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Many image CDNs support GIF to HTML5 video conversion. You upload a GIF to the image CDN, and the image CDN returns an HTML5 video.&lt;/p&gt;

&lt;p&gt;I recommend you the article &lt;a href="https://www.smashingmagazine.com/2018/11/gif-to-video/"&gt;Improve Animated GIF Performance With HTML5 Video&lt;/a&gt; if you need to do this yourself.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Preload Largest Contentful Paint image
&lt;/h3&gt;

&lt;p&gt;Preload the image used by the LCP element in order to improve your LCP time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/optimize-lcp/?utm_source=lighthouse&amp;amp;utm_medium=lr#preload-important-resources"&gt;optimize LCP&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → If you know that a particular resource should be prioritized, use &lt;em&gt;link rel="preload"&lt;/em&gt; to fetch it sooner.&lt;/p&gt;

&lt;p&gt;Many types of resources can be preloaded, but you should first focus on preloading critical assets, such as fonts, &lt;strong&gt;above-the-fold images&lt;/strong&gt; or videos, and critical-path CSS or JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → In the article page I've placed the featured image of the article as a preload link at the head tag using the &lt;a href="https://nuxtjs.org/docs/2.x/components-glossary/pages-head/"&gt;head method&lt;/a&gt; that nuxt provide us.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;head&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;link&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;span class="na"&gt;rel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;preload&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;as&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;image&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;transformImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;story&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;featured_image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;672x0&lt;/span&gt;&lt;span class="dl"&gt;'&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;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;h2&gt;
  
  
  Fonts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. All text remains visible during webfont loads
&lt;/h3&gt;

&lt;p&gt;Leverage the &lt;strong&gt;font-display&lt;/strong&gt; CSS feature to ensure text is user-visible while webfonts are loading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/font-display/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;font display&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → The easiest way to avoid showing invisible text while custom fonts load is to temporarily show a system font. By including &lt;em&gt;font-display: swap&lt;/em&gt; in your &lt;em&gt;@font-face&lt;/em&gt; style, you can avoid FOIT in most modern browsers:&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="k"&gt;@font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'Pacifico'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;normal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'Pacifico Regular'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'Pacifico-Regular'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="sx"&gt;url(https://fonts.gstatic.com/s/pacifico/v12/FwZY7-Qmy14u9lezJ-6H6MmBp0u-.woff2)&lt;/span&gt; &lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'woff2'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;font-display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;swap&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 &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display"&gt;font-display API&lt;/a&gt; specifies how a font is displayed. &lt;em&gt;swap&lt;/em&gt; tells the browser that text using the font should be displayed immediately using a system font. Once the custom font is ready, it replaces the system font.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For Google fonts, for example, is as simple as adding the &lt;em&gt;&amp;amp;display=swap&lt;/em&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_is_a_URL#Basics_anatomy_of_a_URL"&gt;parameter&lt;/a&gt; to the end to the Google Fonts URL:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com/css?family=Roboto:400,700&amp;amp;**display=swap**"&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → The &lt;strong&gt;@font-face&lt;/strong&gt; swap technique, is the one I'm using at the moment, with the font files included in my project directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to avoid?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Avoid multiple page redirects
&lt;/h3&gt;

&lt;p&gt;Redirects introduce additional delays before the page can be loaded (&lt;a href="https://web.dev/redirects/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;avoid multiple redirects&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I avoid&lt;/strong&gt; → I'm not doing any redirects.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Avoid serving legacy JavaScript to modern browsers
&lt;/h3&gt;

&lt;p&gt;Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://philipwalton.com/articles/deploying-es2015-code-in-production-today/"&gt;detailed info&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I use&lt;/strong&gt; → In Nuxt we have &lt;strong&gt;--modern&lt;/strong&gt; with some options in the build command. In my case for generate --modern is sufficient.&lt;/p&gt;

&lt;p&gt;Check this awesome tutorial &lt;a href="https://dev.to/debs_obrien/modern-build-in-nuxt-js-17lc"&gt;https://dev.to/debs_obrien/modern-build-in-nuxt-js-17lc&lt;/a&gt; to learn more about it.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Avoids enormous network payloads
&lt;/h3&gt;

&lt;p&gt;Large network payloads cost users real money and are highly correlated with long load times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/total-byte-weight/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;total byte weight&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → There're some ways to minimize our payload size:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Defer&lt;/strong&gt; requests until they're needed. &lt;em&gt;Nuxt&lt;/em&gt; is taking care of it.&lt;/li&gt;
&lt;li&gt;Optimize requests to be as small as possible, &lt;strong&gt;minimizing&lt;/strong&gt; and &lt;strong&gt;compressing&lt;/strong&gt;, try to use &lt;strong&gt;WebP&lt;/strong&gt; for the images when it's possible. An &lt;em&gt;image CDN&lt;/em&gt; will be always there to keep our performance up!&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cache requests so the page doesn't re-download the resources on repeat visits.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://web.dev"&gt;Web.dev&lt;/a&gt; recommend us to check &lt;a href="https://web.dev/reliable"&gt;Network reliability landing page&lt;/a&gt; to learn more about caching works and implement it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Avoids document.write()
&lt;/h3&gt;

&lt;p&gt;For users on slow connections, external scripts dynamically injected via &lt;em&gt;document.write()&lt;/em&gt; can delay page load by tens of seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/no-document-write/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;no document write&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → In your own code you have absolute control to not add it, but I recommend that whenever you are going to use a third-party check that it is not using document.write() for something.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Avoid non-composited animations
&lt;/h3&gt;

&lt;p&gt;Animations which are not composited can be janky and increase CLS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution (&lt;/strong&gt;&lt;a href="https://web.dev/non-composited-animations/?utm_source=lighthouse&amp;amp;utm_medium=lr"&gt;non composited animations&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; → Right now I don't have so many animations, but the few I have I apply with the properties that are cheap to run for the browser: translate and scale.&lt;/p&gt;

&lt;p&gt;Reading this tutorial &lt;a href="https://www.html5rocks.com/en/tutorials/speed/high-performance-animations/"&gt;https://www.html5rocks.com/en/tutorials/speed/high-performance-animations/&lt;/a&gt; will clarify you why.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interesting articles on this topic
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wildbit.com/blog/2020/09/30/getting-postmark-lighthouse-performance-score-to-100"&gt;https://wildbit.com/blog/2020/09/30/getting-postmark-lighthouse-performance-score-to-100&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/weekly-webtips/web-vitals-google-search-the-state-vue-nuxt-performance-optimization-in-july-2020-71441eefc51"&gt;https://medium.com/weekly-webtips/web-vitals-google-search-the-state-vue-nuxt-performance-optimization-in-july-2020-71441eefc51&lt;/a&gt;&lt;/p&gt;

</description>
      <category>performance</category>
      <category>webperf</category>
      <category>vue</category>
      <category>netlify</category>
    </item>
    <item>
      <title>Create custom emails with your Netlify domain and Zoho</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Fri, 26 Mar 2021 22:20:33 +0000</pubDate>
      <link>https://dev.to/dawntraoz/create-custom-emails-with-your-netlify-domain-and-zoho-fb</link>
      <guid>https://dev.to/dawntraoz/create-custom-emails-with-your-netlify-domain-and-zoho-fb</guid>
      <description>&lt;p&gt;In this post I want to show you how I setted up an email account with my own domain using Netlify as my domain provider and Zoho as my email service.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1375567759996768259-285" src="https://platform.twitter.com/embed/Tweet.html?id=1375567759996768259"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1375567759996768259-285');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1375567759996768259&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Netlify
&lt;/h2&gt;

&lt;p&gt;For those of you who don't know &lt;a href="https://www.netlify.com/"&gt;Netlify&lt;/a&gt; yet, although if you've come to this post you probably already know about it, Netlify offers &lt;strong&gt;hosting&lt;/strong&gt; and &lt;strong&gt;serverless backend services&lt;/strong&gt; for web applications and &lt;strong&gt;static websites&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Also, when you host your static site with them they offer you the possibility to &lt;strong&gt;buy your own domain&lt;/strong&gt; there.&lt;/p&gt;

&lt;p&gt;And when you have your domain on Netlify you wonder if you will be able to &lt;strong&gt;create your own email&lt;/strong&gt;. Of course you can, the &lt;strong&gt;DNS system&lt;/strong&gt; of your domain is still available to you &lt;strong&gt;on Netlify&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sxnha36wxwgu1emf6jj.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sxnha36wxwgu1emf6jj.jpeg" alt="DNS Settings at Netlify" width="604" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many &lt;a href="https://www.freecodecamp.org/news/the-best-free-email-providers-2021-guide-to-online-email-account-services/"&gt;services that allow you to have messaging&lt;/a&gt; with your own domain. But, in this case, we're going to look at a free service called &lt;a href="https://www.zoho.com/mail/"&gt;Zoho&lt;/a&gt;, in a few minutes it allows us to have our custom email active 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  Create your own email
&lt;/h2&gt;

&lt;p&gt;Go to &lt;a href="https://www.zoho.com/mail/zohomail-pricing.html"&gt;Zoho&lt;/a&gt; and follow the steps below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sign Up&lt;/strong&gt; for a plan (could be a Forever free plan)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flk0h9rhau2112xnncg5m.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flk0h9rhau2112xnncg5m.jpeg" alt="Forever free plan Zoho" width="337" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add your domain&lt;/strong&gt; at &lt;a href="https://mail.zoho.eu/orgsignup.do"&gt;https://mail.zoho.eu/orgsignup.do&lt;/a&gt;, &lt;strong&gt;choose&lt;/strong&gt; your main &lt;strong&gt;email name&lt;/strong&gt; and fill the data required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify&lt;/strong&gt; your domain: select &lt;em&gt;Others&lt;/em&gt; in hosting providers and then copy the TXT register.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, on &lt;strong&gt;Netlify&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;strong&gt;Domain settings&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click on your domain Options and select &lt;strong&gt;Go to DNS Panel&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frd9c7jkjcvzhxzykck0q.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frd9c7jkjcvzhxzykck0q.jpeg" alt="Go to DNS Panel at Netlify" width="682" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add the TXT register that Zoho provides you&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then go back to Zoho, click &lt;strong&gt;verify&lt;/strong&gt; and voilà your new email is setted up!!&lt;/p&gt;




&lt;p&gt;Just a few steps left to start receiving emails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Add &lt;strong&gt;3 MX register&lt;/strong&gt; in your DNS Netlify's panel with the values that Zoho provides you.&lt;/p&gt;

&lt;p&gt;Name: yourdomain.io&lt;/p&gt;

&lt;p&gt;Type: MX&lt;/p&gt;

&lt;p&gt;Priority: 10 (the same with 20 and 30)&lt;/p&gt;

&lt;p&gt;Value: mx.zoho.eu&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Register security DNS&lt;/strong&gt; as per lastest steps in the Zoho sign up process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download Zoho Mail App or &lt;strong&gt;log in&lt;/strong&gt; in the browser: &lt;a href="https://accounts.zoho.eu/"&gt;https://accounts.zoho.eu/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is next?
&lt;/h3&gt;

&lt;p&gt;Now in Zoho you can create more user emails or email groups, i.e support.yourdomain.io or marketing.yourdomain.io.&lt;/p&gt;

&lt;p&gt;In addition, by default it comes with a nice separation of folders, separating the notification &amp;amp; newsletter emails from the important ones, among others.&lt;/p&gt;

&lt;p&gt;You have a lot of possibilities there and, obviously, you can increase your plan to have so many other features ready for you 😍 &lt;/p&gt;

&lt;p&gt;Just explore Zoho and let me know what cool things you found that I can also use in mine 💜&lt;/p&gt;

</description>
      <category>netlify</category>
      <category>zoho</category>
      <category>email</category>
      <category>service</category>
    </item>
    <item>
      <title>Nevertheless, Alba Silvente 💃🏼 Coded in 2021!</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Sun, 07 Mar 2021 21:34:20 +0000</pubDate>
      <link>https://dev.to/dawntraoz/nevertheless-alba-silvente-coded-in-2021-1gan</link>
      <guid>https://dev.to/dawntraoz/nevertheless-alba-silvente-coded-in-2021-1gan</guid>
      <description>&lt;p&gt;After seeing the initiative that DEV is proposing for such a special day as 8 March, I didn't want to miss it, so I'm joining in!&lt;/p&gt;

&lt;h2&gt;
  
  
  My biggest achievement this year
&lt;/h2&gt;

&lt;p&gt;This year, after the best professional year of my life, I decided to try my luck and try to join the company I loved, &lt;a href="https://www.linkedin.com/company/passionatepeoplenl/"&gt;Passionate People&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are not going to deny that I still have insecurities after 5 years in this sector, but what I see as important is that they do not stop me from pursuing my goals or my dreams.&lt;/p&gt;

&lt;p&gt;Many times you have to do things that you don't feel capable of, like trying to get into the company of your dreams, but if you try, you will get there, so don't give up!&lt;/p&gt;

&lt;p&gt;And here I am... 😱&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1367104596280229891-490" src="https://platform.twitter.com/embed/Tweet.html?id=1367104596280229891"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1367104596280229891-490');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1367104596280229891&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h2&gt;
  
  
  Women in tech who have appeared in my life
&lt;/h2&gt;

&lt;p&gt;As I said, last year was completely crazy for me, for all the goals I achieved, for everything I accomplished in my working life.&lt;/p&gt;

&lt;p&gt;I owe it all to many women in this sector, for their support, for their help, for their strength and for making a place for us in places we were not part of!&lt;/p&gt;

&lt;p&gt;If I have to name someone first, it has to be &lt;a href="https://twitter.com/debs_obrien"&gt;Debbie O'brien&lt;/a&gt;, we can say that Debbie is my shadow manager 🤣 She has been a crucial person in my life this last year, she has helped me to grow, to make an effort, to value what I do and above all to believe in myself, in my knowledge.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If someone told me a year and a half ago that Debbie would talk to me in a video call I would faint (she was like a divine being for me hahahaha)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Another person who inspires me the most is &lt;a href="https://twitter.com/lauragift_"&gt;Gift Egwuenu&lt;/a&gt; how she manages to do everything she sets out to do, being everywhere and having time to cook, dance and go for a run, she is a superheroine.&lt;/p&gt;

&lt;p&gt;And my partner in crime &lt;a href="https://twitter.com/miriamgonp"&gt;Miriam Gonzalez&lt;/a&gt; could not be missing in this article.&lt;/p&gt;

&lt;p&gt;One of the things that the tech community has brought me is the opportunity to meet other people in online events during this year of confinement. One of them is Miriam, who is now a very important pillar, with whom I am setting up projects that make me live again a little and remember what it was like to have a laugh with friends.&lt;/p&gt;

&lt;p&gt;I look forward to meeting more women in tech and joining forces 🤗&lt;/p&gt;

&lt;h2&gt;
  
  
  My biggest goal for this year
&lt;/h2&gt;

&lt;p&gt;Contribute more to open source, encourage more women in the sector to participate, increase the female open source community, like &lt;a href="https://www.vuevixens.org/"&gt;Frontend Foxes&lt;/a&gt; has done for years.&lt;/p&gt;

&lt;p&gt;And to be able to mentor a woman who wants to enter in the Frontend world would also be awesome 🤩&lt;/p&gt;

&lt;h2&gt;
  
  
  My advice for allies to support underrepresented folks who code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Don't turn a blind eye when a colleague is undervalued by their superiors.&lt;/li&gt;
&lt;li&gt;Be human, if someone makes a mistake, don't whip them, remind them that we all make mistakes, that we are improving and learning thanks to having made them.&lt;/li&gt;
&lt;li&gt;Respect the speed of others, many people cannot keep up with the pace of another person, you have to try to give space and work adapting to the other person. That will make you both perform much better as a team!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And thanks to all the women who have opened this path for others, who don't stop growing and surpassing themselves, we are warriors!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3b0uxdo4md0l9e2bo70.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3b0uxdo4md0l9e2bo70.gif" alt="Female warriors" width="220" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I read you on DEV She Coded 🧐&lt;/p&gt;

</description>
      <category>wecoded</category>
      <category>warriors</category>
      <category>fighters</category>
      <category>champions</category>
    </item>
    <item>
      <title>A Front-end developer using Figma</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Sun, 28 Feb 2021 00:19:35 +0000</pubDate>
      <link>https://dev.to/dawntraoz/a-front-end-developer-using-figma-41p2</link>
      <guid>https://dev.to/dawntraoz/a-front-end-developer-using-figma-41p2</guid>
      <description>&lt;p&gt;In this post I want to tell you my first experience with Figma, how I am defining my design system, what resources I have found and how to create slides with your own brand.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1365370135402450944-614" src="https://platform.twitter.com/embed/Tweet.html?id=1365370135402450944"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1365370135402450944-614');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1365370135402450944&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h2&gt;
  
  
  How a design system is helping me
&lt;/h2&gt;

&lt;p&gt;Creating my own design system has helped me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;To be &lt;strong&gt;consistent&lt;/strong&gt; between the products I create. For example, my website uses the same components, style and typography as my slides. It helps to be &lt;strong&gt;aligned&lt;/strong&gt; and create a brand.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To &lt;strong&gt;reuse&lt;/strong&gt; elements, creating components and use them in new pages, products or sections. Allowing me to &lt;strong&gt;save&lt;/strong&gt; a lot of &lt;strong&gt;time&lt;/strong&gt; both adding new content and modifying existing one.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although a &lt;strong&gt;design system&lt;/strong&gt; is time-consuming, the good thing is that you can do it little by little and define and &lt;strong&gt;improve it over time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;next steps&lt;/strong&gt; will be to create &lt;strong&gt;guidelines&lt;/strong&gt;, in case one day I work with more people, and to &lt;strong&gt;unify&lt;/strong&gt; the designs of my &lt;strong&gt;side projects&lt;/strong&gt; with Dawntraoz's brand, but little by little.&lt;/p&gt;

&lt;p&gt;For now, I leave you with this design system made in Figma, which is amazing, 🦄 &lt;a href="https://www.figma.com/community/file/889142897767055377"&gt;Pegasus Design System&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you want to know more about this topic, I recommend you to take a look at &lt;a href="https://twitter.com/miriamgonp"&gt;Míriam González&lt;/a&gt;'s talk, where she shares super useful resources 👉 &lt;a href="https://miriamgonzalez.dev/charlas/design-systems-101"&gt;Design Systems 101&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  First steps learning Figma
&lt;/h2&gt;

&lt;p&gt;I started reading the &lt;a href="https://www.figma.com/"&gt;Figma&lt;/a&gt; Basics tutorial, where the concepts behind Figma are explained. I'll summarize what I found very useful in my journey:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frames&lt;/strong&gt;: the Artboards of Figma where you have &lt;strong&gt;preset sizes&lt;/strong&gt; as standard Desktop, Tablet and Phone sizes.&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Constrains&lt;/strong&gt;: to &lt;strong&gt;fix elements&lt;/strong&gt; to the sides of their parent, this is useful to &lt;strong&gt;resize the elements&lt;/strong&gt; when you resize the screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, the header element is fixed top-left-right to its parent -&lt;em&gt;Homepage Frame&lt;/em&gt;-, when the homepage width increase the header will grow with it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can also check the chekbox -&lt;em&gt;Fix position when scrolling-&lt;/em&gt; to simulate &lt;strong&gt;position: sticky&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Components&lt;/strong&gt;: to &lt;strong&gt;reuse elements&lt;/strong&gt; of the design, creating new instances of them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To create a component you just need to right click the element already created and select the option &lt;em&gt;Create Component&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Once it's ready, to create a new instance: go to the &lt;em&gt;Assets panel&lt;/em&gt; and drag &amp;amp; drop the component.&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Styles&lt;/strong&gt;: to define a &lt;strong&gt;set of properties&lt;/strong&gt; like colors, texts, shadows... which could be reused across the design.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, to create a generic text: define the properties of your text, i.e. font family, size, decoration, ...; then, click on the Styles icon (the icon with 4 dots) and click on the + icon to save it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you want to know all the properties you can add to your custom text styles, check &lt;a href="https://www.figma.com/best-practices/typography-systems-in-figma/"&gt;Typography systems in Figma&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To reuse it, just click on the Styles icon again and select the one you want. You will see something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6dd3bvvsayfi1i1iarvu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6dd3bvvsayfi1i1iarvu.jpg" alt="Text styles " width="450" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Smart selection&lt;/strong&gt;: selecting multiple elements using Ctrl+Shift+Click allows you to &lt;strong&gt;adjust&lt;/strong&gt; &lt;strong&gt;spacing&lt;/strong&gt; between elements (click &amp;amp; drag - pink &lt;em&gt;lines&lt;/em&gt;) and change the &lt;strong&gt;position&lt;/strong&gt; (drag &amp;amp; drop - pink &lt;em&gt;circles&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F881rmufofnsgct9qr2z0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F881rmufofnsgct9qr2z0.jpg" alt="Smart selection in Figma" width="364" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exporting, commenting &amp;amp; sharing&lt;/strong&gt;: you can export in &lt;strong&gt;PNG&lt;/strong&gt;, &lt;strong&gt;JPG&lt;/strong&gt;, &lt;strong&gt;SVG&lt;/strong&gt; and &lt;strong&gt;PDF&lt;/strong&gt; formats all your elements and designs, more people will be able to &lt;strong&gt;give you feedback&lt;/strong&gt; on your design by commenting on it and you will be able to &lt;strong&gt;share&lt;/strong&gt; your designs &lt;strong&gt;via a link&lt;/strong&gt; with anyone.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;To get to know these points in detail and practice them with a use case, just register at &lt;a href="https://www.figma.com/pricing/"&gt;Figma&lt;/a&gt; ✨ It's free for your first 3 projects 🎉&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Organising my content
&lt;/h2&gt;

&lt;p&gt;When I got to know the basics of Figma, I started to organise my project and to turn my website into a design, which was already designed (not ideal, but that's how I started).&lt;/p&gt;

&lt;p&gt;Next, I will tell you how I have set up the project by sections.&lt;/p&gt;

&lt;h3&gt;
  
  
  Style guide: Colors, typography and iconography
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Two of Figma's most powerful features are &lt;a href="https://help.figma.com/hc/en-us/articles/360038662654"&gt;components&lt;/a&gt; and &lt;a href="https://help.figma.com/hc/en-us/categories/360002042553-Using-Figma#Styles"&gt;styles&lt;/a&gt;. They let you reuse UI objects and attributes so you can maintain designs systematically at scale. - by Figma&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As I went through the main page of my website, I saved the styles, both colours and fonts, that I defined.&lt;/p&gt;

&lt;p&gt;Once I had defined all of them, I created a page called Style guide where I represented the colours, their name and their hexadecimal value, as well as the typographies for each type of heading or text.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9afgpvp64haqpjm3n0v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9afgpvp64haqpjm3n0v.jpg" alt="Styleguide colors and gradients in Figma" width="800" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the same thing happened with the iconography, as I added the SVG icons to my design I created components in the Style guide page. This way I can control from one place how they are displayed and export them in isolation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1tm64qgk3si4vv86ld35.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1tm64qgk3si4vv86ld35.jpg" alt="Iconography in Figma" width="800" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Components
&lt;/h3&gt;

&lt;p&gt;For those parts that make up my design and that I'm going to reuse, it could be none other than the components section. This is where the variants and properties that Figma offers us come into the picture, let's see what it's about.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I will tell you how I've used them in my project, but as I'm not an expert, it's better to look at the recommendations Figma gives us at &lt;a href="https://www.figma.com/best-practices/creating-and-organizing-variants/"&gt;https://www.figma.com/best-practices/creating-and-organizing-variants/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Well, the first thing I had to do was to &lt;strong&gt;create the content of&lt;/strong&gt; what was going to be &lt;strong&gt;my first component&lt;/strong&gt;, a custom heading with a gradient by colour. This component had a different &lt;strong&gt;size&lt;/strong&gt; in &lt;strong&gt;desktop&lt;/strong&gt; &amp;amp; &lt;strong&gt;mobile&lt;/strong&gt; and a different gradient in &lt;strong&gt;light &amp;amp; dark mode&lt;/strong&gt;, a total of &lt;strong&gt;4 variants&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To define the variants I had to take into account &lt;strong&gt;2 properties&lt;/strong&gt;: the &lt;strong&gt;screen&lt;/strong&gt;, which corresponds to the desktop or mobile version, and the &lt;strong&gt;mode&lt;/strong&gt;, being light or dark.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdnh9jd3ec4tuy1ho6xvy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdnh9jd3ec4tuy1ho6xvy.jpg" alt="Heading component in Figma" width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the image above the first heading on the &lt;strong&gt;top left&lt;/strong&gt; would be the &lt;strong&gt;desktop&lt;/strong&gt; version in &lt;strong&gt;light&lt;/strong&gt; mode, and on the &lt;strong&gt;bottom right&lt;/strong&gt; the &lt;strong&gt;mobile&lt;/strong&gt; version in &lt;strong&gt;dark&lt;/strong&gt; mode.&lt;/p&gt;

&lt;p&gt;This grouping could have been done differently, we will see this in the next section with the Header layout component.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layout
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Although our layout elements, the header and footer, are components in Figma, it made more sense to me to have a special section for them and that's why I created the Layout page.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As I mentioned before, when I had to create 4 variants of each component to cover both desktop and mobile in light and dark mode, I wondered if I had done it correctly and when I asked on Twitter my doubt was solved.&lt;/p&gt;

&lt;p&gt;That's how I discovered the &lt;a href="https://www.figma.com/best-practices/creating-and-organizing-variants/using-variants-effectively/#using-base-components"&gt;base components&lt;/a&gt; (the master piece). Basically, when you &lt;strong&gt;create a variant&lt;/strong&gt; you are making a &lt;strong&gt;copy&lt;/strong&gt; of the content, &lt;strong&gt;not an instance&lt;/strong&gt;, and when I wanted to modify something on desktop, for example, I would have to do it for light and dark mode and that's not ideal. That's why the &lt;strong&gt;base component has saved me&lt;/strong&gt;!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Header&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the Header/Base component I design the desktop and mobile version of the header, I only take into account the screen property. Then I create the &lt;strong&gt;Header&lt;/strong&gt; component that &lt;strong&gt;uses the Header/Base instances&lt;/strong&gt; and there I design the light and dark mode variants. This way, the day I want to change something in the mobile/desktop design I will only have to apply it in Header/Base and Header will be updated automatically!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fui64t77i5oowwk2mzbk2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fui64t77i5oowwk2mzbk2.jpg" alt="Header base component in Figma" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Footer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the footer it was easier because it doesn't vary depending on the mode, so a &lt;strong&gt;Footer&lt;/strong&gt; component was more than enough. But one thing I discovered when trying to add a &lt;strong&gt;border bottom&lt;/strong&gt; to the footer titles is that I needed a &lt;strong&gt;plugin&lt;/strong&gt; to help me apply the border I wanted: &lt;a href="https://www.figma.com/community/plugin/740014625507871586/Border"&gt;Border&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once the header and footer were already created, I was adding them to the page layouts, until I decided to create a &lt;strong&gt;template&lt;/strong&gt; to reuse the structure and add the container spacing in the body section. As you can see below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1mpp5hlx4waoocdrmp6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1mpp5hlx4waoocdrmp6.jpg" alt="Layout components in Figma" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Grids
&lt;/h3&gt;

&lt;p&gt;To avoid having to redefine the size and fit the components to the columns every time I wanted to modify one of the grids, I decided to create a section where I could isolate them and instantiate them in the design of my pages.&lt;/p&gt;

&lt;p&gt;For example, for the blog listing I created a two column grid on desktop with a full width version for mobile (using variants with a screen property):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs740aj4o0uxzambheg2k.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs740aj4o0uxzambheg2k.jpg" alt="Blog grid listing in Figma" width="800" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Pages
&lt;/h3&gt;

&lt;p&gt;And now, having put all the pieces of the design together, it's time to define our pages!&lt;/p&gt;

&lt;p&gt;Making use of the template we created on the layout page and choosing the corresponding heading component for desktop or mobile in light mode, as well as the listing grid, we are ready to go 🎉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwt4w3pdr1nuh7x2dgrm4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwt4w3pdr1nuh7x2dgrm4.jpg" alt="Page template for Blog in Figma" width="800" height="659"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Article cards
&lt;/h3&gt;

&lt;p&gt;And as I wanted to have a space for the feature images of the articles, I created a page called Article cards, where I design the images and export them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funenj3jzucdpmzm8dwt7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funenj3jzucdpmzm8dwt7.jpg" alt="Article cards for blog posts" width="800" height="497"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To export the frame with the feature image, I added one export option and set the type of file I wanted to export to JPG. Then I clicked the preview tab to see the result and the export button to get the picture.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://help.figma.com/hc/en-us/articles/360040028114-Guide-to-exports-in-Figma"&gt;Everything you need to know about export by Figma&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtw9ksm8g2zts1gcrn4z.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtw9ksm8g2zts1gcrn4z.jpg" alt="Export article card option" width="480" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Using plugins
&lt;/h2&gt;

&lt;p&gt;After defining my project I decided to do some research and look for cool stuff. Let's see what I have found 🔍&lt;/p&gt;

&lt;h3&gt;
  
  
  Custom Slides
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;I'm quite proud of this part, to be honest 🙈.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I recently started giving talks but, doing it on my own, I didn't have a company template to make the slides. So, I decided to use free templates that I found on the internet. But, as you can imagine, it had nothing to do with my web design.&lt;/p&gt;

&lt;p&gt;Searching on Google how to make my own slides with Figma, I found this video &lt;a href="https://www.youtube.com/watch?v=BkMRUL5SvmE"&gt;Export slide deck presentations from Figma to Google Slides&lt;/a&gt;, which explains the use of a plugin to convert frames made in Figma into Google Slides or, even, interactive slides generated in an url.&lt;/p&gt;

&lt;p&gt;The plugin is &lt;a href="https://www.figma.com/community/plugin/838925615018625519/Pitchdeck-Presentation-Studio"&gt;Pitchdeck Presentation Studio&lt;/a&gt;, which I highly recommend. This is how it looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg1gdv6afgc9mfxrzujbk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg1gdv6afgc9mfxrzujbk.jpg" alt="Custom slides to Google Slides" width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There you can add animations to the elements (not compatible with Google Slides), add speaker notes, change the slides order, ...&lt;/p&gt;

&lt;p&gt;The wonderful thing is to be able to &lt;strong&gt;use the components of your web design for your slides&lt;/strong&gt;, what a fantasy 🦄&lt;/p&gt;

&lt;h3&gt;
  
  
  Illustrations
&lt;/h3&gt;

&lt;p&gt;As I created new slides, I wanted to put in some cool geometric shapes and I thought, why not illustrations?&lt;/p&gt;

&lt;p&gt;When I think of illustrations I always think of &lt;a href="https://www.humaaans.com/"&gt;Humaaans&lt;/a&gt; by &lt;a href="https://twitter.com/pablostanley"&gt;Pablo Stanley&lt;/a&gt;, so I went straight to his website and found a wonderful plugin for figma so I could add my illustrations without leaving here, that's amazing 😍.&lt;/p&gt;

&lt;p&gt;The plugin is called Blush and you can find it in the &lt;a href="https://www.figma.com/community"&gt;community&lt;/a&gt; or by going directly to its page 👉 &lt;a href="https://www.figma.com/community/plugin/838959511417581040/Blush"&gt;https://www.figma.com/community/plugin/838959511417581040/Blush&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmj6r3z2jziby5q36moky.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmj6r3z2jziby5q36moky.jpg" alt="Blush Humaaans by Pablo Stanley in Figma" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  For TailwindCSS lovers
&lt;/h3&gt;

&lt;p&gt;It is possible to export all our styles, colors and typography, as a preset for tailwind.config.js by using the plugin: &lt;a href="https://www.figma.com/community/plugin/785619431629077634/Figma-Tailwindcss"&gt;https://www.figma.com/community/plugin/785619431629077634/Figma-Tailwindcss&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Side note: If the plugin doesn't have a description on how to use it, it's because you need to go to Files tab (or right click) &amp;gt; Plugins &amp;gt; Click on the plugin you want to use and voilà!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is the result by using it in my project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;colors&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#ffffff&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gray-light&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#e5e7eb&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gray-dark&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#111827&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fuchsia&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#a21caf&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#000000&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
 &lt;span class="p"&gt;},&lt;/span&gt;
 &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fontSize&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sm&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0.75rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;base&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1.125rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;xl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1.5rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2xl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1.875rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;3xl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2.25rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;4xl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;3.75rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
 &lt;span class="p"&gt;},&lt;/span&gt;
 &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fontFamily&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gilroy-bold&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Gilroy-Bold&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;segoe-ui&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Segoe UI&lt;/span&gt;&lt;span class="dl"&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;



</description>
      <category>figma</category>
      <category>design</category>
      <category>learning</category>
      <category>slides</category>
    </item>
    <item>
      <title>Adding RSS feed to my Nuxt &amp; Storyblok blog</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Tue, 09 Feb 2021 07:59:14 +0000</pubDate>
      <link>https://dev.to/dawntraoz/adding-rss-feed-to-my-nuxt-storyblok-blog-1ma6</link>
      <guid>https://dev.to/dawntraoz/adding-rss-feed-to-my-nuxt-storyblok-blog-1ma6</guid>
      <description>&lt;p&gt;In this post I would like to show you how I generated the RSS feed.xml for my blog, using Nuxt and Storyblok.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1358830452795011072-126" src="https://platform.twitter.com/embed/Tweet.html?id=1358830452795011072"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1358830452795011072-126');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1358830452795011072&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h2&gt;
  
  
  What is RSS feed?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;RSS is a web feed that allows users and applications to access updates to websites in a standardized, computer-readable format. - &lt;a href="https://en.wikipedia.org/wiki/RSS"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The RSS feeds allow a user to keep track of the new content of many different websites, e.g. get the latest articles from your favourite newspapers.&lt;/p&gt;

&lt;p&gt;In our website, the RSS feed is an xml file in which you will have the highlighted information of the content that you publish, for example, the articles of your blog.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is it useful?
&lt;/h2&gt;

&lt;p&gt;Imagine that you want to create a newsletter with the latest content you publish, or that you want to automate the promotion of your posts.&lt;/p&gt;

&lt;p&gt;Since your &lt;em&gt;feed.xml&lt;/em&gt; is updated with details about every piece of content your site publishes, you can use RSS feeds for &lt;strong&gt;generating email newsletters&lt;/strong&gt; and &lt;strong&gt;automated social media posts&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Do you like the idea? Let's see how to implement it in our blog made with Nuxt and using Storyblok as headlessCMS.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We're going to see an example with this tech stack, but this code could be also used with any HeadlessCMS/Rest API.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How to add the feed to our Nuxt blog
&lt;/h2&gt;

&lt;p&gt;With the amazing ecosystem of modules we have in Nuxt, I'm quite sure we can find a module that already does the job for us. Let's look for an RSS or feed related module in the &lt;a href="https://modules.nuxtjs.org/"&gt;nuxt modules explorer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5nujr291113mgc7ahh1n.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5nujr291113mgc7ahh1n.jpg" alt="Nuxt modules explorer" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And, of course, here it is &lt;a href="https://www.npmjs.com/package/@nuxtjs/feed"&gt;https://www.npmjs.com/package/@nuxtjs/feed&lt;/a&gt;!!&lt;/p&gt;

&lt;p&gt;Following the &lt;strong&gt;README.md&lt;/strong&gt;, the first thing we have to do is to install/&lt;strong&gt;add the package&lt;/strong&gt; in our project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn add @nuxtjs/feed &lt;span class="c"&gt;# npm install @nuxtjs/feed&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, add the module &lt;strong&gt;@nuxtjs/feed&lt;/strong&gt; in the &lt;em&gt;modules&lt;/em&gt; section in &lt;strong&gt;nuxt.config.js&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nuxtjs/feed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="nx"&gt;feed&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;span class="c1"&gt;// Here you place the options needed to generate the xml file&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once it's ready, let's take a look at the options we need to fill in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;path&lt;/strong&gt;: the route to our xml RSS feed file (&lt;em&gt;feed.xml&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;create&lt;/strong&gt;: a method in which we will populate the feed object and make API calls to get the articles data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cacheTime&lt;/strong&gt;: how long should the feed be cached.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;type&lt;/strong&gt;: type of feed as rss2, atom1 or json1 (&lt;em&gt;rss2&lt;/em&gt; in our case).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;feed&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;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/feed.xml&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Your name's blog&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;link&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://blog-domain.com/feed.xml&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Your name's blog feed!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

            &lt;span class="c1"&gt;// await API call with our posts data&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;cacheTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rss2&lt;/span&gt;&lt;span class="dl"&gt;'&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;blockquote&gt;
&lt;p&gt;This module is based on &lt;a href="https://github.com/jpmonette/feed"&gt;feed package&lt;/a&gt;. You can check it out for modifying the feed object passed to the create method.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's time to &lt;strong&gt;customize the feed object&lt;/strong&gt; with our Storyblok data (or your API data) using axios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, we need to import axios in the &lt;strong&gt;nuxt.config.js&lt;/strong&gt; file.&lt;/li&gt;
&lt;li&gt;Next, we wait for the API get call to finish. The call will retrieve the pages stored in the blog folder, our articles, by specifying '&lt;strong&gt;?starts_with=blog'&lt;/strong&gt; and giving the &lt;strong&gt;token&lt;/strong&gt; needed to identify ourselves:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`https://api.storyblok.com/v1/cdn/stories?starts_with=blog&amp;amp;token=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;storyblokToken&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Once the call has returned a response, we go to &lt;strong&gt;posts.data.stories&lt;/strong&gt; and go through the array using &lt;strong&gt;forEach&lt;/strong&gt;. For each of the posts, we will run &lt;strong&gt;feed.addItem({})&lt;/strong&gt; with the data of each one, as you can see below:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

  &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="c1"&gt;// ...&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="c1"&gt;// ... Feed options&lt;/span&gt;

          &lt;span class="c1"&gt;// Wait the response&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s2"&gt;`https://api.storyblok.com/v1/cdn/stories?starts_with=blog&amp;amp;token=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;storyblokToken&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt;

          &lt;span class="cm"&gt;/* START - Go through the array of stories */&lt;/span&gt;
          &lt;span class="nx"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stories&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`https://blog-domain.com/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;full_slug&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
            &lt;span class="nx"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addItem&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
              &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="na"&gt;link&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;excerpt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="na"&gt;published&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;first_published_at&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
              &lt;span class="na"&gt;author&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;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Your name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-email@gmail.com&lt;/span&gt;&lt;span class="dl"&gt;'&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;span class="p"&gt;})&lt;/span&gt;
          &lt;span class="p"&gt;})&lt;/span&gt;
          &lt;span class="cm"&gt;/* END */&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you have it ready, the next time you build your project (&lt;strong&gt;yarn build&lt;/strong&gt;) or run the &lt;strong&gt;yarn generate&lt;/strong&gt; command, the result will be similar to the one generated at &lt;a href="https://www.dawntraoz.com/feed.xml"&gt;https://www.dawntraoz.com/feed.xml&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you want to take it a step further, you can see more info on how to set up pagination and categories at &lt;a href="https://www.storyblok.com/tp/how-to-generate-an-rss-feed-with-a-headless-cms"&gt;how to generate an RSS feed with a headlessCMS&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Making use of our feed file
&lt;/h2&gt;

&lt;p&gt;Not long ago, Github added the possibility to &lt;a href="https://docs.github.com/en/github/setting-up-and-managing-your-github-profile/about-your-profile"&gt;create a README as your profile description&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you add a README file to the root of a public repository with the same name as your username, that README will automatically appear on your profile page.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I created a pretty basic one for myself. But this weekend, &lt;a href="https://twitter.com/natterstefan"&gt;@Natterstefan&lt;/a&gt; made me discover the possibility of creating a workflow, using Github Actions, which reads my RSS feed automatically to display my latest published articles in a section of my Github profile.&lt;/p&gt;

&lt;p&gt;At the post &lt;a href="https://blog.natterstefan.me/how-to-present-your-latest-blog-posts-and-youtube-videos-on-your-github-profile"&gt;How to present your latest blog posts on your GitHub profile&lt;/a&gt; he explains how to do it in detail!&lt;/p&gt;

&lt;p&gt;In my case, I only needed to create the workflow at &lt;a href="https://github.com/Dawntraoz/Dawntraoz/blob/master/.github/workflows/articles.yml"&gt;.github/workflows/articles.yml&lt;/a&gt; and change the url of the workflow to my feed.xml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Articles&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="c1"&gt;# Triggers the workflow on push or pull request events but only for the master branch&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;master&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="c1"&gt;# Run workflow automatically&lt;/span&gt;
  &lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Runs every hour&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cron&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*"&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;update-readme-with-blog&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update this repo's README with the list of articles&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gautamkrishnar/blog-post-workflow@master&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="c1"&gt;# comma-separated list of RSS feed urls&lt;/span&gt;
          &lt;span class="na"&gt;feed_list&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://www.dawntraoz.com/feed.xml"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And, to see the latest articles, I added these lines in the &lt;a href="http://readme.md"&gt;README.md&lt;/a&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;### ✍ Latest Blog Posts&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- BLOG-POST-LIST:START --&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!-- BLOG-POST-LIST:END --&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here is the result 😍&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxfawqqzq2q8kdtqgfl49.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxfawqqzq2q8kdtqgfl49.jpg" alt="GitHub profile latest blog posts" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you found this post useful 🤩 See you in the next article 👋&lt;/p&gt;

</description>
      <category>feed</category>
      <category>nuxt</category>
      <category>storyblok</category>
      <category>sharing</category>
    </item>
    <item>
      <title>How to format dates without Moment.js</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Mon, 01 Feb 2021 10:33:07 +0000</pubDate>
      <link>https://dev.to/dawntraoz/how-to-format-dates-without-moment-js-2la0</link>
      <guid>https://dev.to/dawntraoz/how-to-format-dates-without-moment-js-2la0</guid>
      <description>&lt;p&gt;In this post I want to tell you how I got rid of the moment library when I found new alternatives with smaller, even non-existent, size.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1356181424827727874-962" src="https://platform.twitter.com/embed/Tweet.html?id=1356181424827727874"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1356181424827727874-962');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1356181424827727874&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h2&gt;
  
  
  The moment of Moment.js has passed 😥
&lt;/h2&gt;

&lt;p&gt;Five years ago, even before I knew the frameworks I work with today, &lt;a href="https://momentjs.com/"&gt;Moment.js&lt;/a&gt; was the library that saved us from headaches trying to handle &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date"&gt;Date&lt;/a&gt; and its methods in its own way.&lt;/p&gt;

&lt;p&gt;We are not going to deny, that when you start using a library and it solves your problem, you end up loving it and adding it to all the projects where you need to do some maths between dates or change your time zone. So you can imagine how many old projects use it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you would like to know more about why it is necessary to upgrade to a new library, I invite you to read &lt;a href="https://inventi.studio/en/blog/why-you-shouldnt-use-moment-js"&gt;Why you shouldn't use Moment.js...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But &lt;strong&gt;now&lt;/strong&gt;, everything has changed and &lt;strong&gt;we have a lot of alternatives&lt;/strong&gt; with which we can improve our performance. In my case, since in my website I only have a difference between dates and a few formatting, using only &lt;strong&gt;Date&lt;/strong&gt; and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat"&gt;&lt;strong&gt;Intl.DateTimeFormat&lt;/strong&gt;&lt;/a&gt; I get what I need easily.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Intl.DateTimeFormat is an object that enable language-sensitive date and time formatting.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But for those projects that need to deal with more complex functionalities, here are a few libraries for different use cases that may be useful for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  What alternatives do we have
&lt;/h2&gt;

&lt;p&gt;Depending on how we use dates, there will be libraries that do better than others. Let's look at a few use cases and the top-rated libraries available.&lt;/p&gt;

&lt;h3&gt;
  
  
  Older browsers
&lt;/h3&gt;

&lt;p&gt;Let's start with &lt;strong&gt;support for older versions of IE explorer&lt;/strong&gt;, although that will no longer be necessary from August 2021.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Microsoft officially announced that it will &lt;a href="https://techcommunity.microsoft.com/t5/microsoft-365-blog/microsoft-365-apps-say-farewell-to-internet-explorer-11-and/ba-p/1591666"&gt;stop support for IE11&lt;/a&gt; and we will have to do the same, for our own health 😂&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As &lt;em&gt;Date.parse&lt;/em&gt; only handles &lt;strong&gt;ISO 8601&lt;/strong&gt; properly since ES5, to support IE9 we need libraries that use &lt;strong&gt;their own regex solution&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://moment.github.io/luxon/"&gt;Luxon&lt;/a&gt; - A &lt;strong&gt;powerful&lt;/strong&gt;, &lt;strong&gt;modern&lt;/strong&gt;, and &lt;strong&gt;friendly wrapper&lt;/strong&gt; for Javascript dates and times (from the creators of moment).&lt;/p&gt;

&lt;p&gt;It also has a guide to help moment users to understand the new way of working: &lt;a href="https://moment.github.io/luxon/docs/manual/moment.html"&gt;https://moment.github.io/luxon/docs/manual/moment.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@js-joda/core"&gt;JS-Joda&lt;/a&gt; - An immutable date and time library for JavaScript. It provides a &lt;strong&gt;simple&lt;/strong&gt;, &lt;strong&gt;domain-driven&lt;/strong&gt; and &lt;strong&gt;clean API&lt;/strong&gt; based on the ISO calendar system.&lt;/p&gt;

&lt;p&gt;It comes with built-in parsers for ISO 8601 and supports ECMAScript 5 browsers down to IE9.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzxsz8fa4anit7gixpkoe.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzxsz8fa4anit7gixpkoe.jpg" alt="Meme Internet Explorer" width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Parsing
&lt;/h3&gt;

&lt;p&gt;When it comes to &lt;strong&gt;EPOCH Time Parsing&lt;/strong&gt;, most libraries do it properly, but that doesn't mean that there're some libraries that manage to do it faster:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An &lt;strong&gt;epoch&lt;/strong&gt; is a date and time from which a computer measures system time. The &lt;strong&gt;Unix epoch&lt;/strong&gt; is the number of seconds that have elapsed since January 1, 1970.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://date-fns.org/"&gt;Date fns&lt;/a&gt; - Provides the most &lt;strong&gt;comprehensive&lt;/strong&gt;, &lt;strong&gt;simple&lt;/strong&gt; and &lt;strong&gt;consistent&lt;/strong&gt; toolset for manipulating JavaScript dates in a browser &amp;amp; Node.js. Date-fns is fast so users will have the best user experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Format
&lt;/h3&gt;

&lt;p&gt;If we are concerned about &lt;strong&gt;formatting&lt;/strong&gt; dates, &lt;strong&gt;Intl.DateTimeFormat&lt;/strong&gt; or the &lt;strong&gt;methods&lt;/strong&gt; provided by &lt;strong&gt;Date&lt;/strong&gt; should be enough, but in case we need a library for other functionalities and we want to remain consistent throughout the project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://day.js.org/"&gt;Day.js&lt;/a&gt; - Fast &lt;strong&gt;2kB&lt;/strong&gt; alternative, is a &lt;strong&gt;minimalist&lt;/strong&gt; JavaScript library that parses, validates, manipulates, and displays dates and times for modern browsers with a largely &lt;strong&gt;Moment.js-compatible API&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you use Moment.js, you already know how to use Day.js.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://formatjs.io/docs/guides/develop"&gt;Format.js&lt;/a&gt; is a &lt;strong&gt;modular collection&lt;/strong&gt; of JavaScript libraries for internationalization that are &lt;strong&gt;focused on formatting&lt;/strong&gt; numbers, dates, and strings for displaying to people.&lt;/p&gt;

&lt;p&gt;A set of core libraries built on the &lt;strong&gt;JavaScript Intl&lt;/strong&gt; built-ins and industry-wide &lt;strong&gt;i18n standards&lt;/strong&gt;, plus a set of integrations for common template and component libraries.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Date time maths
&lt;/h3&gt;

&lt;p&gt;But when our project requires to do &lt;strong&gt;maths with dates&lt;/strong&gt;, we need a more powerful library to facilitate the operations and make it easier, without losing performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;JS-Joda&lt;/strong&gt; is still the one that gives the &lt;strong&gt;best performance&lt;/strong&gt; results. But taking into account that it is &lt;strong&gt;not modular&lt;/strong&gt;, we must be sure about whether it is necessary. Although it must be said that its roadmap includes a plan for reducing its size.&lt;/p&gt;

&lt;p&gt;Support for the domain models &lt;em&gt;LocalDate&lt;/em&gt;, &lt;em&gt;LocalDateTime&lt;/em&gt;, &lt;em&gt;ZonedDateTime&lt;/em&gt;, &lt;em&gt;Instant&lt;/em&gt;, &lt;em&gt;Duration&lt;/em&gt; and &lt;em&gt;Period&lt;/em&gt;. Also, supports &lt;em&gt;IANA timezone&lt;/em&gt;, adding the plugin &lt;a href="https://github.com/js-joda/js-joda/tree/master/packages/timezone"&gt;@js-joda/timezone&lt;/a&gt; you'll have access to the IANA timezone database with all the timezones available.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Package size
&lt;/h3&gt;

&lt;p&gt;If, on the other hand, &lt;strong&gt;size&lt;/strong&gt; is the most important factor, and Date and Intl are not enough, a modular library with &lt;strong&gt;tree-shaking&lt;/strong&gt; or a &lt;strong&gt;light-weight&lt;/strong&gt; library may be the best choice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Day.js&lt;/strong&gt; - 2kB, less JavaScript to download, parse and execute, leaving more time for your code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Date fns&lt;/strong&gt; - In this library, you can pick what you need and stop bloating your project with useless functionality. It works well with &lt;strong&gt;modern module bundlers&lt;/strong&gt; such as webpack, Browserify, or Rollup and supports &lt;strong&gt;tree-shaking&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Immutable
&lt;/h3&gt;

&lt;p&gt;One thing that is important to know is that we left behind a library that mutated the objects we created, which could only lead to errors. From now on we will work with immutable objects!!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An &lt;strong&gt;immutable object&lt;/strong&gt; is an object whose state &lt;strong&gt;cannot be modified after&lt;/strong&gt; it is &lt;strong&gt;created&lt;/strong&gt;. This is in contrast to a mutable object, which can be modified after it is created.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How I got rid of moment in my old projects
&lt;/h2&gt;

&lt;p&gt;As I told you before, in my website I only had a couple of uses, so it was very easy to change. But in another project, I had a few problems with daylight savings and timezones.&lt;/p&gt;

&lt;p&gt;In order not to forget, I'll explain the problems and the solutions I found without using any library:&lt;/p&gt;

&lt;h3&gt;
  
  
  Formatting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Format I wanted: &lt;strong&gt;Jan 2021&lt;/strong&gt; (Short month and year)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="c1"&gt;// How it comes from my headlessCMS Storyblok&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;finishDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2021-01-31&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

  &lt;span class="c1"&gt;// -- Before&lt;/span&gt;
  &lt;span class="nf"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finishDate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;MMM YYYY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="c1"&gt;// -- After&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finishDate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toLocaleDateString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en-GB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;month&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;year&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="c1"&gt;// or (equivalent with Intl)&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Intl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DateTimeFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en-GB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;month&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;year&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finishDate&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Format I wanted: &lt;strong&gt;Sunday, 31 January 2021&lt;/strong&gt; (Name of the day, day number, long month and year)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="c1"&gt;// How it comes from my headlessCMS Storyblok&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;finishDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2021-01-31&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

  &lt;span class="c1"&gt;// -- Before&lt;/span&gt;
  &lt;span class="nf"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finishDate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dddd, D MMMM YYYY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// -- After&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finishDate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toLocaleDateString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en-GB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;weekday&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;long&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;year&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;month&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;long&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;day&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="c1"&gt;// or (equivalent with Intl)&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Intl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DateTimeFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en-GB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;weekday&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;long&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;year&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;month&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;long&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;day&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finishDate&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When it comes to learn the options of Intl.DateTimeFormat, this &lt;a href="https://devhints.io/wip/intl-datetime"&gt;cheatsheet&lt;/a&gt; has been a great help 😍&lt;/p&gt;

&lt;h3&gt;
  
  
  Difference (Period of time)
&lt;/h3&gt;

&lt;p&gt;On my website, I've represented the &lt;strong&gt;period of time&lt;/strong&gt; I have been in each company. For that, I've calculated the difference between the entrance and leaving date:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz4nwhu278e7j783u3xy1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz4nwhu278e7j783u3xy1.jpg" alt="Period of time example" width="646" height="264"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// -- Before&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;start_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YYYYMMDD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;finish&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;finish_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YYYYMMDD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;diff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;diff&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;formatDiff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;year&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;diff&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;years&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;diff&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;months&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;formatDiff&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; years &amp;amp; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;month&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; months`&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;formatDiff&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; years`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;formatDiff&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;month&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; months`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;formatDiff&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// -- After&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;start_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;finish&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;finish_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;diff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;formatDiff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;year&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;diff&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getFullYear&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;getFullYear&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;// 1970&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;diff&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getMonth&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;formatDiff&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; years &amp;amp; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;month&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; months`&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;formatDiff&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; years`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;formatDiff&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;month&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; months`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;formatDiff&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once I got what I wanted, I set out to measure the times, to see if the change was also worthwhile in terms of performance. To my surprise, the change was much more than noticeable, going from ~0.10ms in moment to ~0.045ms using Date 😱&lt;/p&gt;

&lt;p&gt;I measured it using &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Performance/now"&gt;performance.now()&lt;/a&gt; as follow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;startTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;performance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;// -- Code calculating difference between dates&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;endTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;performance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;endTime&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;startTime&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Result in milliseconds&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;If you've calculated time periods in a different way, I would love to see your solution 😍, you can send me a DM at &lt;a href="https://twitter.com/dawntraoz"&gt;@dawntraoz&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Working with Timezones
&lt;/h3&gt;

&lt;p&gt;In backend, the common way to store a date in a database is in &lt;strong&gt;UTC&lt;/strong&gt; format, so far so good.&lt;/p&gt;

&lt;p&gt;But, when I created an instance of Date with the string coming from the DB, the result was set up to the browser's time zone.&lt;/p&gt;

&lt;p&gt;The problem was related to the string coming from the DB, it didn't have any of the formats detected as UTC by Date. Adding 'Z' at the end of the string solved the issue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dbDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2021-01-25 00:10:16.2451106&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Problem: UTC 0, it's not the hour we set up&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;incorrectUTC&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dbDate&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;incorrectUTC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toUTCString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// "Sun, 24 Jan 2021 23:10:16 GMT"&lt;/span&gt;

&lt;span class="c1"&gt;// Solution: Z added&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;correctUTC&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;dbDate&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;Z`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;correctUTC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toUTCString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// "Mon, 25 Jan 2021 00:10:16 GMT"&lt;/span&gt;

&lt;span class="c1"&gt;// -- Date from my TimeZone (CET)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;correctUTC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// "Mon Jan 25 2021 01:10:16 GMT+0100 (Central European Standard Time)"&lt;/span&gt;

&lt;span class="c1"&gt;// -- Date from a chosen TimeZone (America/New_York)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;americaDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;correctUTC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLocaleString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en-GB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;weekday&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;month&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;year&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;day&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;minute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;second&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;numeric&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;timeZone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;America/New_York&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;timeZoneName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;americaDate&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "Sun, 24 Jan 2021, 19:10:16 GMT-5"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While researching what was going on, I found in the documentation of &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#using_date.parse"&gt;Date.parse in MDN&lt;/a&gt; the root of the problem:&lt;/p&gt;

&lt;p&gt;The first string, according to ES5, will imply UTC time, and the others are specifying UTC timezone via the ISO date specification ('Z' and '+00:00')&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2019-01-01&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2019-01-01T00:00:00.000Z&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2019-01-01T00:00:00.000+00:00&lt;/span&gt;&lt;span class="dl"&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 following call, which does not specify a time zone will be set to 2019-01-01 at 00:00:00 in the &lt;strong&gt;local timezone of the system&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2019-01-01T00:00:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Timezones + Daylight saving rules
&lt;/h3&gt;

&lt;p&gt;Another issue I came up while working with native Date.&lt;/p&gt;

&lt;p&gt;Using an &lt;strong&gt;offset to calculate Timezone is a wrong approach&lt;/strong&gt;, and you will always encounter problems while using it. Time zones and &lt;strong&gt;daylight saving rules may change&lt;/strong&gt; on several occasions during a year, and it's difficult to keep up with changes.&lt;/p&gt;

&lt;p&gt;To get the system's &lt;a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"&gt;IANA timezone&lt;/a&gt; in JavaScript, you should use &lt;strong&gt;Intl TimeZone&lt;/strong&gt; instead of Date offset:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Not what we need - Doesn't take into account daylight saving rules&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;offset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;()).&lt;/span&gt;&lt;span class="nf"&gt;getTimezoneOffset&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Solution&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Intl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DateTimeFormat&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;resolvedOptions&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;timeZone&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But even though I have decided to use Date and Intl in my projects, I still have the itch to try out the library &lt;a href="https://github.com/spencermountain/spacetime"&gt;Spacetime&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spacetime&lt;/strong&gt; is a solution without Intl that calculate time in remote timezones, support daylight savings, leap years, and hemispheres. I have to take a look at it and put it into practice 👀 Share with me your thoughts if you already tried it!!&lt;/p&gt;

&lt;h2&gt;
  
  
  Bye Bye moment  👋
&lt;/h2&gt;

&lt;p&gt;And, well, we've come to the end, we've to leave moment behind. But, thanks to this library, many others have made their way to make our community a better place.&lt;/p&gt;

&lt;p&gt;It only remains for me to say, thanks moment for everything you solved for us in its day and goodbye!!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fogguph0oi83cvouuvzp7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fogguph0oi83cvouuvzp7.jpg" alt="Vue moment library" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dates</category>
      <category>performance</category>
      <category>libraries</category>
      <category>moment</category>
    </item>
    <item>
      <title>2020 in review</title>
      <dc:creator>Alba Silvente Fuentes</dc:creator>
      <pubDate>Thu, 31 Dec 2020 10:46:45 +0000</pubDate>
      <link>https://dev.to/dawntraoz/2020-in-review-4bom</link>
      <guid>https://dev.to/dawntraoz/2020-in-review-4bom</guid>
      <description>&lt;p&gt;Well, the 2020 is coming to an end, and I would like to tell you how my year has been.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1344208763247603714-219" src="https://platform.twitter.com/embed/Tweet.html?id=1344208763247603714"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1344208763247603714-219');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1344208763247603714&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Since it's been a crazy year, I'm going to start at the beginning to bring order and clear my head.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This year began in &lt;strong&gt;Alicante&lt;/strong&gt; (Spain), the city where I had lived all my life.&lt;/p&gt;

&lt;p&gt;At that time, I was working remotely as a &lt;strong&gt;Senior Frontend developer&lt;/strong&gt; for an Irish company called &lt;a href="http://square1.io/"&gt;Square1 Software&lt;/a&gt;. In the evenings, once I finished work, I used to go to &lt;strong&gt;Hip Hop&lt;/strong&gt; and &lt;strong&gt;Afrohouse&lt;/strong&gt; classes at &lt;a href="http://www.sualdance.com/"&gt;Sual Dance&lt;/a&gt; 💃&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgbx8uynlzutctnft2778.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgbx8uynlzutctnft2778.jpg" alt="Sual Dance lessons" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But that January something happened that changed my life completely: my boyfriend got a job offer from a company in &lt;strong&gt;Amsterdam&lt;/strong&gt;. So the first thing I did was to ask my company if it was possible for me to go with him and work remotely from The Netherlands. Guess what the answer was? 🤩&lt;/p&gt;

&lt;h2&gt;
  
  
  Moving
&lt;/h2&gt;

&lt;p&gt;January and February were the months of &lt;strong&gt;moves&lt;/strong&gt;, &lt;strong&gt;goodbyes&lt;/strong&gt; and &lt;strong&gt;headaches&lt;/strong&gt;. Looking for a house, paying exorbitant deposits, looking for transport for the things we had accumulated living together, saying goodbye to friends, dance partners, family, notifying the landlady of our departure, ... It was &lt;strong&gt;chaos&lt;/strong&gt; and stress... but we were going to Amsterdam!&lt;/p&gt;

&lt;p&gt;Once we had arranged everything, it was time to get on a plane and come to Amsterdam. Yes, a week before the COVID came into our lives, perfect 😪&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fajj0jof20z8h7it39soh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fajj0jof20z8h7it39soh.jpg" alt="Amsterdam Center in COVID" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will not deny that the global pandemic complicated things quite a bit. I had planned to continue working for Spain until I had adapted, but of course, with that situation I had to &lt;strong&gt;register&lt;/strong&gt; ASAP. So I looked for a &lt;strong&gt;job&lt;/strong&gt; and &lt;a href="https://blueharvest.io/"&gt;Blue Harvest&lt;/a&gt;, the company where I currently work as a &lt;strong&gt;Senior Consultant&lt;/strong&gt;, gave me the opportunity.&lt;/p&gt;

&lt;p&gt;I got the contract and finally, after three months of agony and uncertainty, I got an appointment at the city hall and became an &lt;strong&gt;official citizen&lt;/strong&gt; of the Netherlands.&lt;/p&gt;

&lt;p&gt;In June I finished at Square1 and started working at BH. And you will say, but between March and June, in the middle of quarantine in a new country, what did you do?&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating my blog
&lt;/h2&gt;

&lt;p&gt;Well, after the pandemic all my &lt;strong&gt;plans&lt;/strong&gt;: attending tech events, seeing my favorite artists in concert, attending Hip Hop lessons at some cool school, were &lt;strong&gt;cancelled&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So I decided to spend my time on something I had always been looking forward to, but always procastinating: &lt;strong&gt;my own website&lt;/strong&gt; with a blog and a portfolio.&lt;/p&gt;

&lt;p&gt;I decided not to make my life too complicated, use the technologies I was familiar with and look for a simple CMS that would allow me to dynamize my blog without much effort. So &lt;a href="https://tailwindcss.com/"&gt;TailwindCSS&lt;/a&gt;, as my faithful assistant in &lt;strong&gt;design&lt;/strong&gt;, &lt;a href="https://nuxtjs.org/"&gt;Nuxt&lt;/a&gt;, as the &lt;strong&gt;engine&lt;/strong&gt; of my website, and &lt;a href="https://www.storyblok.com/"&gt;Storyblok&lt;/a&gt;, my &lt;strong&gt;dynamizer&lt;/strong&gt;, were my choices.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv92c3ltbatc5eolrbhdr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv92c3ltbatc5eolrbhdr.jpg" alt="" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As I was clear that my website would be invisible to many people, and my goal was to create content that would be useful to me, but also to others who were struggling with the same things I was. I decided to duplicate my content in &lt;a href="https://dev.to/dawntraoz"&gt;DEV&lt;/a&gt; using canonical URLs (advice given by &lt;a href="https://twitter.com/emmabostian"&gt;Emma Bostian&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqh93gaugigivs65hqfi3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqh93gaugigivs65hqfi3.jpg" alt="" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And, as if that wasn't enough, I decided to try a third one: &lt;a href="https://dawntraoz.hashnode.dev/"&gt;Hashnode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Obviously, it was becoming untenable and I needed a &lt;strong&gt;single place&lt;/strong&gt; to start writing, and then already copy/paste on each platform with a CTRL+A. Here came into play our beloved &lt;a href="https://www.notion.so/"&gt;Notion&lt;/a&gt;, where I created a custom blog with the necessary fields for each platform.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7o35n1nl6g4rwc7dpogj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7o35n1nl6g4rwc7dpogj.jpg" alt="" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Throughout this time I have created more posts than I could have imagined. It has been necessary to list them in this post and it has been difficult to remember them 😂 But, obviously, as an expert in stalking people I have stalked myself to show you below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Articles
&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;March&lt;/strong&gt; I started writing, I set out to create one post every week, so that month I wrote two trying to explain concepts that cost me at the time, with case studies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/alignment-flexbox"&gt;Alignment with Flexbox&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/use-svg"&gt;Use SVG&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;strong&gt;April&lt;/strong&gt;, I came up with the idea of contacting one of my best friends (&lt;a href="https://www.instagram.com/rocio___pascual/"&gt;Rocío Pascual&lt;/a&gt;), who was starting her practice in web design, so she could create a small design in &lt;a href="https://www.sketch.com/"&gt;&lt;strong&gt;Sketch&lt;/strong&gt;&lt;/a&gt; that I could pass to code. In the articles I explain how to go from a design to &lt;strong&gt;TailwindCSS&lt;/strong&gt; and &lt;strong&gt;VUE&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/from-sketch-to-tailwindcss"&gt;From Sketch to TailwindCSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/from-sketch-to-vue-components"&gt;From Sketch to Vue Components&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same month &lt;a href="https://twitter.com/danywalls"&gt;Dany Paredes&lt;/a&gt;, a twitter follower who was very supportive of my work (he still doing it 🤗), suggested me to make an &lt;strong&gt;npm package&lt;/strong&gt; with a component I had created for my blog. I thought it was a great idea and I decided to explain the process I needed to follow in this post:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/5-steps-to-publish-my-first-npm-package"&gt;5 Steps to publish my first npm package&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;strong&gt;May&lt;/strong&gt;, I needed fresh and new ideas. So, I went on &lt;a href="https://twitter.com/dawntraoz"&gt;twitter&lt;/a&gt; to ask what they would like to see in my content and many came to the same conclusion: &lt;em&gt;A dashboard made with TailwindCSS&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I thought it was a great idea to exploit a bit more the &lt;strong&gt;Tailwind&lt;/strong&gt; features. By the meantime, I added &lt;strong&gt;Nuxt&lt;/strong&gt; and &lt;strong&gt;Storyblok&lt;/strong&gt; to the tutorials to create a more complete project. These are the resultant posts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/create-a-dashboard-with-tailwindcss-part-1"&gt;Create a dashboard with TailwindCSS - Part 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/create-a-dashboard-with-tailwindcss-part-2"&gt;Create a dashboard with TailwindCSS - Part 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/create-a-dashboard-with-tailwindcss-adding-storyblok"&gt;Create a dashboard with TailwindCSS - Adding Storyblok&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/create-a-dashboard-with-tailwindcss-part-3"&gt;Create a dashboard with TailwindCSS - Part 3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;strong&gt;June&lt;/strong&gt;, I had the opportunity to collaborate on two projects that I admire. One that I've already told you about is &lt;strong&gt;Storyblok&lt;/strong&gt;, and the other is &lt;a href="https://vuedose.tips/"&gt;&lt;strong&gt;VueDose.tips&lt;/strong&gt;&lt;/a&gt;, which for those of you who don't know it, is a blog/newsletter with articles on good practices at VUE. As I was able to choose my &lt;strong&gt;proposal&lt;/strong&gt;, I talked about two &lt;strong&gt;topics&lt;/strong&gt; that I was very interested in showing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storyblok article: &lt;a href="https://www.storyblok.com/tp/tailwindcss-express-js-amp-sites"&gt;How to use TailwindCSS, Express.js and Storyblok for AMP powered websites&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;VueDose article: &lt;a href="https://vuedose.tips/how-to-structure-a-vue-js-app-using-atomic-design-and-tailwindcss"&gt;How to structure a Vue.js app using Atomic Design and TailwindCSS&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the middle of June to the end of &lt;strong&gt;July&lt;/strong&gt; I was doing my new job as a Senior Consultant and improving my English, that there are so many accents that one never quite learns 😅.&lt;/p&gt;

&lt;p&gt;But in order not to lose the habit and to give a little content to my followers, I told them about a project I have in hand with my boyfriend (backender in .NET):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/presenting-our-new-project-is-not-my-bug"&gt;Presenting our new project Is!MyBug&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And, as I went along, I told what I had achieved and wrote down what I was doing, so that I could have it as a guide for tomorrow and help more people. To my surprise the best posts and the &lt;strong&gt;best results&lt;/strong&gt; so far:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/how-to-deploy-a-nuxt-full-static-site-in-digitalocean"&gt;How to deploy a Nuxt full static site in DigitalOcean&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/blog/how-to-add-ci-to-frontend-project-with-github-actions"&gt;How to add CI with GitHub Actions - Nuxt case study&lt;/a&gt; (Runner up award at the GitHub Actions Hackathon)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the end of &lt;strong&gt;October&lt;/strong&gt; I decided to add a component on my website, to show the GitHub repositories that I had been creating throughout the year. And, while we were at it, I created a small component in VUE 3 and wrote an article about it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/blog/how-to-show-your-github-repos-vue3-tailwindcss-dark-mode"&gt;How to show your GitHub repos VUE 3 with TailwindCSS dark mode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If more things couldn't happen in a single year, they did, believe me, they did.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ambassador
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;An ambassador is simply &lt;strong&gt;someone who speaks positively about your company&lt;/strong&gt;. Ambassadors on social media shout-out your business, show off their latest purchases and recommend you to their followers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the case of a technology it is more about &lt;strong&gt;sharing knowledge and making the product&lt;/strong&gt; (framework, healdessCMS,...) &lt;strong&gt;known&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Although I was &lt;strong&gt;not aware&lt;/strong&gt; at that time that &lt;strong&gt;this could happen&lt;/strong&gt; to me, it was clear that I had invested my &lt;strong&gt;time&lt;/strong&gt; and &lt;strong&gt;energy&lt;/strong&gt; in creating technology content that I was passionate about. Well, it had its &lt;strong&gt;reward&lt;/strong&gt;, my goodness, it did!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/SamuelSnopko"&gt;SamuelSnopko&lt;/a&gt; proposed me to join the &lt;strong&gt;Storyblok Ambassadors program&lt;/strong&gt;, hence the collaboration I told you about earlier 😍. I agreed head on, I &lt;strong&gt;couldn't be happier&lt;/strong&gt; or so I thought.&lt;/p&gt;

&lt;p&gt;After a month or so, time has passed so quickly that I can't tell you 🤣 &lt;a href="https://twitter.com/debs_obrien"&gt;Debbie O'brien&lt;/a&gt;, my idol, my goddess (the woman I admire most after my mother and sister), proposed me to join &lt;strong&gt;Nuxt&lt;/strong&gt;'s newly opened &lt;strong&gt;Ambassador Program&lt;/strong&gt;. I still haven't assimilated it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmg5ohaue1o7ri2ok6tpa.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmg5ohaue1o7ri2ok6tpa.jpg" alt="" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=WyG_h5jtYX8&amp;amp;t=1s"&gt;Nuxt Ambassador Coffee in Youtube&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Hackathons
&lt;/h2&gt;

&lt;p&gt;In case there was a lack of work outside office hours, I decided to participate in several Hackathons that took place during the year.&lt;/p&gt;

&lt;p&gt;First, I decided to present the workflow I had done for the Is!MyBug project at the &lt;strong&gt;GitHub Actions Hackathon&lt;/strong&gt;, which took place in Dev.to. To my surprise, the day they created the &lt;a href="https://dev.to/devteam/github-actions-hackathon-winners-announced-38o2"&gt;post to say the winners&lt;/a&gt; my face was among the runners-up, what a blast 😱.&lt;/p&gt;

&lt;p&gt;If that happened at the end of September, in October the &lt;a href="https://hacktoberfest.digitalocean.com/"&gt;&lt;strong&gt;Hacktoberfest&lt;/strong&gt;&lt;/a&gt; appeared and I couldn't miss the opportunity to collaborate on &lt;strong&gt;open source&lt;/strong&gt; projects. Thanks to &lt;a href="https://www.digitalocean.com/"&gt;DigitalOcean&lt;/a&gt; and &lt;strong&gt;DEV&lt;/strong&gt; for making these cool initiatives a reality, and allowing me to &lt;strong&gt;plant a tree&lt;/strong&gt; in the middle of a global pandemic.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Until that moment I had only collaborated in uses.tech and nuxtjs.org docs translations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To narrate my adventures in the Hackathon, I wrote a post mentioning the projects where I collaborated: &lt;a href="https://dev.to/blog/my-contributions-in-this-year-2020-hacktoberfest"&gt;My contributions in this year 2020 Hacktoberfest&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;December&lt;/strong&gt;, &lt;strong&gt;AdventOfCode 2020&lt;/strong&gt; started and many people came together in a group to do it. I decided to join in and start solving the puzzles in &lt;strong&gt;javascript&lt;/strong&gt;, but creating a little showcase in &lt;strong&gt;VUE&lt;/strong&gt; to make it more fun.&lt;/p&gt;

&lt;p&gt;As that same month more things happened, I could only do 9 days, but here they are: &lt;a href="https://github.com/Dawntraoz/advent-of-code-2020"&gt;https://github.com/Dawntraoz/advent-of-code-2020&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the things that happened was &lt;strong&gt;DigitalOcean App Platform Hackathon&lt;/strong&gt; in DEV. &lt;br&gt;
I came very up and participated in the RandomRulette category, creating a &lt;a href="https://dev.to/blog/random-potato-mood-generator-do-app-platform"&gt;Potatizer - Random Potato Mood generator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F87xgu0cac1oj8rwni5cv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F87xgu0cac1oj8rwni5cv.png" alt="" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They have been very &lt;strong&gt;cool experiences&lt;/strong&gt; and that I recommend to everyone! 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  Talks &amp;amp; Podcasts
&lt;/h2&gt;

&lt;p&gt;As if that wasn't enough, &lt;strong&gt;November&lt;/strong&gt; was the month for podcasts and interviews.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/ianaya89"&gt;Nacho Anaya&lt;/a&gt; proposed me to participate in his livestream channel VueVear as an interviewee, and since it was in my native language (Spanish), I didn't even think about it, I said yes. Here it is: &lt;a href="https://www.youtube.com/watch?v=S4xoR-FmVU8"&gt;VueVear S01E12 - Interview with Alba Silvente 💃&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I appeared in the podcast of &lt;strong&gt;CafeConTech&lt;/strong&gt;, in Spanish, talking a little about my life as a woman web developer and how I became an ambassador, after arriving here you already know 😅. You can take a look at &lt;a href="https://www.cafecon.tech/1081172/6281227-especial-junto-a-alba-silvente-ambassador-at-nuxtjs-and-storyblok"&gt;Especial junto a Alba Silvente - Ambassador at NuxtJS and Storyblok&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To my surprise a super cool, unicorn-filled community 🦄, called Open Source Weekends (&lt;a href="https://twitter.com/os_weekends"&gt;OSW&lt;/a&gt;) proposed me to participate in one of their live events, along with 3 other speakers who gave some incredible talks: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/miriamgonp"&gt;Miriam Gonzalez&lt;/a&gt; (my top unicorn) talking about her love story with Design &amp;amp; Development.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/javierabadia"&gt;Javier Abadia&lt;/a&gt; (a js jedi) talking about evocative names better than flimsy names.&lt;/li&gt;
&lt;li&gt;Jonathan OVH talking about the &lt;a href="https://www.ovh.com/world/"&gt;OVH&lt;/a&gt;'s Startups program.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can check it out at &lt;a href="https://www.youtube.com/watch?v=2dPM7MfHcfc"&gt;OSW Online Sessions #6 - Noviembre 2020&lt;/a&gt;, also in Spanish.&lt;/p&gt;

&lt;p&gt;And to end &lt;strong&gt;November&lt;/strong&gt;, one of the podcasts that scared me the most, but of which I am &lt;strong&gt;most proud&lt;/strong&gt;, came out. My first podcast in English on &lt;strong&gt;#viewsonvue&lt;/strong&gt;: &lt;a href="https://devchat.tv/views-on-vue/vue-130-nuxt-and-storyblok-with-alba-silvente-fuentes/"&gt;VUE 130: Nuxt and Storyblok with Alba Silvente Fuentes&lt;/a&gt;. Amazing 🚀&lt;/p&gt;

&lt;p&gt;And to end the year with joy, I got my &lt;strong&gt;first tech talk&lt;/strong&gt; in Spanish at &lt;a href="https://twitter.com/wtmbcn"&gt;WTM Barcelona&lt;/a&gt;. In which I talked about &lt;a href="https://twitter.com/wtmbcn/status/1335243859115249666"&gt;Let's go back to Full Static using NuxtJS and Storyblok&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Certifications
&lt;/h2&gt;

&lt;p&gt;When working as a consultant, I had the obligation to obtain the necessary certifications to qualify. Starting by &lt;a href="https://www.linkedin.com/company/axelos-global-best-practice/"&gt;ITIL V4 Foundation&lt;/a&gt; and following with &lt;a href="https://www.youracclaim.com/badges/9fb90299-fbbc-49fa-9b91-089b0b0f84f9?source=linked_in_profile"&gt;Azure Fundamentals AZ-900&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It was not easy at all for me, I had no experience in Azure or knowledge of IT practices, so I am very proud to have taken them out 💜&lt;/p&gt;

&lt;h2&gt;
  
  
  Meetups
&lt;/h2&gt;

&lt;p&gt;To finish this long post of 2020, here is the meetup that I will &lt;strong&gt;co-organize&lt;/strong&gt; with &lt;a href="https://twitter.com/jhvanderschee"&gt;Joost van der Schee&lt;/a&gt;, here in Amsterdam, for &lt;a href="https://jamstack.org/"&gt;Jamstack&lt;/a&gt; lovers: &lt;a href="https://www.meetup.com/es-ES/jamstack-amsterdam/"&gt;Jamstack Amsterdam&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F73wo9lbe7kqp2kge5bkg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F73wo9lbe7kqp2kge5bkg.png" alt="" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Well, we are done! It's been a crazy year, and I'm sure I'm forgetting something xD&lt;/p&gt;

&lt;p&gt;But I have to say that apart from the few times that I have been able to breathe fresh air, the little that I have seen my family and friends and the parties that we have missed, it has been the &lt;strong&gt;best professional year of my life&lt;/strong&gt;. That's for sure.&lt;/p&gt;

&lt;p&gt;And I don't just owe it to my hard work and dedication, I owe it to the &lt;strong&gt;Vue, Nuxt, Storyblok community&lt;/strong&gt;. To &lt;strong&gt;people who support&lt;/strong&gt; the work of others, to people who &lt;strong&gt;give constructive feedback&lt;/strong&gt;, to people who &lt;strong&gt;do not allow you to stay in your comfort&lt;/strong&gt; zone and drive you. If I have come this far it is thanks to the people I surround myself with, &lt;strong&gt;a thousand thanks&lt;/strong&gt; and I hope to support others as much as you have supported me 💜&lt;/p&gt;

&lt;p&gt;✨Happy New Year 2021✨, will it go better or we will make it go better together!&lt;/p&gt;

&lt;p&gt;I 💗 YOU&lt;/p&gt;

</description>
      <category>review</category>
      <category>2020</category>
      <category>nuxt</category>
      <category>storyblok</category>
    </item>
  </channel>
</rss>
