<?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: Lucas G. Terracino</title>
    <description>The latest articles on DEV Community by Lucas G. Terracino (@nomade55).</description>
    <link>https://dev.to/nomade55</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%2F227131%2Fccc4cf45-e99d-4e06-b7b5-64fb3eaa6d79.jpeg</url>
      <title>DEV Community: Lucas G. Terracino</title>
      <link>https://dev.to/nomade55</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nomade55"/>
    <language>en</language>
    <item>
      <title>Building an open source skill showcase with Deno</title>
      <dc:creator>Lucas G. Terracino</dc:creator>
      <pubDate>Thu, 21 Nov 2024 18:16:52 +0000</pubDate>
      <link>https://dev.to/nomade55/building-an-open-source-skill-showcase-with-deno-2m30</link>
      <guid>https://dev.to/nomade55/building-an-open-source-skill-showcase-with-deno-2m30</guid>
      <description>&lt;p&gt;Let's start by saying something which is not new: the Javascript ecosystem has become quite complicated. Whether your afternoon was completely consumed by tweaking webpack, creating a gulp pipeline, choosing your next CSS framework, adding typescript support to your old side-project or just navigating the ever expanding frontend framework libraries being born each day, you already know what I mean.&lt;/p&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%2Fuybxvp4ri8rpfn5e28ok.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%2Fuybxvp4ri8rpfn5e28ok.jpg" alt="Js ecosystem is a mess" width="540" height="405"&gt;&lt;/a&gt;&lt;/p&gt;
Explaining to a junior friend how Javascript tooling and runtime work





&lt;h2&gt;
  
  
  Enter Deno 2.0 🦕
&lt;/h2&gt;

&lt;p&gt;I've always been curious about Deno. The Previous version was not truly compatible with npm. The promise of native support for TS is good, but it wasn't something that really made me jump in the Deno 1.X train.&lt;br&gt;
Then, this appeared in my Youtube feed:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/swXWUfufu2w"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
This short and sweet high-production trailer gave me the push I needed to try their latest features.



&lt;h3&gt;
  
  
  What do we build 🛠️?
&lt;/h3&gt;

&lt;p&gt;A tool I'd use, short, and open source &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; &lt;a href="https://github.com/NOMADE55/picto" rel="noopener noreferrer"&gt;Picto&lt;/a&gt;! &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/NOMADE55" rel="noopener noreferrer"&gt;
        NOMADE55
      &lt;/a&gt; / &lt;a href="https://github.com/NOMADE55/picto" rel="noopener noreferrer"&gt;
        picto
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Showcase your skills with flare 🔥
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Picto&lt;/h1&gt;
&lt;/div&gt;
    &lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/NOMADE55/pictopublic/picto.svg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FNOMADE55%2Fpictopublic%2Fpicto.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Easily showcase your skills with flare 🔥&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Picto&lt;/strong&gt; is a tool that generates dynamic images to showcase the programming
languages, technologies, and tools you’ve learned.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🤔 How to create your own &lt;strong&gt;Picto&lt;/strong&gt;?&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;That's easy! Picto allows you to customize the appearance and layout of the
generated image using query parameters.&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;https://mypicto.xyz/icons
    &lt;span class="pl-k"&gt;?&lt;/span&gt;i=php,ruby,javascript,react,laravel
    &lt;span class="pl-k"&gt;&amp;amp;&lt;/span&gt;cols=4&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;i&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Icon identifier&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cols&lt;/td&gt;
&lt;td&gt;string (numeric)&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;Number of columns to display&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;size&lt;/td&gt;
&lt;td&gt;string (numeric)&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;Icon size&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;bg&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Background setting (&lt;code&gt;none&lt;/code&gt; or empty string)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;rounded&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Border radius setting (&lt;code&gt;none&lt;/code&gt;, &lt;code&gt;rounded&lt;/code&gt; or numeric: &lt;code&gt;0&lt;/code&gt;, &lt;code&gt;6&lt;/code&gt;, &lt;code&gt;12&lt;/code&gt;, etc.)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Examples&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;No rounded corners and 2 columns&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/7cf14efe7f071860cecb67a7132a3ee0e7dfd878a380eb1bff40c0d8e91dcdd7/68747470733a2f2f6d79706963746f2e78797a2f69636f6e733f693d68746d6c2c6373732c6a6176617363726970742c707974686f6e26726f756e643d6e6f6e6526636f6c733d322673697a653d3232"&gt;&lt;img src="https://camo.githubusercontent.com/7cf14efe7f071860cecb67a7132a3ee0e7dfd878a380eb1bff40c0d8e91dcdd7/68747470733a2f2f6d79706963746f2e78797a2f69636f6e733f693d68746d6c2c6373732c6a6176617363726970742c707974686f6e26726f756e643d6e6f6e6526636f6c733d322673697a653d3232"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;https://mypicto.xyz/icons?i=html,css,javascript,python&amp;amp;round=none&amp;amp;cols=2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;No background&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/11b88248213bece684676899428a1b1b7d1a85ae6437b7b69059207c7dc794ca/68747470733a2f2f6d79706963746f2e78797a2f69636f6e733f693d616e67756c61722c6373732c707974686f6e2c7675652662673d6e6f6e652673697a653d3232"&gt;&lt;img src="https://camo.githubusercontent.com/11b88248213bece684676899428a1b1b7d1a85ae6437b7b69059207c7dc794ca/68747470733a2f2f6d79706963746f2e78797a2f69636f6e733f693d616e67756c61722c6373732c707974686f6e2c7675652662673d6e6f6e652673697a653d3232"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;https://mypicto.xyz/icons?i=html,css,javascript,python,vue&amp;amp;bg=none&amp;amp;cols=4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;📍 Roadmap&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;WIP: Add theming, light, dark &amp;amp; auto&lt;/li&gt;
&lt;li&gt;Add more icons, of course (Open an Issue to add &lt;em&gt;your&lt;/em&gt; missing icon).&lt;/li&gt;
&lt;li&gt;Add kits/groups (MERN, MEAN, LAMP, etc)&lt;/li&gt;
&lt;li&gt;Improve…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/NOMADE55/picto" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Ok now, for real
&lt;/h3&gt;

&lt;p&gt;My &lt;a href="https://github.com/NOMADE55" rel="noopener noreferrer"&gt;Github profile&lt;/a&gt; icons needed a refresh, especially since they looked quite dull in dark mode.&lt;br&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%2Faad2yv1c26nd0gv6cp2d.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%2Faad2yv1c26nd0gv6cp2d.jpg" alt="A picture of my github profile in dark mode, showing a list of icons that represent the technologies, which doesn't look that good" width="800" height="336"&gt;&lt;/a&gt;&lt;br&gt;
Then, I reread this awesome article &lt;a href="https://owenconti.com/posts/supporting-dark-mode-with-svg-favicons" rel="noopener noreferrer"&gt;about using SVGs in favicons&lt;/a&gt;, that 'intelligently' switches appearances based on the user's preferred color scheme. &lt;br&gt;
The cool things plain CSS can do, huh?&lt;/p&gt;

&lt;p&gt;This gave me an idea 💡&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a bunch of cool SVGs for profile use.&lt;/li&gt;
&lt;li&gt;Use CSS variables to configure important values. Think corners, backgrounds, fill, theme, etc.&lt;/li&gt;
&lt;li&gt;Create a small backend (with Deno!) that will serve these icons if the proper parameters are provided.&lt;/li&gt;
&lt;li&gt;Alter or add &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tags to update SVGs on the fly based on the parameters provided.&lt;/li&gt;
&lt;li&gt;Enjoy ✨.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  How Deno was better than I expected
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🎨🦕 code formatting out of the box. No prettier config here 🙌🏻.&lt;/li&gt;
&lt;li&gt;✅🦕 has linting also out of the box. No eslint here either 😎&lt;/li&gt;
&lt;li&gt;👁🦕 can serve the file locally and watch it's changes. Nodemonwho?&lt;/li&gt;
&lt;li&gt;📦🦕 has compatibility with all the packages in npm I'm already familiar with, plus a few from their own standard library.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Using Deno
&lt;/h3&gt;

&lt;p&gt;If you want Deno to work in your VSCode you need to add their extension and add enable it in settings file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"deno.enable"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Formatting with Deno &lt;small&gt;&lt;a href="https://docs.deno.com/runtime/reference/cli/formatter/" rel="noopener noreferrer"&gt;[docs]&lt;/a&gt;&lt;/small&gt;
&lt;/h3&gt;

&lt;p&gt;If you want Deno to format the code from the CLI it's quite easy actually.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;deno &lt;span class="nb"&gt;fmt&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will format the whole project, but you can scope it to only format one file. &lt;br&gt;
It can also format your files on save like prettier would. Just update your settings file like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"deno.enable"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.formatOnSave"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.defaultFormatter"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"denoland.vscode-deno"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Linting &lt;small&gt;&lt;a href="https://docs.deno.com/runtime/reference/cli/linter/" rel="noopener noreferrer"&gt;[docs]&lt;/a&gt;&lt;/small&gt;
&lt;/h3&gt;

&lt;p&gt;Deno provides lint in your IDE without needing to configure any other extension. That said, they provide a very convenient way to lint your project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;deno serve &lt;span class="nt"&gt;--watch&lt;/span&gt; main.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Serving with Deno &lt;small&gt;&lt;a href="https://docs.deno.com/runtime/reference/cli/serve/" rel="noopener noreferrer"&gt;[docs]&lt;/a&gt;&lt;/small&gt;
&lt;/h3&gt;

&lt;p&gt;Deno has quite a beefy CLI, and serving your app to test locally is a breeze&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;deno serve &lt;span class="nt"&gt;--watch&lt;/span&gt; main.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  That's it?
&lt;/h2&gt;

&lt;p&gt;This is not a huge project, but there is a few more cool things to show and tell, which I'll be doing in future articles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Building dynamic SVGs.&lt;/li&gt;
&lt;li&gt;Using style variables to manipulate &lt;strong&gt;everything&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Theming and using user's color scheme to replace colors.&lt;/li&gt;
&lt;li&gt;Docs and building a reliable source of information for users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I haven't finished the tool yet. You can check the roadmap and even suggest (or contribute cool stuff) in &lt;a href="https://github.com/NOMADE55/picto#-roadmap" rel="noopener noreferrer"&gt;Picto's repository&lt;/a&gt;.&lt;br&gt;
This is an opportunity for me to learn building in public 🌱, so I count on the DEV community to make this experience even better. So if you have any suggestions or comments, let me know 🚀!&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>deno</category>
    </item>
    <item>
      <title>Aprendiendo de los Grandes: El feed de Instagram</title>
      <dc:creator>Lucas G. Terracino</dc:creator>
      <pubDate>Wed, 28 Jul 2021 15:24:06 +0000</pubDate>
      <link>https://dev.to/mates-n-code/aprendiendo-de-los-grandes-el-feed-de-instagram-460l</link>
      <guid>https://dev.to/mates-n-code/aprendiendo-de-los-grandes-el-feed-de-instagram-460l</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;En el proceso de aprender a desarrollar sitios web y utilizar las herramientas más básicas como lo son CSS y HTML, lo más desafiante es elegir ejemplos fáciles que reproducir.&lt;br&gt;
Una web que es sorprendentemente familiar a todos con un moderado nivel de dificultad es Instagram. Vamos a ver como resolvemos muchos de los desafíos detrás de crear su feed y aprender en el camino una o dos cosas.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Lo primero que vamos a hacer es armar el tan conocido y emblemático posteo de Instagram en las diferentes partes que después vamos a maquetas con HTML.&lt;/p&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%2Fmxtzsz9ixyuyce45aubr.jpeg" 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%2Fmxtzsz9ixyuyce45aubr.jpeg" alt="An Instagram Post Breakdown" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🏗 Maquetando
&lt;/h2&gt;

&lt;p&gt;Es bastante claro mirando el posteo, que tenemos&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;un área superior que encabeza el componente donde está el usuario y su foto de perfil&lt;/li&gt;
&lt;li&gt;una sección principal donde está la imagen&lt;/li&gt;
&lt;li&gt;un area inferior donde vamos a poner las acciones, los datos y una sección donde el usuario puede comentar.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ya mismo empezar a maquetar haciendo uso de la etiqueta semántica &lt;code&gt;article&lt;/code&gt; y anidando las futuras secciones usando &lt;code&gt;header&lt;/code&gt;, &lt;code&gt;section&lt;/code&gt; y &lt;code&gt;footer&lt;/code&gt;, las cuales comienzan a darle estructura a nuestro posteo.&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&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;header&amp;gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;section&amp;gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&amp;lt;/footer&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;h3&gt;
  
  
  ¿Por qué no usar muchos div?
&lt;/h3&gt;

&lt;p&gt;Es inevitable el uso de &lt;code&gt;div&lt;/code&gt;, no te castigues si ves que realmente no podes evitarlo, pero es importante saber que utilizar la menor cantidad posible tiene sus beneficios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;El código es mucho más fácil de leer, interpretar y mantener.&lt;/li&gt;
&lt;li&gt;Agregar estilo (CSS) a nuestros componentes se vuelve más sencillo y con menos clases.&lt;/li&gt;
&lt;li&gt;Estás utilizando las herramientas mas avanzadas y correctas para el maquetado.&lt;/li&gt;
&lt;li&gt;Mejores puntajes de SEO ✨&lt;/li&gt;
&lt;li&gt;Habla bien de vos como developer&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Y ¿por qué estas en particular?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;article&lt;/code&gt; es una etiqueta excelente para contenido auto-contenido (como lo es un posteo, un producto, el articulo de un blog, etc).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;section&lt;/code&gt; define una sección dentro de un documento&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;header&lt;/code&gt; representa contenido introductorio o links de navegación&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;footer&lt;/code&gt; es el pie de página o el final del contenido y suele tener información, autor, o contenido relacionado.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🏗 Agregando más elementos
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Header
&lt;/h3&gt;

&lt;p&gt;Necesitamos agregar la imagen para la foto de perfil y un título para nuestro usuario.&lt;br&gt;
También vamos a envolver a la imagen en un &lt;code&gt;div&lt;/code&gt; en caso de que necesitemos manipularla dentro de la estructura sin alterar sus proporciones, y el titular va a contar con un &lt;code&gt;a&lt;/code&gt; para llevarnos al perfil que corresponde.&lt;/p&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%2Fewfvlwqdq5o72eximtwu.jpeg" 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%2Fewfvlwqdq5o72eximtwu.jpeg" alt="Post header" width="800" height="169"&gt;&lt;/a&gt;&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;header&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;img&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="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://avatars.dicebear.com/api/avataaars/alebonzo.svg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://instagram.com/alebonzo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;alebonzo&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Maquetando con Placeholders
&lt;/h4&gt;

&lt;p&gt;Para la imagen de perfil use &lt;strong&gt;&lt;a href="https://avatars.dicebear.com/" rel="noopener noreferrer"&gt;Dicebear Avatars&lt;/a&gt;,&lt;/strong&gt; una librería de imágenes con una amplia cantidad de avatares que podemos usar solo poniendo una URL. Este tipo de librerías &lt;strong&gt;es ideal cuando estamos maquetando y aún no tenemos las imágenes finales&lt;/strong&gt; pero queremos poner algo que denote la &lt;strong&gt;intención que va a tener esa imagen.&lt;/strong&gt; En este caso es el avatar o foto de perfil de un usuario.&lt;/p&gt;

&lt;p&gt;Para usarla ponemos la URL cambiando los valores de &lt;code&gt;category&lt;/code&gt; y &lt;code&gt;seed&lt;/code&gt;. La librería nos va a dar es una imagen diferente para cada &lt;code&gt;seed&lt;/code&gt; dentro de cada categoría.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://avatars.dicebear.com/api/category/seed.svg" rel="noopener noreferrer"&gt;https://avatars.dicebear.com/api/category/seed.svg&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&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%2Fkyqupf76cbwhnutcj853.jpeg" 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%2Fkyqupf76cbwhnutcj853.jpeg" alt="Dicebear Avatars Website" width="800" height="214"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Las categorías están en el link, y el seed puede ser cualquier cosa **URL friendly&lt;/em&gt;* &lt;em&gt;(pst, para los espacios podes-usar-guiones).&lt;/em&gt;*&lt;/p&gt;
&lt;h3&gt;
  
  
  Section
&lt;/h3&gt;

&lt;p&gt;Siendo un poco más fácil, acá solo queremos poner una imagen, y de nuevo vamos a poner un &lt;code&gt;div&lt;/code&gt; que la contenga para poder manipularla sin alterar sus proporciones.&lt;/p&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%2Frculiepwzt0morm7c9nl.jpeg" 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%2Frculiepwzt0morm7c9nl.jpeg" alt="Post main section" width="800" height="485"&gt;&lt;/a&gt;&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;section&amp;gt;&lt;/span&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;"img-wrapper"&lt;/span&gt;&lt;span class="nt"&gt;&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;"https://i.imgur.com/bxPoqdw.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Footer
&lt;/h3&gt;

&lt;p&gt;Vamos a comenzar por poner los iconos en su lugar con &lt;code&gt;svg&lt;/code&gt; (los que nos ahorra tener que hacer iconos para cada tamaño, ya que los SVG son vectores y siempre se van a ver bien) y envolverlos en un &lt;code&gt;div&lt;/code&gt; que los separe del resto de los elementos del footer al que vamos a llamar acciones.&lt;/p&gt;

&lt;p&gt;Vamos a poner en &lt;code&gt;.data&lt;/code&gt; quien le dió like, el creador del contenido con su descripción, y en una etiqueta &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;code&gt;time&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; hace cuanto se posteó.&lt;/p&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%2Fwalevq8uwevxh7ilfkrg.jpeg" 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%2Fwalevq8uwevxh7ilfkrg.jpeg" alt="Post Footer" width="800" height="214"&gt;&lt;/a&gt;&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;footer&amp;gt;&lt;/span&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;"actions"&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;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Like"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 48 48"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Comment"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 48 48"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Share Post"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 48 48"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Save"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 48 48"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&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;"data"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&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;"likes"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Liked by &lt;span class="nt"&gt;&amp;lt;strong&amp;gt;&lt;/span&gt;you&lt;span class="nt"&gt;&amp;lt;/strong&amp;gt;&lt;/span&gt; and &lt;span class="nt"&gt;&amp;lt;strong&amp;gt;&lt;/span&gt;others&lt;span class="nt"&gt;&amp;lt;/strong&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&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;"description"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;strong&amp;gt;&lt;/span&gt;ladyahorro&lt;span class="nt"&gt;&amp;lt;/strong&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;time&amp;gt;&lt;/span&gt;2 hours ago&lt;span class="nt"&gt;&amp;lt;/time&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&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;"comment"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&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;"emote"&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;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 48 48"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Add a comment..."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;Post&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🎨 Agregando estilo
&lt;/h2&gt;

&lt;p&gt;¡Ahora es cuando se pone divertido! Con todo el HTML ya escrito, solo queda agregar estilo a los componentes para que se vean exactamente como queremos.&lt;/p&gt;

&lt;p&gt;Comenzamos por definir la paleta inicial que vamos a utilizar. En este caso en particular, los obtuve directamente de la página de Instagram.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#ffffff&lt;/code&gt;: Blanco, el fondo del articulo.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#dbdbdb&lt;/code&gt;: Gris, para los bordes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#262626&lt;/code&gt;: Negro, para el color de los textos.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#0095f6&lt;/code&gt;: Azul, para el botón.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Comenzamos con el aspecto en general de nuestro posteo, un &lt;strong&gt;fondo&lt;/strong&gt; blanco, un &lt;strong&gt;borde&lt;/strong&gt; gris con las &lt;strong&gt;esquinas ligeramente redondeadas&lt;/strong&gt;. Y en caso de que haya algún elemento lo suficientemente &lt;em&gt;rebelde&lt;/em&gt; como para extenderse sobre el padre, vamos a &lt;strong&gt;ocultarlo&lt;/strong&gt;.&lt;br&gt;
También en caso de que haya más de un posteo al lado del otro, queremos que estén separados entre sí, y para eso usamos márgenes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💡 PRO CSS TIP:&lt;/strong&gt; El selector &lt;code&gt;a + b&lt;/code&gt; selecciona un elemento &lt;strong&gt;b&lt;/strong&gt; que esté inmediatamente después de un elemento &lt;strong&gt;a&lt;/strong&gt;. Esto puede ser usado con cualquier elemento, ya sea una clase, una etiqueta o un id.&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;article&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#dbdbdb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Hacemos uso del selector a + b para seleccionar a cualquier posteo que este seguido de otro, y lo separamos verticalmente desde el lado superior. */&lt;/span&gt;
&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;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;
  
  
  Header
&lt;/h3&gt;

&lt;p&gt;Al header de nuestro posteo le vamos a poner una &lt;strong&gt;borde inferior&lt;/strong&gt; gris del mismo color  que nuestro articulo, un poco de &lt;strong&gt;espacio entre el contenido&lt;/strong&gt; y la caja, y vamos a hacer que los hijos estén &lt;strong&gt;alineados al medio&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Además de quitarle todo el estilo al link, al titular lo vamos a &lt;strong&gt;separar&lt;/strong&gt; de la imagen desde el &lt;strong&gt;lado izquierdo&lt;/strong&gt;, y vamos &lt;strong&gt;redondear los bordes&lt;/strong&gt; de la imagen de perfil*&lt;em&gt;.&lt;/em&gt;*&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;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="nl"&gt;border-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#dbdbdb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&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;500&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#262626&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#262626&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&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;32px&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;32px&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;2px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#262626&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;
  
  
  Section
&lt;/h3&gt;

&lt;p&gt;Para la sección de la foto, vamos a hacer un &lt;code&gt;div&lt;/code&gt; donde poner a nuestra imagen.&lt;br&gt;
Vamos a forzar la relación de aspecto de este elemento a 1:1 usando &lt;strong&gt;&lt;a href="https://mates-n-code.com/relaciones-de-aspecto-perfectas-en-css" rel="noopener noreferrer"&gt;el truco del padding&lt;/a&gt;&lt;/strong&gt;.&lt;br&gt;
Por último, la imagen va a usar &lt;code&gt;object-fit: cover&lt;/code&gt; para que cubra toda la superficie del padre.&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;article&lt;/span&gt; &lt;span class="nt"&gt;section&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;section&lt;/span&gt; &lt;span class="nc"&gt;.img-wrapper&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;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;section&lt;/span&gt; &lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&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="nb"&gt;block&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;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;object-fit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Footer
&lt;/h3&gt;

&lt;p&gt;El &lt;strong&gt;peso tipográfico&lt;/strong&gt; de la etiqueta &lt;code&gt;strong&lt;/code&gt; por defecto es &lt;strong&gt;bolder&lt;/strong&gt; (equivale a 700), así que lo suavizamos un poco al reducirlo a 600*&lt;em&gt;.&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;Lo que vamos a hacer es poner las acciones separadas entre sí con &lt;strong&gt;márgenes&lt;/strong&gt; y de los &lt;strong&gt;bordes&lt;/strong&gt; laterales de la caja con &lt;strong&gt;padding&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;La etiqueta &lt;code&gt;time&lt;/code&gt; va a requerir que le bajemos un poco la intensidad, por lo que en vez de jugar con los colores, sencillamente &lt;strong&gt;le bajamos la opacidad&lt;/strong&gt;,&lt;/p&gt;

&lt;p&gt;Vamos a &lt;strong&gt;remover los bordes del&lt;/strong&gt;  &lt;code&gt;input&lt;/code&gt; y &lt;code&gt;button&lt;/code&gt;. Para facilitar el armado de la estructura, vamos a usar &lt;code&gt;display: grid&lt;/code&gt; en su padre, pero esta estructura también se puede lograr fácilmente con &lt;strong&gt;flex&lt;/strong&gt;, sólo que con más líneas de código.&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;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nt"&gt;strong&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;600&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nt"&gt;svg&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="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;.actions&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;.data&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;*,&lt;/span&gt;
&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;.comment&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;padding-left&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-right&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="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;.data&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nc"&gt;.actions&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;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nc"&gt;.actions&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nc"&gt;.actions&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nd"&gt;:last-child&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin-right&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="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nt"&gt;time&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="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.7rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;uppercase&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nc"&gt;.comment&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.15rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&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;.7rem&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;.7rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#dbdbdb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nc"&gt;.comment&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nc"&gt;.comment&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.5rem&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;border&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="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nc"&gt;.comment&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#0095f6&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="nb"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nc"&gt;.comment&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="nd"&gt;::placeholder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#262626&lt;/span&gt;&lt;span class="n"&gt;ee&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;💡 PRO CSS TIP:&lt;/strong&gt; El selector &lt;code&gt;* + *&lt;/code&gt;, también conocido como Owl Selector, o Selector Buho 🦉, es excelente para seleccionar y darle espacio a varios elementos que no conocemos que van a ser; sólo que son hermanos. Combinarlo con el selector de hijos directos &lt;code&gt;&amp;gt;&lt;/code&gt; va a ser ideal para evitar problemas con descendencias mas profundas.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ Uniendo todo
&lt;/h2&gt;

&lt;p&gt;Una vez que juntamos todo tenemos y agregamos algunos post más, tenemos una interfaz más que conocida. Que como vimos, es un desafío fácil de tacklear si analizamos previamente que es lo que vamos a necesitar, maquetamos el HTML con conciencia y después le damos estilo.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  👋 Palabras Finales
&lt;/h2&gt;

&lt;p&gt;Recrear estos sitios web nos sirve de práctica a la vez &lt;strong&gt;que ayuda a incorporar técnicas y reglas de CSS&lt;/strong&gt;, que eventualmente nos van a salir de forma natural.&lt;/p&gt;

&lt;p&gt;En otro posteo vamos a cubrir los pasos que nos faltan para terminar con la home de Instagram, mientras tanto cuéntenme en los comentarios sus opiniones y que les gustaría ver a futuro.&lt;/p&gt;

&lt;p&gt;¡Hasta la próxima!&lt;/p&gt;

</description>
      <category>spanish</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>html</category>
    </item>
    <item>
      <title>Relaciones de Aspecto Perfectas en CSS</title>
      <dc:creator>Lucas G. Terracino</dc:creator>
      <pubDate>Wed, 21 Jul 2021 17:28:13 +0000</pubDate>
      <link>https://dev.to/nomade55/relaciones-de-aspecto-perfectas-en-css-5c96</link>
      <guid>https://dev.to/nomade55/relaciones-de-aspecto-perfectas-en-css-5c96</guid>
      <description>&lt;blockquote&gt;
&lt;h2&gt;
  
  
  O, cómo aprendí a dejar de preocuparme y amar el padding
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ya sea que estemos desarrollando una web o la interfaz de una aplicación, las relaciones de aspecto son algo por lo que no tenemos que preocuparnos mucho. Hasta que el cliente nos pasa un video que quiere que sea vea sin &lt;strong&gt;&lt;em&gt;bandas negras,&lt;/em&gt;&lt;/strong&gt; o nos explican que la imagen tiene que estar sí o sí en &lt;strong&gt;una relación de 1:1.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ¿Qué es la relación de aspecto?
&lt;/h3&gt;

&lt;p&gt;La relación de aspecto es la relación que hay, proporcionalmente, entre el alto y el ancho de un elemento. Esta relación se suele expresar como la fracción de ancho sobre alto. Por ejemplo, para un elemento que tiene &lt;strong&gt;1:1 su ancho es igual a su altura.&lt;/strong&gt; Sin embargo un elemento que tiene &lt;strong&gt;4:3&lt;/strong&gt; como relación de aspecto*&lt;em&gt;, el ancho es 1.33 veces mas grande (porque 4 sobre 3, es 1.33).&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;Algunas de las &lt;strong&gt;más conocidas y populares siendo:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4:3&lt;/strong&gt; Televisores &lt;em&gt;de tubo&lt;/em&gt; viejos 📺, y la relación nativa de los VHS 📼&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;16:9&lt;/strong&gt; Monitores, celulares en horizontal, laptops, y televisores smart en promedio (cualquiera que no sea widescreen).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;9:16&lt;/strong&gt; Los celulares en vertical 📱 y con ellos, todas los videos filmados verticalmente como el contenido de TikTok&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1:1&lt;/strong&gt; Las imágenes del feed de Instagram y las fotos Polaroid.&lt;/li&gt;
&lt;/ul&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%2Fsigg67ift7m6xfp47dwh.jpeg" 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%2Fsigg67ift7m6xfp47dwh.jpeg" alt="Relaciones de aspecto populares, 1:1, 9:16, 16:9" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🎨 Relaciones de Aspecto en CSS
&lt;/h3&gt;

&lt;p&gt;Excelente, ahora que sabemos que es una relación de aspecto &lt;strong&gt;1:1,&lt;/strong&gt; podemos forzar un alto que corresponda al ancho y listo ¿no? &lt;br&gt;
Si un elemento tiene 1100px de ancho (&lt;code&gt;width: 1100px&lt;/code&gt;) le agregamos 1100px de alto (&lt;code&gt;height: 1100px&lt;/code&gt;), tiene la relación de aspecto que queríamos, 1:1 pero si el tamaño de la pantalla cambia, también deberíamos cambiar el alto para preservar la relación de aspecto. &lt;em&gt;Esta solución es válida pero **no es responsiva&lt;/em&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Necesitamos alguna regla de CSS que automáticamente mute en base al ancho, pero que tenga influencia en el alto.&lt;/p&gt;
&lt;h3&gt;
  
  
  🤯 El padding porcentual de un elemento es relativo al ancho  de su padre
&lt;/h3&gt;

&lt;p&gt;Una propiedad bastante interesante y poco intuitiva &lt;strong&gt;es que el tamaño del padding &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/padding#values" rel="noopener noreferrer"&gt;cuando las unidades son porcentuales&lt;/a&gt; corresponde al ancho del elemento 🤯.&lt;/strong&gt; Esto que a simple lectura parece algo muy chico ¡nos permite calcular un alto, en base a un ancho 🤯!&lt;/p&gt;

&lt;p&gt;Si pueden ver a donde vamos con esto, si a un elemento de 100px de ancho, le agregamos un hijo con alto automático (&lt;code&gt;height: auto&lt;/code&gt;) y le damos 100% de &lt;code&gt;padding-top&lt;/code&gt;, el alto de este elemento va a ser 100px (1:1). &lt;strong&gt;¡Tadá!&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  👨‍💻 Relaciones de aspecto más complejas
&lt;/h4&gt;

&lt;p&gt;En caso de tener por ejemplo el pantallazo de una película, filmada en 16:9, mi elemento tiene que tener la misma relación de aspecto si quiero que se vea sin &lt;em&gt;bandas negras.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Para calcularlo dividimos el alto, por el ancho: 9/16 = 0.5625 (&lt;code&gt;padding-top: 56.25%&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Tambien podemos usar la función &lt;code&gt;calc()&lt;/code&gt; para automatizar el proceso de cálculo del padding.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.aspect-ratio-16-9&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="nb"&gt;auto&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;56.25%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.aspect-ratio-1-1&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="nb"&gt;auto&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;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/* O haciendo uso de calc() */&lt;/span&gt;
&lt;span class="nc"&gt;.aspect-ratio-4-3&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="nb"&gt;auto&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="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.aspect-ratio-9-16&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="nb"&gt;auto&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="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;16&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="m"&gt;9&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  🤔 Pero el padding empujaría todo el contenido hacia abajo ¿no?
&lt;/h4&gt;

&lt;p&gt;Exacto, vamos a tener que volver a acomodar a los hijos de este elemento usando la ayuda de 🌈 &lt;strong&gt;posicionamiento absoluto&lt;/strong&gt; 🦄.&lt;/p&gt;

&lt;p&gt;Supongamos que dentro de nuestro elemento con la relación de aspecto 16:9 tenemos que agregar una imagen, lo único que tenemos que hacer es darle un posicionamiento relativo al padre, y acomodar la imagen para que ocupe todo el tamaño provisto por él.&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;"aspect-ratio-parent"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&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;"aspect-ratio-16-9"&lt;/span&gt;&lt;span class="nt"&gt;&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;"http://placehold.it/1920x1080?text=16:9"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;    
    &lt;span class="nt"&gt;&amp;lt;/div&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.aspect-ratio-16-9&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="nb"&gt;auto&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;56.25%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.aspect-ratio-16-9&lt;/span&gt; &lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&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;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;object-fit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&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;
  
  
  👀 ¿Hay alguna manera de evitarme hacer yo el cálculo?
&lt;/h3&gt;

&lt;p&gt;Sí, &lt;code&gt;calc()&lt;/code&gt;, pero si necesitas un &lt;em&gt;amigo&lt;/em&gt; que te ayude con los &lt;em&gt;ratios&lt;/em&gt;, &lt;strong&gt;&lt;a href="https://ratiobuddy.com" rel="noopener noreferrer"&gt;RatioBuddy&lt;/a&gt;&lt;/strong&gt; recibe el tamaño del elemento del que quieras calcular su relación de aspecto, y realiza los cálculos por nosotros. Al final, nos deja el SCSS listo para copiar y pegar ✨. &lt;br&gt;
🙏 En caso de que no sepas como usar SCSS (Sass), pega el resultado de RatioBuddy en &lt;strong&gt;&lt;a href="https://www.sassmeister.com" rel="noopener noreferrer"&gt;Sassmeister&lt;/a&gt;.&lt;/strong&gt;&lt;/p&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%2Fqjystqawh8x6sd8wamn5.png" 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%2Fqjystqawh8x6sd8wamn5.png" alt="Screenshot of the RatioBuddy Website" width="800" height="603"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  🆙 Level Up!
&lt;/h3&gt;

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

&lt;p&gt;Usando &lt;strong&gt;pseudo elementos y variables de CSS,&lt;/strong&gt; podemos agregarle a nuestros elementos una relación de aspecto, usando solo una clase.&lt;/p&gt;

&lt;h4&gt;
  
  
  Explicación
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Al crear un &lt;code&gt;::before&lt;/code&gt; dinámicamente, nos ahorramos el tener que crear otro el elemento desde el HTML.&lt;/li&gt;
&lt;li&gt;En vez de crear una clase para cada uno de los casos de relación de aspecto que tengamos que cubrir, hacemos uso de las variables de CSS ponemos &lt;code&gt;--aspect-ratio&lt;/code&gt; en el &lt;code&gt;padding-top&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Calculamos el &lt;code&gt;padding-top&lt;/code&gt; con &lt;code&gt;calc()&lt;/code&gt; dividiendo el total, lo que venga en la variable &lt;code&gt;--aspect-ratio&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Como estamos dentro de un &lt;code&gt;calc()&lt;/code&gt;, CSS va a dividir al 100% calculando la relación de aspecto que esté en la variable.&lt;/li&gt;
&lt;li&gt;Desde nuestro HTML, vamos a darle valor a esa variable para elemento usando &lt;code&gt;style="--aspect-ratio: n/n"&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 &lt;strong&gt;Pst,&lt;/strong&gt; también podemos pasarle relación de aspecto, ya dividida, como por ejemplo &lt;strong&gt;1.778 (16/9).&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚡ Usando relaciones de aspecto en Frameworks
&lt;/h3&gt;

&lt;p&gt;Si estás usando un framework es probable que ya exista una clase o componente para aprovechar estas relaciones de aspecto responsivas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Boostrap:&lt;/strong&gt; &lt;a href="https://getbootstrap.com/docs/4.1/utilities/embed/" rel="noopener noreferrer"&gt;https://getbootstrap.com/docs/4.1/utilities/embed/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bulma:&lt;/strong&gt; &lt;a href="https://bulma.io/documentation/elements/image/#responsive-images-with-ratios" rel="noopener noreferrer"&gt;https://bulma.io/documentation/elements/image/#responsive-images-with-ratios&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind:&lt;/strong&gt; &lt;a href="https://github.com/tailwindlabs/tailwindcss-aspect-ratio" rel="noopener noreferrer"&gt;https://github.com/tailwindlabs/tailwindcss-aspect-ratio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  👋 Conclusiones y el futuro
&lt;/h3&gt;

&lt;p&gt;Un verdadero truco de CSS, que al aprenderlo vamos a ser los primeros en proponer una solución a problemas que parecen tener solución solo con Javascript. &lt;br&gt;
Sin embargo, existe un &lt;strong&gt;&lt;a href="https://caniuse.com/mdn-css_properties_aspect-ratio" rel="noopener noreferrer"&gt;futuro&lt;/a&gt;&lt;/strong&gt; donde no tenemos que depender de trucos y engaños. La regla de CSS &lt;strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio" rel="noopener noreferrer"&gt;aspect-ratio&lt;/a&gt;&lt;/strong&gt; ya tiene un sólido soporte en la mayoría de los exploradores conocidos y con el tiempo ese número solo va a crecer. Mientras tanto, el &lt;strong&gt;Truco del Padding&lt;/strong&gt; ✨, es responsive y válido para todos los exploradores que existen.&lt;/p&gt;

</description>
      <category>spanish</category>
      <category>webdev</category>
      <category>css</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Easy theming with SASS mixins.</title>
      <dc:creator>Lucas G. Terracino</dc:creator>
      <pubDate>Wed, 28 Oct 2020 17:59:13 +0000</pubDate>
      <link>https://dev.to/nomade55/easy-theming-with-sass-mixins-2ckm</link>
      <guid>https://dev.to/nomade55/easy-theming-with-sass-mixins-2ckm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;While building a dark theme for my React App, I've found myself escaping the nesting a lot in order to make styles for the &lt;em&gt;dark theme&lt;/em&gt; .&lt;br&gt;
Then, this mixin was born.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Show me the code!
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="k"&gt;@mixin&lt;/span&gt; &lt;span class="nf"&gt;atDarkTheme&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;@at-root&lt;/span&gt; &lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.dark-theme&lt;/span&gt; &lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="nv"&gt;$selector&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;@content&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;It's worth mentioning, this will work in any kind of project that uses Sass, not just React.&lt;br&gt;
And even though styled components can tackle theming easily too, I'm a fan of Scss and having my components styled with their own Scss file.&lt;/p&gt;
&lt;h2&gt;
  
  
  Breakdown
&lt;/h2&gt;

&lt;p&gt;When dark mode is enabled, &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; receives the class &lt;code&gt;dark-theme&lt;/code&gt;. So in order to prepend the &lt;code&gt;body.dark-theme&lt;/code&gt; selector the &lt;strong&gt;mixin works like this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;$selector&lt;/strong&gt;: parses our current selector making use of  &lt;a href="https://sass-lang.com/documentation/style-rules/parent-selector" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;code&gt;&amp;amp;&lt;/code&gt; (parent selector)&lt;/strong&gt;&lt;/a&gt; and &lt;strong&gt;&lt;code&gt;#{}&lt;/code&gt;&lt;/strong&gt;, and then stores it for later use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;@at-root:&lt;/strong&gt; moves the next selector to the root of the document, escaping the current nesting.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;body.dark-theme:&lt;/strong&gt; the class that will be responsible for our dark-mode styles.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;#{selector}:&lt;/strong&gt; adding our previous selector back again.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a class="mentioned-user" href="https://dev.to/content"&gt;@content&lt;/a&gt;:&lt;/strong&gt; everything we add between the brackets &lt;strong&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/strong&gt; in our &lt;strong&gt;&lt;code&gt;@include&lt;/code&gt;&lt;/strong&gt; goes here.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.just-a-box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// ☀&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&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;100px&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;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// Dark Theme styles&lt;/span&gt;
    &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;atDarkTheme&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 🌙&lt;/span&gt;
        &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After compiling this code into CSS, it will look like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.just-a-box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&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;100px&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;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.dark-theme&lt;/span&gt; &lt;span class="nc"&gt;.just-a-box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&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;
  
  
  🧬Evolving the mixin: Multiple Themes
&lt;/h2&gt;

&lt;p&gt;Why conform with dark mode, let's create themes &lt;strong&gt;with one mixin to rule'em all!&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="k"&gt;@mixin&lt;/span&gt; &lt;span class="nf"&gt;atTheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$theme&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"default"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;@at-root&lt;/span&gt; &lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="nv"&gt;$theme&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="nc"&gt;-theme&lt;/span&gt; &lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="nv"&gt;$selector&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;@content&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;
  
  
  Usage
&lt;/h3&gt;

&lt;p&gt;Now we can pass an argument to the &lt;strong&gt;mixin&lt;/strong&gt; to dinamically add styles to the themes we create.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.amazing-navbar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;52px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// Theme styles&lt;/span&gt;
    &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;atTheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"red"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&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;@include&lt;/span&gt; &lt;span class="nd"&gt;atTheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"green"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&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;@include&lt;/span&gt; &lt;span class="nd"&gt;atTheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"blue"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&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;@include&lt;/span&gt; &lt;span class="nd"&gt;atTheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"halloween"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;purple&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After compiling this code into CSS, it will look like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.amazing-navbar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;52px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.red-theme&lt;/span&gt; &lt;span class="nc"&gt;.amazing-navbar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.blue-theme&lt;/span&gt; &lt;span class="nc"&gt;.amazing-navbar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.green-theme&lt;/span&gt; &lt;span class="nc"&gt;.amazing-navbar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.halloween-theme&lt;/span&gt; &lt;span class="nc"&gt;.amazing-navbar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;purple&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;
  
  
  💡A few more ideas
&lt;/h3&gt;

&lt;p&gt;To keep the post simple I'll just give you a few hints to where you can improve upon on your project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS Variables&lt;/li&gt;
&lt;li&gt;Predefined &lt;strong&gt;$themes&lt;/strong&gt; variable to check if the argument passed to the &lt;strong&gt;atTheme mixin&lt;/strong&gt; is valid.&lt;/li&gt;
&lt;li&gt;"Automatic" dark-theming with the invert filter.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Using &lt;code&gt;@at-root&lt;/code&gt; directive in mixins &lt;strong&gt;will save us a lot of time,&lt;/strong&gt; creating theme-specific selectors for our elements we are working on in a breeze, relying only in CSS' powerful specificity.&lt;/p&gt;

&lt;p&gt;If this post was any help or do you think this can be improved upon, let me know in the comments!&lt;/p&gt;

&lt;p&gt;If you are still hungry for more sassy knowledge, I've written another post about it and the Bulma framework.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/nomade55" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F227131%2Fccc4cf45-e99d-4e06-b7b5-64fb3eaa6d79.jpeg" alt="nomade55"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/nomade55/highlighting-awesome-sass-snippets-from-bulma-4nnm" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Highlighting awesome SASS snippets from Bulma&lt;/h2&gt;
      &lt;h3&gt;Lucas G. Terracino ・ Oct 15 '20&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#sass&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#css&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;p&gt;Until next time 👋!&lt;/p&gt;

</description>
      <category>css</category>
      <category>react</category>
      <category>sass</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Highlighting awesome SASS snippets from Bulma</title>
      <dc:creator>Lucas G. Terracino</dc:creator>
      <pubDate>Thu, 15 Oct 2020 13:58:20 +0000</pubDate>
      <link>https://dev.to/nomade55/highlighting-awesome-sass-snippets-from-bulma-4nnm</link>
      <guid>https://dev.to/nomade55/highlighting-awesome-sass-snippets-from-bulma-4nnm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Being the awesome CSS framework that it is, Bulma has a very clean and structured SASS codebase. Let's dive in it and get some &lt;strong&gt;Sassy gems 💎&lt;/strong&gt; for ourselves.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Bulma&lt;/strong&gt; is a framework I'd recommend to anyone, whether they are new in the scene or seasoned experts. &lt;strong&gt;Specially if you are learning &lt;a href="https://sass-lang.com/install" rel="noopener noreferrer"&gt;SASS&lt;/a&gt;.&lt;/strong&gt;&lt;br&gt;
The things I'm gonna be highlighting today are not on their &lt;strong&gt;&lt;a href="https://bulma.io/documentation/customize/variables/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/strong&gt; But give it a look if you want to harness the full potential of this humble but solid CSS framework.&lt;/p&gt;
&lt;h2&gt;
  
  
  ⚠ Head's up!
&lt;/h2&gt;

&lt;p&gt;Bulma is written in SASS completely, and I mean. &lt;strong&gt;SASS.&lt;/strong&gt; So as a friendly reminder.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mixins look different! &lt;code&gt;@mixin newMixin()&lt;/code&gt; looks like this &lt;code&gt;=newMixin()&lt;/code&gt; in &lt;strong&gt;SASS.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Includes look different! &lt;code&gt;@include newMixin()&lt;/code&gt; looks like this &lt;code&gt;+newMixin()&lt;/code&gt; in &lt;strong&gt;SASS.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SASS&lt;/strong&gt; doesn't use semicolons &lt;code&gt;;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SASS&lt;/strong&gt; doesn't use curly braces &lt;code&gt;{}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SASS&lt;/strong&gt; uses indentation instead for nesting. Be precise with it.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I'm adding bits of information and annotations in the code, look for 📚 comments.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  💎 Easy placeholders for inputs
&lt;/h2&gt;

&lt;p&gt;This mixin is not really needed if you have a prefixer, yet is an awesome way to swiftly style the placeholder of any &lt;code&gt;input&lt;/code&gt; or &lt;code&gt;textearea&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="nf"&gt;=placeholder&lt;/span&gt;
  &lt;span class="nv"&gt;$placeholders&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;':-moz'&lt;/span&gt; &lt;span class="s1"&gt;':-webkit-input'&lt;/span&gt; &lt;span class="s1"&gt;'-moz'&lt;/span&gt; &lt;span class="s1"&gt;'-ms-input'&lt;/span&gt;
  &lt;span class="k"&gt;@each&lt;/span&gt; &lt;span class="nv"&gt;$placeholder&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$placeholders&lt;/span&gt;
    &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nd"&gt;:&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="nv"&gt;$placeholder&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="nd"&gt;-placeholder&lt;/span&gt;
      &lt;span class="k"&gt;@content&lt;/span&gt;
      &lt;span class="c1"&gt;// 📚 Content passed to @include ends up where the @content directive is.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  💎 Easier Media Queries
&lt;/h2&gt;

&lt;p&gt;Useful when building specific media queries for any of your components.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="nf"&gt;=from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="nf"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;@content&lt;/span&gt;

&lt;span class="nf"&gt;=until&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="nf"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$device&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;@content&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bulma has its own set of breakpoints defined with variables, this allows very specific mixins&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="nf"&gt;=mobile&lt;/span&gt;
  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="nf"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$tablet&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;@content&lt;/span&gt;

&lt;span class="nf"&gt;=tablet&lt;/span&gt;
  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="nf"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$tablet&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;print&lt;/span&gt;
    &lt;span class="k"&gt;@content&lt;/span&gt;

&lt;span class="nf"&gt;=tablet-only&lt;/span&gt;
  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="nf"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$tablet&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$desktop&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;@content&lt;/span&gt;
    &lt;span class="c1"&gt;// 📚 Content passed to @include ends up where the @content directive is.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  💎 Overlaying absolute element
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Do you need a gradient over an image for a sexier look?&lt;/li&gt;
&lt;li&gt;A whole &lt;code&gt;div&lt;/code&gt; to protect an image from being &lt;em&gt;easily&lt;/em&gt; grabbed?&lt;/li&gt;
&lt;li&gt;Perhaps an &lt;code&gt;::after&lt;/code&gt; or &lt;code&gt;::before&lt;/code&gt; that needs to cover its parent?
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="nf"&gt;=overlay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$offset&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nl"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$offset&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$offset&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$offset&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$offset&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Maybe you can mix it up, adding more parameters in case you want different offsets. &lt;/p&gt;

&lt;h2&gt;
  
  
  💎 Color Helper Mixins to find Dark and Light variants
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;colorLuminance&lt;/strong&gt; determines the level of luminance a color has from 0 to 1.&lt;br&gt;
This function in particular is one of my favorites from the library.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="k"&gt;@function&lt;/span&gt; &lt;span class="nf"&gt;colorLuminance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;@if&lt;/span&gt; &lt;span class="nf"&gt;type-of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s1"&gt;'color'&lt;/span&gt;
  &lt;span class="c1"&gt;// 📚 Checking if its an actual color. If not, returns .55&lt;/span&gt;
    &lt;span class="c1"&gt;@return 0.55&lt;/span&gt;
  &lt;span class="nv"&gt;$color-rgb&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'red'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;red&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'green'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;green&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'blue'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="c1"&gt;// 📚 Grabs each RGB value for the color&lt;/span&gt;
  &lt;span class="k"&gt;@each&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$value&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$color-rgb&lt;/span&gt;
    &lt;span class="nv"&gt;$adjusted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
    &lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$value&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="m"&gt;255&lt;/span&gt;
    &lt;span class="k"&gt;@if&lt;/span&gt; &lt;span class="nv"&gt;$value&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="mi"&gt;.03928&lt;/span&gt;
      &lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$value&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="m"&gt;12&lt;/span&gt;&lt;span class="mi"&gt;.92&lt;/span&gt;
    &lt;span class="k"&gt;@else&lt;/span&gt;
      &lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$value&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;.055&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="mi"&gt;.055&lt;/span&gt;
      &lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;powerNumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
     &lt;span class="c1"&gt;// 📚 Calculates amount of luminance for each color (RGB) and then stores it back in the variable.&lt;/span&gt;
    &lt;span class="nv"&gt;$color-rgb&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;map-merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color-rgb&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$value&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="nf"&gt;map-get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color-rgb&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'red'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;.2126&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;map-get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color-rgb&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'green'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;.7152&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;map-get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color-rgb&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'blue'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;.0722&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="c1"&gt;// 📚 Sums up the RGB luminances together to get the $color's luminance.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;findColorInvert&lt;/strong&gt; returns white or black(ish), with the help of previously defined function &lt;code&gt;colorLuminance&lt;/code&gt;. This is very useful when we are creating components programmatically with an  &lt;code&gt;@each&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="k"&gt;@function&lt;/span&gt; &lt;span class="nf"&gt;findColorInvert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&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="nf"&gt;colorLuminance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="mi"&gt;.55&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;@return&lt;/span&gt; &lt;span class="nf"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;#000&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="mi"&gt;.7&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;@return&lt;/span&gt; &lt;span class="mh"&gt;#fff&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;findLightColor&lt;/strong&gt; returns a light version of a color, through the use of the &lt;code&gt;lightness&lt;/code&gt; function. The color given has to be below a certain level of lightness, or the function will return the same color.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="k"&gt;@function&lt;/span&gt; &lt;span class="nf"&gt;findLightColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// 📚 Checks the type of the variable sent to the function&lt;/span&gt;
  &lt;span class="c1"&gt;@if type-of($color) == 'color'&lt;/span&gt;
    &lt;span class="c1"&gt;$l: 96%&lt;/span&gt;
    &lt;span class="c1"&gt;// 📚 After defining a base lightness level ($l), checks if $color isn't above it already. Then proceeds to adjust the color.&lt;/span&gt;
    &lt;span class="c1"&gt;@if lightness($color) &amp;gt; 96%&lt;/span&gt;
      &lt;span class="c1"&gt;$l: lightness($color)&lt;/span&gt;
    &lt;span class="c1"&gt;@return change-color($color, $lightness: $l)&lt;/span&gt;
    &lt;span class="c1"&gt;// 📚 If its not a color, returns a variable Bulma has already declared before.&lt;/span&gt;
  &lt;span class="c1"&gt;@return $background&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;findDarkColor&lt;/strong&gt; returns a darker version of the color given. This function makes use of the function &lt;a href="https://sass-lang.com/documentation/syntax/special-functions#min-and-max" rel="noopener noreferrer"&gt;max&lt;/a&gt;, to always go with the base.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="k"&gt;@function&lt;/span&gt; &lt;span class="nf"&gt;findDarkColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// 📚 Checks the type of the variable sent to the function&lt;/span&gt;
  &lt;span class="c1"&gt;@if type-of($color) == 'color'&lt;/span&gt;
    &lt;span class="c1"&gt;$base-l: 29%&lt;/span&gt;
    &lt;span class="c1"&gt;// 📚 After setting a base target of darkness ($base-l), gets the luminance of the color.&lt;/span&gt;
    &lt;span class="c1"&gt;$luminance: colorLuminance($color)&lt;/span&gt;
    &lt;span class="c1"&gt;$luminance-delta: (0.53 - $luminance)&lt;/span&gt;
    &lt;span class="c1"&gt;$target-l: round($base-l + ($luminance-delta * 53))&lt;/span&gt;
    &lt;span class="c1"&gt;// 📚 After doing some calculations, chooses the highest value between the target lightness ($target-l) and the base one defined previously.&lt;/span&gt;
    &lt;span class="c1"&gt;@return change-color($color, $lightness: max($base-l, $target-l))&lt;/span&gt;
    &lt;span class="c1"&gt;// 📚 If its not a color, returns a variable Bulma has already declared before.&lt;/span&gt;
  &lt;span class="c1"&gt;@return $text-strong&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  👋 Parting words
&lt;/h2&gt;

&lt;p&gt;I've found myself learning a lot of SASS going through Bulma's repository and I with hope this article you did too!&lt;/p&gt;

&lt;p&gt;These snippets 💎 I've highlighted here are but a fraction of their codebase and &lt;a href="https://bulma.io/documentation/overview/start/" rel="noopener noreferrer"&gt;I encourage you to use Bulma&lt;/a&gt; the next time you need a CSS framework. It has a very well written documentation, its highly customizable and they are open source ♥.&lt;/p&gt;

&lt;p&gt;If you liked this post or found it useful in anyway please let me know with a comment or reaction. Also if you want me to breakdown another popular CSS framework, let me know which one in the comments.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>sass</category>
      <category>css</category>
    </item>
    <item>
      <title>Tweaking commits with Git's Magic Time Machine✨, aka git rebase</title>
      <dc:creator>Lucas G. Terracino</dc:creator>
      <pubDate>Thu, 10 Sep 2020 00:04:58 +0000</pubDate>
      <link>https://dev.to/nomade55/tweaking-commits-with-git-s-magic-time-machine-aka-git-rebase-h02</link>
      <guid>https://dev.to/nomade55/tweaking-commits-with-git-s-magic-time-machine-aka-git-rebase-h02</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Magic is everywhere! Specially in your terminal, and our git has some of its own. In this post I'm going to show you a little of this &lt;em&gt;magic&lt;/em&gt; that lives inside the &lt;code&gt;git rebase&lt;/code&gt; command.&lt;br&gt;
🐻 Bear in mind, this post assumes you are already familiar with git.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  git rebase
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;📖 Reapply commits on top of another base tip.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This sounds and looks just like &lt;code&gt;git merge&lt;/code&gt;... right?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout feature
git rebase master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not quite. &lt;code&gt;git rebase&lt;/code&gt;, moves the branch and incorporates all of the new commits, &lt;strong&gt;but &lt;em&gt;re-writing&lt;/em&gt; the project history&lt;/strong&gt; by creating &lt;strong&gt;brand new commits for each commit&lt;/strong&gt; in the original branch.&lt;/p&gt;

&lt;p&gt;These brand new commits thingy thing, brings up the golden rule of rebase: &lt;strong&gt;do not rebase on public branches&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Besides rewriting commits, we can add two other key features of &lt;code&gt;git rebase&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Doesn't make new commits (because it rewrites them)&lt;/li&gt;
&lt;li&gt;Can be used in the &lt;strong&gt;same&lt;/strong&gt; branch we are working on&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This three key features gives us the opportunity to tweak our commits, which comes really in handy when &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;we messed up with the commit message&lt;/li&gt;
&lt;li&gt;made a very tiny file change and its commit would be better off inside a larger one&lt;/li&gt;
&lt;li&gt;when we need to change the order of the commits&lt;/li&gt;
&lt;li&gt;remove a whole commit&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting our hands dirty
&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%2Fi%2Fip4k5i6u2ybnnp54xogr.png" 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%2Fi%2Fip4k5i6u2ybnnp54xogr.png" alt="Graph of a git branch with four commits" width="509" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's say I've been working on this new feature branch, and 4 commits in, I want to make some changes to them using rebase.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git rebase &lt;span class="nt"&gt;-i&lt;/span&gt; HEAD~4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;git rebase&lt;/strong&gt;: calls, of course, the git-rebase command&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-i:&lt;/strong&gt; Shorthand for &lt;em&gt;interactive,&lt;/em&gt; this makes a list of the commits that we are about to rebase, letting us edit that list and how we are going to rebase them. This file is where we are going to do today's magic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HEAD~4:&lt;/strong&gt; The tilde is used to point to a position relative to a specific commit, in this case, the HEAD; giving us its 4th parent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, a file has been opened on your designed IDE called &lt;strong&gt;git-rebase-todo&lt;/strong&gt; and we are ready to do some magic with out git project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# git-rebase-todo&lt;/span&gt;
pick 4acdb1d First Commit of Feature
fixup be76710 Second Commit of Feature
drop 78acdd0 Third Commit of Feature
reword 9480b3d Fourth Commit of Feature
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we use &lt;code&gt;--interactive&lt;/code&gt;/&lt;code&gt;-i&lt;/code&gt; this file is going to tell git what to do with each of the commits listed. The list can be re-ordered and git will execute your orders from top to bottom! &lt;/p&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%2Fi%2Fipxtwyut0iehr2zx3vkc.png" 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%2Fi%2Fipxtwyut0iehr2zx3vkc.png" alt="Graph of a git branch with commits being reordered via git rebase" width="509" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By default, all commits come with the option &lt;strong&gt;pick&lt;/strong&gt;, but there are many options we can use to alter our commits. &lt;br&gt;
Let's see what that means and what we can do with the other commands rebase has for us.&lt;/p&gt;
&lt;h3&gt;
  
  
  pick
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;P&lt;/strong&gt;ick signals git to use the commit, this means, it will keep this commit and use it in its rebasing. &lt;br&gt;
➡ &lt;strong&gt;When should I use pick?&lt;/strong&gt; Every time we want to keep a commit!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pick be76710 Super awesome commit message
&lt;span class="c"&gt;# You can also use the short version: p&lt;/span&gt;
p be76710 Super awesome commit message
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  reword
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Reword&lt;/strong&gt; signals git to use the commit just like &lt;strong&gt;pick&lt;/strong&gt; but lets us change the commit message when it's about to be commited again. This option will prompt you with a file to edit with the previous commit message for you to edit.&lt;br&gt;
➡ &lt;strong&gt;When should I use reword?&lt;/strong&gt; Every time we want to keep a commit, but we need to make changes to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;reword be76710 Super awesome commit message
&lt;span class="c"&gt;# You can also use the short version: r&lt;/span&gt;
r be76710 Super awesome commit message
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  edit
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;E&lt;/strong&gt;dit signals git to use the commit, but stops just before commiting to let us make changes or adjustments. This amendments to the code are not limited at all. Everything will be included in the commit long as you stage them: this includes typos, a few more lines of code, or a whole new file.&lt;br&gt;
➡ &lt;strong&gt;When should I use edit?&lt;/strong&gt; Every time we want to keep a commit, but we need to slip in a few more changes to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;edit be76710 Super awesome commit message
&lt;span class="c"&gt;# You can also use the short version: e&lt;/span&gt;
e be76710 Super awesome commit message
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  squash
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;S&lt;/strong&gt;quash signals git to merge the commit with the previous one, this means, both commits will become one with a new hash. Git will let you reword the commit message of this newly created commit and will prompt you with a file to edit it.&lt;br&gt;
➡ &lt;strong&gt;When should I use squash?&lt;/strong&gt; Every time we want you want to meld one or more commits with a previous one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;squash be76710 Super awesome commit message
&lt;span class="c"&gt;# You can also use the short version: s&lt;/span&gt;
s sbe76710 Super awesome commit message

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  fixup
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;F&lt;/strong&gt;ixup signals git to merge the commit with the previous one, just like &lt;strong&gt;squash&lt;/strong&gt; but discarding the commit's message.&lt;br&gt;
➡ &lt;strong&gt;When should I use fixup?&lt;/strong&gt; Every time we wan to meld one or more commits with a previous one disregarding its message is.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pick 4acdb1d Super Awesome Commit
fixup be76710 This commit is going to be merged with the one on top of it
pick 9480b3d Another Super Awesome Commit
&lt;span class="c"&gt;# You can also use the short version: f&lt;/span&gt;
f be76710 Super awesome commit message
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fi%2Fmdr2zv5yuly01q0ivgdi.png" 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%2Fi%2Fmdr2zv5yuly01q0ivgdi.png" alt="Graph of a git branch with a commit being merged with the previous one via git rebase and fixup" width="509" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  drop
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;D&lt;/strong&gt;rop signals git to remove the whole commit.&lt;br&gt;
➡ &lt;strong&gt;When should I use fixup?&lt;/strong&gt; Every time you want to discard all the changes made by a commit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;drop be76710 Super awesome commit message
&lt;span class="c"&gt;# You can also use the short version: d&lt;/span&gt;
d be76710 Super awesome commit message
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  So, again, how do I use this magic tricks?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;You've just commited a very big change to your new website index.html. Your eyes wonder upon the job done, and suddenly, a &lt;em&gt;nasty&lt;/em&gt; typo appears out of nowhere.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✨ Just make another commit with the fixed typo. Invoke the magic words on your terminal &lt;code&gt;git -i rebase HEAD~2&lt;/code&gt; and then, use &lt;strong&gt;fixup&lt;/strong&gt; to merge the commit done for the typo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After making three commits, you've noticed the first one has a commit message that others in your team would find confusing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✨ Just call upon the greatness of rebase with &lt;code&gt;git rebase -i HEAD~3&lt;/code&gt; and use &lt;strong&gt;reword&lt;/strong&gt; on the commit you'd like to change its message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You have noticed the whole commit you've done, five commits ago is wrong, but... there are many commits you don't want to lose using reset!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✨ Rebase comes to hide all of those silly mistakes! Let's recite together on our terminal &lt;code&gt;git rebase -i HEAD~5&lt;/code&gt; and using &lt;strong&gt;drop&lt;/strong&gt; that commit is now gone forever!&lt;/p&gt;

&lt;h2&gt;
  
  
  With great power comes great responsibility
&lt;/h2&gt;

&lt;p&gt;Before using rebase, you have to make sure if at any point, the commits you are going to merge have already been merged to public branch, if that's the case... &lt;strong&gt;don't us rebase.&lt;/strong&gt; Remember what we've learned about rebase making new commits? You'll have issues because we've just rewritten the commits history!&lt;br&gt;
Another thing to keep in mind is, when we rebase, all the commits are applied one after the other, this means, dropping or changing the order of any commit might pop up conflicts you'll have to fix and then commit before rebase can continue. After you've successfully dealt with them, gracefully resume your rebase with &lt;code&gt;git rebase --continue&lt;/code&gt;. Or just go with &lt;code&gt;git rebase --abort&lt;/code&gt; and cry yourself to sleep remembering those conflicts... &lt;em&gt;oh lord... those conflicts.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📚 Let's read more!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;By the way, I'm aware this post doesn't cover in depth the differences between &lt;code&gt;merge&lt;/code&gt; and &lt;code&gt;rebase&lt;/code&gt;, but I have good news &lt;strong&gt;&lt;a href="https://www.atlassian.com/git/tutorials/merging-vs-rebasing" rel="noopener noreferrer"&gt;🔗Atlassian has a great post about it&lt;/a&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;If you need a better way to visualize what &lt;code&gt;rebase&lt;/code&gt; does to your branch, &lt;a class="mentioned-user" href="https://dev.to/lydiahallie"&gt;@lydiahallie&lt;/a&gt; has &lt;a href="https://dev.to/lydiahallie/cs-visualized-useful-git-commands-37p1#rebase"&gt;&lt;strong&gt;🔗 excellent animations&lt;/strong&gt; on how git works on this gorgeous post.&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The options I've presented here are not the only ones &lt;code&gt;rebase&lt;/code&gt; has. If this topic got you hooked, and you crave to expand your knowledge on them and rewriting history, &lt;a href="https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History" rel="noopener noreferrer"&gt;&lt;strong&gt;🔗 git documentation on has a lot of good insight&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If you feel like getting a little more technical, &lt;a class="mentioned-user" href="https://dev.to/jessekphillips"&gt;@jessekphillips&lt;/a&gt; goes slightly &lt;a href="https://dev.to/jessekphillips/interactively-rebase-with-git-4o7n"&gt;&lt;strong&gt;🔗 more in depth with rebase&lt;/strong&gt;&lt;/a&gt; in a short but sweet post.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it from me for now, I hope you find it useful and on your next project less of these pesky typos plague your commit history, thanks to the magic of &lt;code&gt;rebase&lt;/code&gt;✨&lt;/p&gt;

</description>
      <category>git</category>
      <category>productivity</category>
      <category>magic</category>
      <category>codequality</category>
    </item>
    <item>
      <title>Productivity tips I'd give my past self through a time-cellphone with limited credit</title>
      <dc:creator>Lucas G. Terracino</dc:creator>
      <pubDate>Fri, 24 Jul 2020 07:11:26 +0000</pubDate>
      <link>https://dev.to/nomade55/productivity-tips-i-d-give-my-past-self-through-a-time-cellphone-with-limited-credit-5gc3</link>
      <guid>https://dev.to/nomade55/productivity-tips-i-d-give-my-past-self-through-a-time-cellphone-with-limited-credit-5gc3</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I was reading through &lt;a href="https://dev.to/vtrpldn"&gt;Vito's&lt;/a&gt; &lt;a href="https://dev.to/vtrpldn/vs-code-shortcuts-that-i-would-teach-myself-if-i-had-a-time-machine-with-limited-fuel-36md"&gt;post about VSCode shortcuts that he'd tell himself if he could go back in time with very limited time&lt;/a&gt; (btw you should totally check his post for awesome VSCode tips), and made me think, &lt;strong&gt;what if I had a quick call with my past self, and very&lt;/strong&gt; &lt;strong&gt;limited credit.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;— 📱🎶&lt;/p&gt;

&lt;p&gt;— ¿Hola?&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Lucas, it's me! &lt;del&gt;Mario&lt;/del&gt; You! From the future, I don't have time for your, erm, my..., no... our many questions! Your productivity is very questionable, so I'm gonna give you a few things &lt;strong&gt;you need to do with your work environment ASAP&lt;/strong&gt;. Also we are going to talk in English so most of the world can read it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;— Erm... okay sure... this is so sudden and I'm &lt;strong&gt;very&lt;/strong&gt; busy right now, so please, make it quick!&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;You are playing videogames, so you better pause it and listen to me &lt;strong&gt;carefully&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;— Man... I know myself way too much... &lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Duh, of course! Ok so, stop tinkering around with the themes, they take you too much of your time, just go with &lt;strong&gt;&lt;a href="https://draculatheme.com/" rel="noopener noreferrer"&gt;Dracula&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;🧛‍♀️ &lt;em&gt;every time you can, you will develop a love relationship with this theme.&lt;/em&gt;&lt;/p&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%2Fi%2Fjwcan9lcmkxbyhbagsk9.png" 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%2Fi%2Fjwcan9lcmkxbyhbagsk9.png" alt="Dracula" width="800" height="774"&gt;&lt;/a&gt;&lt;br&gt;
— Dracula? Love relationship? Why would I &lt;strong&gt;love&lt;/strong&gt; a Halloween themed color scheme? This seems rather mu-&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;&lt;strong&gt;Just. Use. It.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;— Ok! Okay! I, will us-&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Also, we both know you wanna learn to use git, but it's too daunting from the command line. Luckily for you there is this &lt;strong&gt;amazing&lt;/strong&gt; extension called &lt;strong&gt;&lt;a href="https://gitlens.amod.io/" rel="noopener noreferrer"&gt;Git Lens&lt;/a&gt;.&lt;/strong&gt; It will ease so much of your git journey, letting you have a look at your branches, commits, tags, among a few things right in &lt;strong&gt;VSCode.&lt;/strong&gt; Even cherry picking&lt;/em&gt; 🍒 &lt;em&gt;will be a breeze.&lt;/em&gt;&lt;/p&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%2Fi%2Fven1wfyf6yp68b6g8s3m.png" 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%2Fi%2Fven1wfyf6yp68b6g8s3m.png" alt="Git Lens" width="610" height="430"&gt;&lt;/a&gt;&lt;br&gt;
— That actually sounds very useful, you seem to know your st-&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Let's talk about the terminal, you need to learn to use it fast, it will save you a lot of time, and a lot of software is only available for terminals, so get your hands dirty with it fast. Is it &lt;strong&gt;&lt;a href="https://docs.microsoft.com/en-us/windows/wsl/wsl2-index" rel="noopener noreferrer"&gt;WSL 2&lt;/a&gt;&lt;/strong&gt; out yet?&lt;/em&gt;🐧&lt;/p&gt;

&lt;p&gt;— N-no I've heard news about something called WSL, but not that two version thing.&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Shoot! WSL 2 is amazing, you can have a Linux distribution running &lt;strong&gt;inside&lt;/strong&gt; your Windows, virtually and &lt;strong&gt;very well integrated&lt;/strong&gt;. Nevermind, add &lt;strong&gt;Powershell&lt;/strong&gt;⚡ or &lt;strong&gt;&lt;a href="https://cmder.net/" rel="noopener noreferrer"&gt;cmder&lt;/a&gt;&lt;/strong&gt; to your VSCode and start using it. You will thank the practice you've earned with those once WSL 2 is out.&lt;/em&gt;&lt;/p&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%2Fi%2Fe543yyz00nuqqnrkuwfx.png" 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%2Fi%2Fe543yyz00nuqqnrkuwfx.png" alt="Cmder on VSCode" width="800" height="283"&gt;&lt;/a&gt;&lt;br&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%2Fi%2Fs96gdm4aqbblnahmuvsu.png" 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%2Fi%2Fs96gdm4aqbblnahmuvsu.png" alt="Powershell on VSCode via CMDER" width="800" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— What about the WSL 1?&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Don't bother, go straight to WSL 2. It's way, &lt;strong&gt;way better&lt;/strong&gt;. Also, as soon as it's available &lt;strong&gt;download &lt;a href="https://www.microsoft.com/es-ar/p/windows-terminal/9n0dx20hk701?rtc=1&amp;amp;activetab=pivot:overviewtab" rel="noopener noreferrer"&gt;Windows Terminal&lt;/a&gt;&lt;/strong&gt;, it will let you run multiple terminals in tabs.&lt;/em&gt;&lt;/p&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%2Fi%2Fwmp5ezcs9gvq4xbgm2qr.PNG" 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%2Fi%2Fwmp5ezcs9gvq4xbgm2qr.PNG" alt="Windows Terminal" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— I've been using &lt;strong&gt;cd&lt;/strong&gt; and &lt;strong&gt;touch&lt;/strong&gt; in the terminal to change directories and create files easi-&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;That's good and all, &lt;strong&gt;but we need more&lt;/strong&gt;. I'll give you this tiny bookmark for your future reference: &lt;strong&gt;&lt;a href="https://explainshell.com/" rel="noopener noreferrer"&gt;ExplainShell&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;🐚&lt;em&gt;. This will help you learn more of those pesky shell commands. Think it as a Google for commands.&lt;/em&gt;&lt;/p&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%2Fi%2F643oqm20nq5roma5xj2x.png" 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%2Fi%2F643oqm20nq5roma5xj2x.png" alt="ExplainShell" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— More? How many more do I n-&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Speaking about more, you'll spend ages trying to theme your terminal (of course) just right. Leave that to &lt;strong&gt;&lt;a href="https://starship.rs" rel="noopener noreferrer"&gt;Starship.rs&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;🚀&lt;em&gt;, it's exactly what you want and more, having a lot of modules you can turn on and off, and it's written in Rust, so it's &lt;strong&gt;fast&lt;/strong&gt; keeping the performance of our console pretty much the same.&lt;/em&gt;&lt;/p&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%2Fi%2Fc7ez7ejk06lc68goz0fy.png" 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%2Fi%2Fc7ez7ejk06lc68goz0fy.png" alt="Starship" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Erm o-okay that sounds good but I want to customize the prompt with erm... you know...&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Yes, you can add emojis to the prompt.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;— Sold! But... what about the theme?&lt;br&gt;
— &lt;em&gt;&lt;strong&gt;&lt;a href="https://draculatheme.com/" rel="noopener noreferrer"&gt;DRACULA&lt;/a&gt;&lt;/strong&gt; of course!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;— Wow, okay! I mean, chill man, you clearly have strong feelings for our blood thirsty friend, I didn't expect I'd become such a fan of vampires... is emo cool again in the future?&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;No, but dark interfaces are &lt;code&gt;e v e r y w h e r e&lt;/code&gt;. That said, you'll need to share your code effectively and quickly. Average screen grabbers aren't really good for code, go with &lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap" rel="noopener noreferrer"&gt;CodeSnap&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;📷&lt;em&gt;. It's very customizable and you can take nice pictures of your code just by selecting it. You'll  want to hang those awesome &lt;strong&gt;hotfixing snippets&lt;/strong&gt; on the wall now.&lt;/em&gt;&lt;/p&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%2Fi%2Fszmpbxg1r3ko3pp2hcp3.png" 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%2Fi%2Fszmpbxg1r3ko3pp2hcp3.png" alt="CodeSnap" width="800" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Ok, mhm, okay, hang... in the wall. Mhm. &lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Where are you writing these things&lt;/em&gt; out?&lt;/p&gt;

&lt;p&gt;— In a few Sticky Notes on my desk. Why? Does the future me write things down in a better w-&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;As a matter of fact, yeah, I've been using &lt;strong&gt;&lt;a href="https://notion.so" rel="noopener noreferrer"&gt;Notion&lt;/a&gt;&lt;/strong&gt; for the past months, and it's the perfect tool for us, you know how messy our desks and mind are; the way we always forget things... Well, no more! That's a thing of the past, erm your present, my past! &lt;br&gt;
I've been organizing everything I can in Notion it's been such a joy. &lt;strong&gt;YOU NEED TO USE IT.&lt;/strong&gt; You'll never become filthy, &lt;strong&gt;filthy rich&lt;/strong&gt; if you keep forgetting you forget those million-dollar ideas&lt;/em&gt; 🌈&lt;em&gt;.&lt;/em&gt;&lt;/p&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%2Fi%2Fbf5easllpe08t18mk1do.png" 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%2Fi%2Fbf5easllpe08t18mk1do.png" alt="Notion.so" width="800" height="476"&gt;&lt;/a&gt;&lt;br&gt;
— HOLD UP A FILTHY SECOND. I'LL BECOME... &lt;em&gt;FILTHY, **FILTHY RICH?&lt;/em&gt;** &lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Of course! I've already told you how we pulled it off. Haven't I...?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;— No! I'd totally remember such &lt;strong&gt;special little&lt;/strong&gt; piece of information.&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;Oh, silly me! You know, it was actually a very unexpected journey, let me te-&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;— &lt;em&gt;...&lt;/em&gt;&lt;br&gt;
— &lt;strong&gt;You there?&lt;/strong&gt; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you've found the post helpful or do you want to &lt;strong&gt;discuss/ask&lt;/strong&gt; any of the things I've sent to my past self, please feel free to do so! &lt;br&gt;
If you are feeling shy just let me know with a 🦄 or a ♥ you've enjoyed it and I might just call myself a few times more. &lt;strong&gt;Thanks again &lt;a href="https://dev.to/vtrpldn"&gt;Vitor Paladini&lt;/a&gt; for the idea.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>productivity</category>
      <category>beginners</category>
      <category>tools</category>
      <category>webdev</category>
    </item>
    <item>
      <title>My React Functional Component maker for the terminal</title>
      <dc:creator>Lucas G. Terracino</dc:creator>
      <pubDate>Thu, 16 Jul 2020 18:10:11 +0000</pubDate>
      <link>https://dev.to/nomade55/my-react-functional-component-maker-for-the-terminal-2bmh</link>
      <guid>https://dev.to/nomade55/my-react-functional-component-maker-for-the-terminal-2bmh</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Hi 👋, this is my first post. Any feedback is welcome.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For a few months now, I've been digging deeper into React. As a newcomer to the React world I was seeing myself repeating some things over and over, that I wished I had an &lt;em&gt;artisan&lt;/em&gt; command for them (Laravel developers might know what I mean), but in a nutshell, a way to create a basic file quickly.&lt;/p&gt;

&lt;p&gt;At the same time, I've been using more and more Linux, Ubuntu in particular, which I installed to try out &lt;strong&gt;&lt;a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10" rel="noopener noreferrer"&gt;WSL2&lt;/a&gt;&lt;/strong&gt;, and let me tell you, I'm &lt;strong&gt;very happy&lt;/strong&gt; with it, specially with how easy is to tinker and make my own commands and scripts to make my work more efficient.&lt;/p&gt;

&lt;p&gt;One of these repetitive and tedious tasks was &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Making a folder &lt;/li&gt;
&lt;li&gt;Then putting an &lt;code&gt;index.js&lt;/code&gt; inside it which &lt;em&gt;exported&lt;/em&gt; the default of a file&lt;/li&gt;
&lt;li&gt;Make that file and inside it &lt;code&gt;import React from 'react'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Of course&lt;/em&gt;, make a function and &lt;code&gt;export&lt;/code&gt; it as &lt;code&gt;default&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You know the drill and you know where this is going ✨.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing &lt;code&gt;pls_react_function_component&lt;/code&gt;!
&lt;/h2&gt;

&lt;p&gt;I decide to share my humble time saver command I call &lt;strong&gt;pls_react_function_component&lt;/strong&gt; here in &lt;strong&gt;DEV.to&lt;/strong&gt;. So please, use it and hack it to your hearts content.&lt;br&gt;
Also, I'm aware its name is long&lt;sup&gt;&lt;sup&gt;&lt;sup&gt;I love it&lt;/sup&gt;&lt;/sup&gt;&lt;/sup&gt; &lt;/p&gt;
&lt;h3&gt;
  
  
  🛠 Usage
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pls_react_function_component &amp;lt;OPTIONS&amp;gt;... &amp;lt;COMPONENT_NAME&amp;gt;...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;Options&lt;/em&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;-e&lt;/strong&gt; Changes the extension of the created files to the one provided. In case of choosing ts, semicolons are removed from files. Default value is js. Dot is not needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-p&lt;/strong&gt; Creates parent folders if they don't exist. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-h&lt;/strong&gt; Shows help for the command.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;

&lt;p&gt;Let's assume you have the following folder structure, and you wanna create a new &lt;strong&gt;Footer&lt;/strong&gt; component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/
└── components/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We call our handy new &lt;code&gt;pls_react_function_component&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pls_react_function_component src/components/Footer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This will create the following folder structure and files.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/
└── components/
    └── Footer/
        ├── Footer.js
        └── index.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/components/Footer/Footer.js contents&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&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;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Footer&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Fragment&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/React.Fragment&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&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="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/components/Footer/index.js contents&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;default&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="s1"&gt;./Footer&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;
  
  
  💡 The code &lt;em&gt;&lt;sup&gt;&lt;sup&gt;finally&lt;/sup&gt;&lt;/sup&gt;&lt;/em&gt;
&lt;/h3&gt;


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



&lt;h4&gt;
  
  
  &lt;strong&gt;⚠ A few warnings:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;I'm very aware some things might be better and that's why I'm also sharing the code, I'm quite a beginner with shell scripting, so if you find something that could be better, please, comment with any feedback you have 🙏.&lt;/li&gt;
&lt;li&gt;The first line, &lt;em&gt;the shebang&lt;/em&gt;, has zsh instead of the usual bash because I use &lt;a href="http://zsh.sourceforge.net/" rel="noopener noreferrer"&gt;ZShell&lt;/a&gt; as preferred terminal to work with. You can change it to &lt;code&gt;#!/bin/bash&lt;/code&gt; if needed.&lt;/li&gt;
&lt;li&gt;The file is structured to be added to the functions your terminal pre-loads, but you can use it however you like.&lt;/li&gt;
&lt;li&gt;You might not agree with the &lt;em&gt;styling&lt;/em&gt; of my code (i.e. tab size, arrow function, exporting, etc) but you are invited to edit, remix and tinker away with the code to suit your needs!&lt;/li&gt;
&lt;li&gt;I advice once you've copied/cloned the gist, remove the extension for a better use as proper command. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ok that's it from me for now, if I update this script in anyway I'll update the gist on this post too. Let me know if you used it or found it useful.&lt;/p&gt;

&lt;p&gt;If you are shy a ❤ or 🦄 will be enough!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; I made a script for your terminal to create React Function Components easily.&lt;br&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%2Fi%2Fl0tqcbd9t7tgxxfl2zek.png" 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%2Fi%2Fl0tqcbd9t7tgxxfl2zek.png" alt="Example of the command pls_react_function_component being used on my console" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>productivity</category>
      <category>bash</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
