<?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: Mateus V. Farias</title>
    <description>The latest articles on DEV Community by Mateus V. Farias (@fariasmateuss).</description>
    <link>https://dev.to/fariasmateuss</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%2F520965%2F39903632-8f2a-4726-897a-f564d3a74db4.jpg</url>
      <title>DEV Community: Mateus V. Farias</title>
      <link>https://dev.to/fariasmateuss</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fariasmateuss"/>
    <language>en</language>
    <item>
      <title>The Importance of a Design System: Lessons from Steam UI</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Tue, 14 Jan 2025 00:10:44 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/the-problem-of-not-having-a-design-system-in-place-4m14</link>
      <guid>https://dev.to/fariasmateuss/the-problem-of-not-having-a-design-system-in-place-4m14</guid>
      <description>&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%2Frsd0zmpd6irutbj098np.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%2Frsd0zmpd6irutbj098np.jpeg" alt="Steam UI Inconsistencies" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yes, this is the Steam app!  &lt;/p&gt;

&lt;p&gt;Now, imagine the confusion and difficulty in developing new features or maintaining this mess!  &lt;/p&gt;

&lt;p&gt;When there isn’t a design system in place, it’s common for teams to rely on existing references. But what happens when the same element appears in three (or more!) different styles for the same purpose? Chaos ensues.  &lt;/p&gt;

&lt;p&gt;The image below highlights the result of not having a unified design system. Search bars, tab menus, dropdowns, and buttons—each category showcases inconsistencies in appearance, interaction, and purpose. These inconsistencies not only create confusion for developers and designers but also impact user experience, leaving users to navigate through a fragmented interface.&lt;/p&gt;

&lt;p&gt;A design system solves this by providing a single source of truth—a library of reusable components, patterns, and standards. It ensures visual and functional consistency across the platform, speeds up development, and makes future updates seamless. For apps like Steam, implementing a design system could prevent issues like these and lay the groundwork for a cohesive, scalable design strategy.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Source: &lt;a href="https://www.reddit.com/r/Steam/comments/tisoop/the_amazing_consistency_of_steams_ui/" rel="noopener noreferrer"&gt;Reddit - The Amazing Consistency of Steam's UI&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Generating GPG Keys and Signing Commits</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Wed, 24 Jul 2024 21:56:57 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/generating-gpg-keys-and-signing-commits-j3e</link>
      <guid>https://dev.to/fariasmateuss/generating-gpg-keys-and-signing-commits-j3e</guid>
      <description>&lt;p&gt;Generating a GPG key and using it to sign your Git commits is a recommended practice to ensure the authenticity and integrity of your code. In this post, we'll explore the step-by-step process.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Installing GPG
&lt;/h2&gt;

&lt;p&gt;First, you need to install GPG (GNU Privacy Guard) on your machine. Depending on your operating system, you can use the following commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;For Ubuntu/Debian:&lt;/strong&gt; &lt;code&gt;sudo apt-get install gnupg&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For macOS:&lt;/strong&gt; &lt;code&gt;brew install gnupg&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For Windows:&lt;/strong&gt; Download and install Gpg4win from the official website.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Checking Existing Keys
&lt;/h2&gt;

&lt;p&gt;Before generating a new GPG key, it's advisable to check if any existing keys have been generated on your machine. To do this, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gpg &lt;span class="nt"&gt;--list-keys&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If no keys are listed, you can proceed to generate a new GPG key.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Generating a GPG Key
&lt;/h2&gt;

&lt;p&gt;Once GPG is installed, the next step is to generate a new key. Run the following command in the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gpg &lt;span class="nt"&gt;--full-generate-key&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will be prompted to provide some information such as the type of key, size, validity period, name, and email. Follow the on-screen instructions to complete the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Exporting the Public Key
&lt;/h2&gt;

&lt;p&gt;After generating your key, you will need to export the public key to associate it with your profile on GitHub or another Git service. Use the command below to export your public key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gpg &lt;span class="nt"&gt;--armor&lt;/span&gt; &lt;span class="nt"&gt;--export&lt;/span&gt; YOUR_KEY_ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace "YOUR_KEY_ID" with the ID of your key, which can be found with the command &lt;code&gt;gpg --list-keys&lt;/code&gt; or &lt;code&gt;gpg --list-secret-key --keyid-format LONG&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Linking the Key to GitHub
&lt;/h2&gt;

&lt;p&gt;Copy the output of the previous command and go to your account settings on GitHub. In the "SSH and GPG keys" section, add a new GPG key and paste the public key that you copied.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account" rel="noopener noreferrer"&gt;GitHub Docs: Adding a GPG key to your GitHub account&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Setting Up Git to Use the GPG Key
&lt;/h2&gt;

&lt;p&gt;Now, you need to configure Git to sign your commits with your GPG key. Execute the following commands replacing "YOUR_KEY_ID" with your key ID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.signingkey YOUR_KEY_ID
git config &lt;span class="nt"&gt;--global&lt;/span&gt; commit.gpgSign &lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Signing Commits
&lt;/h2&gt;

&lt;p&gt;With all configurations completed, you can start signing your commits. When making a commit, Git automatically uses your GPG key to sign it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Your commit message"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To verify if the commit was signed correctly, you can use the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git log &lt;span class="nt"&gt;--show-signature&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Signing your commits with a GPG key is an excellent way to enhance the security and reliability of your code. This guide should help you set up and effectively use GPG keys to sign your commits.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>tooling</category>
      <category>privacy</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Share recommendation Visual Studio Code extensions</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Mon, 14 Nov 2022 05:43:57 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/share-recommendation-visual-studio-code-extensions-5bjd</link>
      <guid>https://dev.to/fariasmateuss/share-recommendation-visual-studio-code-extensions-5bjd</guid>
      <description>&lt;p&gt;When we're working in a team, we would like to use the same set of tools to make the development process more robust and productive.&lt;/p&gt;

&lt;p&gt;With Visual Studio Code, it makes sense to use the same set of extensions.&lt;/p&gt;

&lt;p&gt;You can share the extensions with other people in your team by creating a file &lt;code&gt;extensions.json&lt;/code&gt; located in the &lt;code&gt;.vscode&lt;/code&gt; folder.&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;"recommendations"&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="s2"&gt;"dbaeumer.vscode-eslint"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"esbenp.prettier-vscode"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"svelte.svelte-vscode"&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;p&gt;The &lt;code&gt;recommendations&lt;/code&gt; key contains the list of extensions which each of them is defined by an extension identifier.&lt;/p&gt;

&lt;p&gt;You can see the list of installed extensions by running the command:&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;code &lt;span class="nt"&gt;--list-extensions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dbaeumer.vscode-eslint
rvest.vs-code-prettier-eslint
svelte.svelte-vscode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow me on &lt;a href="https://twitter.com/fariasmateuss"&gt;Twitter&lt;/a&gt; and &lt;a href="https://github.com/fariasmateuss"&gt;GitHub&lt;/a&gt; to get more useful contents.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>vscode</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Compose multiple React providers</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Mon, 14 Nov 2022 05:03:25 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/compose-multiple-react-providers-4oc4</link>
      <guid>https://dev.to/fariasmateuss/compose-multiple-react-providers-4oc4</guid>
      <description>&lt;p&gt;Nowadays, it is commom to use React's context at the root of an application to manage a shared state between any components.&lt;/p&gt;

&lt;p&gt;For example, checking whether or not the current user has logged in might be a accomplished by &lt;code&gt;AuthProvider&lt;/code&gt; provider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="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;AuthProvider&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;{...}&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/AuthProvider&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using multiple providers could make the code harder to read because there are a lot of nested components:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="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;Router&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;AuthProvider&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ThemeProvider&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;LocalizationProvider&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;{...}&lt;/span&gt;
                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/LocalizationProvider&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ThemeProvider&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/AuthProvider&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Router&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The providers can be composed together by using the &lt;code&gt;reduce&lt;/code&gt; function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;compose&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;providers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
    &lt;span class="nx"&gt;providers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;Prev&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Curr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Prev&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Curr&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Curr&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Prev&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The provider declarations in the root can be shorten below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Provider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;compose&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="nx"&gt;Router&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;AuthProvider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;ThemeProvider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;LocalizationProvider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="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;Provider&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;{...}&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Provider&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope it is helpful for you.&lt;/p&gt;

</description>
      <category>react</category>
      <category>tutorial</category>
      <category>architecture</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>Do not render page while hydration</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Mon, 10 Oct 2022 02:44:18 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/do-not-render-page-while-hydration-3hn8</link>
      <guid>https://dev.to/fariasmateuss/do-not-render-page-while-hydration-3hn8</guid>
      <description>&lt;p&gt;Handles the mounted state of the component.&lt;/p&gt;

&lt;p&gt;Useful for cases where a content should only be rendered on the browser and the DOM should stay the same on the server and on the re-hydration process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--avsCDSbf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/liejbvwmk8mikjzrmifo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--avsCDSbf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/liejbvwmk8mikjzrmifo.png" alt="Image description" width="880" height="631"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why React is so popular</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Sat, 19 Feb 2022 05:00:39 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/why-react-is-so-popular-13od</link>
      <guid>https://dev.to/fariasmateuss/why-react-is-so-popular-13od</guid>
      <description>&lt;h2&gt;
  
  
  A Brief History
&lt;/h2&gt;

&lt;p&gt;2011 — Designed and createcd in Facebook for internal use.&lt;br&gt;
2012 — Instagram Started using it.&lt;br&gt;
2013 — Open-sourced.&lt;br&gt;
2015 — Open-sourced React Native for building native iOS and Android apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  React is a library, not a framework
&lt;/h2&gt;

&lt;p&gt;Its library approach has allowed React to evolve into such a great tool.&lt;/p&gt;

&lt;p&gt;The main advantage is that &lt;strong&gt;Libraries&lt;/strong&gt; are lightweight, and there is a freedom to choose different tools.&lt;/p&gt;

&lt;p&gt;The Framework creates an entire ecosystem to build an app, and you don't have an easy way to use tools outside of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  It is Flexible
&lt;/h2&gt;

&lt;p&gt;Once you've learned React, you can use it for a vast variety of projects.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate a static site using &lt;strong&gt;Gatsby&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;Add server rendering with &lt;strong&gt;Next.js&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;Build mobile apps with &lt;strong&gt;React Native&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;Create a virtual reality website for 360 experiences using &lt;strong&gt;React VR&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Great Dev Experience
&lt;/h2&gt;

&lt;p&gt;Rapid development and small API combined create a fantastic developer experience. The API has very few concepts and is very simple to learn.&lt;/p&gt;

&lt;p&gt;You just need to import the React library and create a component that accepts props and returns JSX, which converts API calls and renders HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Supported by Meta
&lt;/h2&gt;

&lt;p&gt;React is heavily used in Meta's apps like Facebook and Instagram. That's why Meta is deeply committed to it.&lt;/p&gt;

&lt;p&gt;The top four React contributors on GitHub are full-time Meta employees.&lt;/p&gt;

&lt;p&gt;The React team maintains a blog that gives you details for each release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Broad Community Support
&lt;/h2&gt;

&lt;p&gt;Since 2015, React's popularity has grown steadily. It has a massive active community and its GitHub Repository has over 183k Stars.&lt;/p&gt;

&lt;p&gt;It is one of the Top 5 Repositories on GitHub.&lt;/p&gt;

&lt;p&gt;Have you used the React library to build something? &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>webdev</category>
      <category>react</category>
      <category>opensource</category>
    </item>
    <item>
      <title>The Psychology of Color: Use color to enhance learning 👨‍🎨</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Tue, 23 Mar 2021 18:24:49 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/the-psychology-of-color-use-color-to-enhance-learning-fn1</link>
      <guid>https://dev.to/fariasmateuss/the-psychology-of-color-use-color-to-enhance-learning-fn1</guid>
      <description>&lt;p&gt;“Colors aren’t important.”&lt;/p&gt;

&lt;p&gt;Oh yeah - then how do you explain traffic lights, warning signs, and rainbows? Color is important, and it’s time we pay attention to color in eLearning too.&lt;/p&gt;

&lt;p&gt;Learning is a difficult field to understand, and there’s so much research out there discussing these issues that it’s hard to know where to begin. What’s pretty obvious though is that color plays a key role in creating an environment that fosters learning.&lt;/p&gt;

&lt;p&gt;Using the right color, and the correct selection and placement can seriously affect feelings, attention, and behavior when learning. It’s time that we leveraged that to our advantage.&lt;/p&gt;

&lt;h1&gt;
  
  
  Power Up Setup
&lt;/h1&gt;

&lt;p&gt;First, make shine ✨ &lt;/p&gt;

&lt;p&gt;I'm using Manjaro OS and theme zsh.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y06Z1Urh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wln2kms90fz0951mhqdd.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y06Z1Urh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wln2kms90fz0951mhqdd.jpeg" alt="Alt Text" width="880" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PowerLevel10k: A Zsh theme&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/romkatv"&gt;
        romkatv
      &lt;/a&gt; / &lt;a href="https://github.com/romkatv/powerlevel10k"&gt;
        powerlevel10k
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A Zsh theme
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Powerlevel10k&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://gitter.im/powerlevel10k/community?utm_source=badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=pr-badge" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/41fa27a1b28b46f8a0aefd001a311de44f840877840638001c65e5a2de1f3114/68747470733a2f2f6261646765732e6769747465722e696d2f706f7765726c6576656c31306b2f636f6d6d756e6974792e737667" alt="Gitter"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Powerlevel10k is a theme for Zsh. It emphasizes &lt;a href="https://github.com/romkatv/powerlevel10k#uncompromising-performance"&gt;speed&lt;/a&gt;
&lt;a href="https://github.com/romkatv/powerlevel10k#extremely-customizable"&gt;flexibility&lt;/a&gt; and &lt;a href="https://github.com/romkatv/powerlevel10k#configuration-wizard"&gt;out-of-the-box experience&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/prompt-styles-high-contrast.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BDRwDQ-E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/prompt-styles-high-contrast.png" alt="Powerlevel10k"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#getting-started"&gt;Getting started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#features"&gt;Features&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#installation"&gt;Installation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#configuration"&gt;Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#fonts"&gt;Fonts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#try-it-in-docker"&gt;Try it in Docker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#license"&gt;License&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#faq"&gt;FAQ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#troubleshooting"&gt;Troubleshooting&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Getting started&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k"&gt;Install the recommended font&lt;/a&gt;. &lt;em&gt;Optional but highly
recommended.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/romkatv/powerlevel10k#installation"&gt;Install Powerlevel10k&lt;/a&gt; itself.&lt;/li&gt;
&lt;li&gt;Restart Zsh with &lt;code&gt;exec zsh&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;p10k configure&lt;/code&gt; if the configuration wizard doesn't start automatically.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#configuration-wizard"&gt;Configuration wizard&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#uncompromising-performance"&gt;Uncompromising performance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#powerlevel9k-compatibility"&gt;Powerlevel9k compatibility&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#pure-compatibility"&gt;Pure compatibility&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#instant-prompt"&gt;Instant prompt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#show-on-command"&gt;Show on command&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#transient-prompt"&gt;Transient prompt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#current-directory-that-just-works"&gt;Current directory that just works&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#extremely-customizable"&gt;Extremely customizable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#batteries-included"&gt;Batteries included&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k#extensible"&gt;Extensible&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Configuration wizard&lt;/h3&gt;
&lt;p&gt;Type &lt;code&gt;p10k configure&lt;/code&gt; to access the builtin configuration wizard right from your terminal.&lt;/p&gt;

  Screen recording
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/configuration-wizard.gif"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VuwJiJpW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/configuration-wizard.gif" alt="Powerlevel10k Configuration Wizard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All styles except &lt;a href="https://github.com/romkatv/powerlevel10k#pure-compatibility"&gt;Pure&lt;/a&gt; are functionally equivalent. They display the same
information and differ only in presentation.&lt;/p&gt;
&lt;p&gt;Configuration wizard creates &lt;code&gt;~/.p10k.zsh&lt;/code&gt; based on your preferences. Additional prompt
customization can be done by editing this file. It has plenty of comments to help you navigate
through configuration options.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Tip&lt;/em&gt;…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/romkatv/powerlevel10k"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;LSDeluxe: The next gen ls command&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Peltoche"&gt;
        Peltoche
      &lt;/a&gt; / &lt;a href="https://github.com/Peltoche/lsd"&gt;
        lsd
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      The next gen ls command
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
LSD (LSDeluxe)&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://raw.githubusercontent.com/Peltoche/lsd/master/LICENSE" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/9bdb13f27f9ae31ba75b4266117a27e2f69886c646297e647c752602072eaa05/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d41706163686525323076322d626c75652e737667" alt="license"&gt;&lt;/a&gt;
&lt;a href="https://crates.io/crates/lsd" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/b31dfd757342192487ea05d8294ef960bc47d04352e58c9ff23a6ab4e3e4153e/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f6c73642e737667" alt="Latest version"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Peltoche/lsd/actions"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uHej5wnA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/Peltoche/lsd/workflows/CICD/badge.svg" alt="build"&gt;&lt;/a&gt;
&lt;a href="https://codecov.io/gh/Peltoche/lsd" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/e5c953c5e86ac1836f13c549a6ce849b381b4122909addc7bbd38cfe867cd158/68747470733a2f2f636f6465636f762e696f2f67682f50656c746f6368652f6c73642f6272616e63682f6d61737465722f67726170682f62616467652e737667" alt="codecov"&gt;&lt;/a&gt;
&lt;a href="https://repology.org/project/lsd/versions" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/225df3a35dcd10347c78120343ec65920af35d428dc41b95c993e0f952413ff4/68747470733a2f2f696d672e736869656c64732e696f2f7265706f6c6f67792f7265706f7369746f726965732f6c7364" alt="versions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/Peltoche/lsd/assets/screen_lsd.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h7oGZmdc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/Peltoche/lsd/assets/screen_lsd.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This project is a rewrite of GNU &lt;code&gt;ls&lt;/code&gt; with lots of added features like colors, icons, tree-view, more formatting options etc
The project is heavily inspired by the super &lt;a href="https://github.com/athityakumar/colorls"&gt;colorls&lt;/a&gt; project.&lt;/p&gt;
&lt;h2&gt;
Installation&lt;/h2&gt;

Packaging status
&lt;a href="https://repology.org/project/lsd/versions" rel="nofollow"&gt;
    &lt;img src="https://camo.githubusercontent.com/a2454ce2f128a70f71a2368b79cb9bd637f38a8c5733626ad1c5ea988b26ec69/68747470733a2f2f7265706f6c6f67792e6f72672f62616467652f766572746963616c2d616c6c7265706f732f6c73642e7376673f636f6c756d6e733d33" alt="Packaging status"&gt;
&lt;/a&gt;

&lt;h3&gt;
Prerequisites&lt;/h3&gt;
&lt;p&gt;Install the patched fonts of powerline nerd-font and/or font-awesome. Have a look at the &lt;a href="https://github.com/ryanoasis/nerd-fonts/blob/master/readme.md"&gt;Nerd Font README&lt;/a&gt; for more installation instructions. Don't forget to setup your terminal in order to use the correct font.&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OS/Distro&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Archlinux&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pacman -S lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fedora&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dnf install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gentoo&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sudo emerge sys-apps/lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;macOS&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;brew install lsd&lt;/code&gt; or &lt;code&gt;sudo port install lsd&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NixOS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nix-env -iA nixos.lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FreeBSD&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pkg install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NetBSD or any &lt;code&gt;pkgsrc&lt;/code&gt; platform&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;pkgin install lsd&lt;/code&gt; or &lt;code&gt;cd /usr/pkgsrc/sysutils/lsd &amp;amp;&amp;amp; make install&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows&lt;/td&gt;
&lt;td&gt;&lt;code&gt;scoop install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Android (via Termux)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pkg install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ubuntu/Debian based distro&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sudo dpkg -i lsd_0.23.1_amd64.deb&lt;/code&gt; get &lt;code&gt;.deb&lt;/code&gt; file from &lt;a href="https://github.com/Peltoche/lsd/releases"&gt;release page&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Solus&lt;/td&gt;
&lt;td&gt;&lt;code&gt;eopkg it lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Void Linux&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sudo xbps-install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;openSUSE&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sudo&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Peltoche/lsd"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Tilda: A Gtk based drop down terminal for Linux and Unix&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Peltoche"&gt;
        Peltoche
      &lt;/a&gt; / &lt;a href="https://github.com/Peltoche/lsd"&gt;
        lsd
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      The next gen ls command
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
LSD (LSDeluxe)&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://raw.githubusercontent.com/Peltoche/lsd/master/LICENSE" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/9bdb13f27f9ae31ba75b4266117a27e2f69886c646297e647c752602072eaa05/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d41706163686525323076322d626c75652e737667" alt="license"&gt;&lt;/a&gt;
&lt;a href="https://crates.io/crates/lsd" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/b31dfd757342192487ea05d8294ef960bc47d04352e58c9ff23a6ab4e3e4153e/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f6c73642e737667" alt="Latest version"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Peltoche/lsd/actions"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uHej5wnA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/Peltoche/lsd/workflows/CICD/badge.svg" alt="build"&gt;&lt;/a&gt;
&lt;a href="https://codecov.io/gh/Peltoche/lsd" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/e5c953c5e86ac1836f13c549a6ce849b381b4122909addc7bbd38cfe867cd158/68747470733a2f2f636f6465636f762e696f2f67682f50656c746f6368652f6c73642f6272616e63682f6d61737465722f67726170682f62616467652e737667" alt="codecov"&gt;&lt;/a&gt;
&lt;a href="https://repology.org/project/lsd/versions" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/225df3a35dcd10347c78120343ec65920af35d428dc41b95c993e0f952413ff4/68747470733a2f2f696d672e736869656c64732e696f2f7265706f6c6f67792f7265706f7369746f726965732f6c7364" alt="versions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/Peltoche/lsd/assets/screen_lsd.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h7oGZmdc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/Peltoche/lsd/assets/screen_lsd.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This project is a rewrite of GNU &lt;code&gt;ls&lt;/code&gt; with lots of added features like colors, icons, tree-view, more formatting options etc
The project is heavily inspired by the super &lt;a href="https://github.com/athityakumar/colorls"&gt;colorls&lt;/a&gt; project.&lt;/p&gt;
&lt;h2&gt;
Installation&lt;/h2&gt;

Packaging status
&lt;a href="https://repology.org/project/lsd/versions" rel="nofollow"&gt;
    &lt;img src="https://camo.githubusercontent.com/a2454ce2f128a70f71a2368b79cb9bd637f38a8c5733626ad1c5ea988b26ec69/68747470733a2f2f7265706f6c6f67792e6f72672f62616467652f766572746963616c2d616c6c7265706f732f6c73642e7376673f636f6c756d6e733d33" alt="Packaging status"&gt;
&lt;/a&gt;

&lt;h3&gt;
Prerequisites&lt;/h3&gt;
&lt;p&gt;Install the patched fonts of powerline nerd-font and/or font-awesome. Have a look at the &lt;a href="https://github.com/ryanoasis/nerd-fonts/blob/master/readme.md"&gt;Nerd Font README&lt;/a&gt; for more installation instructions. Don't forget to setup your terminal in order to use the correct font.&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OS/Distro&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Archlinux&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pacman -S lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fedora&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dnf install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gentoo&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sudo emerge sys-apps/lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;macOS&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;brew install lsd&lt;/code&gt; or &lt;code&gt;sudo port install lsd&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NixOS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nix-env -iA nixos.lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FreeBSD&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pkg install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NetBSD or any &lt;code&gt;pkgsrc&lt;/code&gt; platform&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;pkgin install lsd&lt;/code&gt; or &lt;code&gt;cd /usr/pkgsrc/sysutils/lsd &amp;amp;&amp;amp; make install&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows&lt;/td&gt;
&lt;td&gt;&lt;code&gt;scoop install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Android (via Termux)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pkg install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ubuntu/Debian based distro&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sudo dpkg -i lsd_0.23.1_amd64.deb&lt;/code&gt; get &lt;code&gt;.deb&lt;/code&gt; file from &lt;a href="https://github.com/Peltoche/lsd/releases"&gt;release page&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Solus&lt;/td&gt;
&lt;td&gt;&lt;code&gt;eopkg it lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Void Linux&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sudo xbps-install lsd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;openSUSE&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sudo&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Peltoche/lsd"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h1&gt;
  
  
  Show your setup
&lt;/h1&gt;

&lt;p&gt;Post your setup in the comments 👇&lt;/p&gt;

</description>
      <category>linux</category>
      <category>productivity</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CSS Tips: Relative units with EM and REM</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Mon, 15 Mar 2021 05:03:43 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/css-tips-relative-units-with-em-and-rem-3n38</link>
      <guid>https://dev.to/fariasmateuss/css-tips-relative-units-with-em-and-rem-3n38</guid>
      <description>&lt;p&gt;We have already seen the use of the relative unit of measure with %. We use this relative measure when we want an element to use, for example, 100% of the available space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&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;div&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;"img/avatar.png"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Avatar"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&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;400px&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;In the example above, depending on the size of the image, the image may exceed the space we defined for the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; or it may occupy a smaller space. If we want the image to occupy the entire space of the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, we can use the relative unit %:&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;div&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;400px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&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;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="c"&gt;/* It occupies 100% of the available space */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The great advantage of using % is that no matter what size we put in &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; will always follow the size of its parent tag (the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;EM and REM have the same concept as %, but instead of being based on the size of an element, these measures are based on the size of the font. EM uses the font size of the parent element and REM uses the font size of &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&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;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;An example&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&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;src=&lt;/span&gt;&lt;span class="s"&gt;"img/avatar.png"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Avatar"&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;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;html&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;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;div&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;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&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;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* The width will be 200px */&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;10rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* The height will be 100px */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The advantage of using these measures is that if we have other elements using these measures and we need to change the size of all the elements proportionately, just change them in one place. These units of measure are ideal for when the website needs to be displayed on different screen sizes, where on each screen size the font must be displayed on different size scales and proportional to each other.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>html</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Toggle Between Dark/Light Modes with HTML5 web storage API</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Thu, 31 Dec 2020 04:23:12 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/toggle-between-dark-light-modes-with-html5-web-storage-api-14d8</link>
      <guid>https://dev.to/fariasmateuss/toggle-between-dark-light-modes-with-html5-web-storage-api-14d8</guid>
      <description>&lt;p&gt;Dark-theme is a really simple dark mode library that enables a switcher to toggle between dark and light modes on the web application.&lt;/p&gt;

&lt;p&gt;Written in vanilla JavaScript. Uses HTML5 web storage API (local storage) to save the current theme on the client-side.&lt;/p&gt;

&lt;p&gt;How to use it:&lt;/p&gt;

&lt;p&gt;Create a checkbox based toggle switch on the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"toggle"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"switch"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"checkbox"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"theme"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"switch"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Toggle&lt;span class="nt"&gt;&amp;lt;/label&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="nt"&gt;input&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;checkbox&lt;/span&gt;&lt;span class="o"&gt;]&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;0&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;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;visibility&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="nt"&gt;label&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="nl"&gt;text-indent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-9999px&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;52px&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;27px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;right&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;100px&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;label&lt;/span&gt;&lt;span class="nd"&gt;::after&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="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;3px&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;3px&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;20px&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;20px&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="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;90px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.3s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="nd"&gt;:checked&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nt"&gt;label&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="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color-headings&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="nd"&gt;:checked&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nt"&gt;label&lt;/span&gt;&lt;span class="nd"&gt;::after&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="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="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateX&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="nt"&gt;label&lt;/span&gt;&lt;span class="nd"&gt;:active:after&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;45px&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;Determine the styles on the light mode using the following CSS variables.&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;html&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#FCFCFC&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="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="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--bg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main JavaScript to enable the dark mode switcher and determine the CSS styles on the dark mode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;checkbox&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;input[name=theme]&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
  &lt;span class="nb"&gt;window&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getComputedStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getPropertyValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;initialColors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;getStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;--bg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;darkMode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#333333&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// override styles here&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;transformKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;--&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;([&lt;/span&gt;&lt;span class="sr"&gt;A-Z&lt;/span&gt;&lt;span class="se"&gt;])&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;-$1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;changeColors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
    &lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;transformKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nx"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; 
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;checkbox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;change&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checked&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;changeColors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;darkMode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;changeColors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;initialColors&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;Create local storage.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isExistLocalStorage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createOrEditLocalStorage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getValeuLocalStorage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="nx"&gt;checkbox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;change&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checked&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;changeColors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;darkMode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;createOrEditLocalStorage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;darkMode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;changeColors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;initialColors&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;createOrEditLocalStorage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;initialColors&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;isExistLocalStorage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="nx"&gt;createOrEditLocalStorage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;initialColors&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;getValeuLocalStorage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;initialColors&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;checkbox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;removeAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;checked&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;changeColors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;initialColors&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;checkbox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;checked&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;changeColors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;darkMode&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;Now, try it! &lt;/p&gt;

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

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>HTTP Status Codes</title>
      <dc:creator>Mateus V. Farias</dc:creator>
      <pubDate>Tue, 08 Dec 2020 04:30:25 +0000</pubDate>
      <link>https://dev.to/fariasmateuss/http-status-codes-3olc</link>
      <guid>https://dev.to/fariasmateuss/http-status-codes-3olc</guid>
      <description>&lt;h3&gt;
  
  
  What are they and what are they for?
&lt;/h3&gt;

&lt;h2&gt;
  
  
  &lt;span&gt;1XX - Informational&lt;/span&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Indicates only one information. Examples:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;100 - Continue.&lt;br&gt;
102 - Processing&lt;/p&gt;

&lt;h2&gt;
  
  
  2XX - Success
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Indicates successful request. Examples:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;200 - OK&lt;br&gt;
201 - Created&lt;br&gt;
202 - Accepted&lt;/p&gt;

&lt;h2&gt;
  
  
  3XX - Redirection
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Indicates a redial. Examples:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;301 - Moved Permanently&lt;br&gt;
308 - Permanent Redirect&lt;/p&gt;

&lt;h2&gt;
  
  
  4XX - Client Error
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Indicates an error on the client side. An example that we all face is when we enter the URL incorrectly. Examples:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;400 - Bad Request&lt;br&gt;
401 - Unauthorized&lt;br&gt;
403 - Forbidden&lt;br&gt;
404 - Not found&lt;/p&gt;

&lt;h2&gt;
  
  
  5XX - Server Error
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Indicator an error on the server side. Examples:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;500 - Internal Server Error&lt;br&gt;
502 Bad Gateway&lt;br&gt;
503 - Service Unavailable&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devops</category>
      <category>webdev</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
