<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Akram A. Abdelbasir</title>
    <description>The latest articles on Forem by Akram A. Abdelbasir (@ak_ram).</description>
    <link>https://forem.com/ak_ram</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%2F639482%2F014a46ae-1ac7-438c-9800-8476ca8b164a.png</url>
      <title>Forem: Akram A. Abdelbasir</title>
      <link>https://forem.com/ak_ram</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ak_ram"/>
    <language>en</language>
    <item>
      <title>Asynchronous JavaScript Operations: Understanding, Canceling, Pausing, and Resuming</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Sun, 24 Sep 2023 14:47:31 +0000</pubDate>
      <link>https://forem.com/ak_ram/asynchronous-javascript-operations-understanding-canceling-pausing-and-resuming-4ih5</link>
      <guid>https://forem.com/ak_ram/asynchronous-javascript-operations-understanding-canceling-pausing-and-resuming-4ih5</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Asynchronous JavaScript operations have become a fundamental concept in modern web development. They allow us to execute tasks without blocking the main thread, resulting in a more responsive and efficient user experience. In this article, we will explore what asynchronous operations are in JavaScript, how to cancel them, and how to pause and resume them. We will also provide real-life examples to help you understand the practical implementation of these concepts.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What is an Asynchronous Operation in JavaScript?
&lt;/h2&gt;

&lt;p&gt;In JavaScript, an asynchronous operation is a task that is executed separately from the main execution thread. It allows the program to continue running while the task is being processed, instead of waiting for it to complete. This is particularly useful for time-consuming operations, such as fetching data from an API or performing complex calculations, as it prevents the user interface from freezing and ensures a smooth user experience.&lt;/p&gt;

&lt;p&gt;JavaScript provides several mechanisms for handling asynchronous operations, including callbacks, promises, and async/await. These mechanisms allow developers to write code that can be executed asynchronously, making it easier to manage complex workflows and improve overall performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. How to Cancel an Asynchronous Operation
&lt;/h2&gt;

&lt;p&gt;In some cases, you may need to cancel an ongoing asynchronous operation, especially if the user initiates another action or if the operation becomes unnecessary. While cancellation depends on the specific implementation of the asynchronous operation, there are a few common approaches:&lt;/p&gt;

&lt;h3&gt;
  
  
  2.1 Using Promises
&lt;/h3&gt;

&lt;p&gt;If you are using promises to handle asynchronous operations, you can cancel the operation by using a cancellation token. A cancellation token is a mechanism that allows you to notify the ongoing operation that it should be canceled. Here's an example:&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;promise&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;onCancel&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;timeoutId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;setTimeout&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;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Operation completed successfully.&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="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;onCancel&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;clearTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;timeoutId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Operation canceled.&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="c1"&gt;// To cancel the operation:&lt;/span&gt;
&lt;span class="nx"&gt;promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cancel&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 above example, we create a promise that resolves after a timeout of 5 seconds. We use the &lt;code&gt;onCancel&lt;/code&gt; function to handle cancellation. When the &lt;code&gt;cancel&lt;/code&gt; method is called on the promise, it will execute the cancellation logic, rejecting the promise with an error message.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2 Using Event Emitters
&lt;/h3&gt;

&lt;p&gt;Another approach to canceling an asynchronous operation is by using event emitters. Event emitters allow you to emit events and listen for them in different parts of your code. You can emit a cancellation event and handle it appropriately to cancel the ongoing operation. Here's an example:&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;EventEmitter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;events&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;MyEmitter&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;EventEmitter&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;emitter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;MyEmitter&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;emitter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cancel&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Cancel the ongoing operation&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// To cancel the operation:&lt;/span&gt;
&lt;span class="nx"&gt;emitter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cancel&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we create an event emitter and listen for the 'cancel' event. When the event is emitted, we can handle it by canceling the ongoing operation.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. How to Pause and Resume an Asynchronous Operation
&lt;/h2&gt;

&lt;p&gt;Sometimes you may need to pause an ongoing asynchronous operation temporarily and resume it later. This can be useful when you want to prioritize other tasks or when you need to wait for user input. While pausing and resuming asynchronous operations may not be a built-in feature, you can achieve it with some additional coding.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.1 Using Generators
&lt;/h3&gt;

&lt;p&gt;Generators in JavaScript provide a powerful mechanism for implementing pausable and resumable operations. By using the &lt;code&gt;yield&lt;/code&gt; keyword, you can pause the execution of a generator function and later resume it. Here's an example:&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;function&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;pausableOperation&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Start&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;yield&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Resume&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;generator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;pausableOperation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// To pause the operation:&lt;/span&gt;
&lt;span class="nx"&gt;generator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// To resume the operation:&lt;/span&gt;
&lt;span class="nx"&gt;generator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we define a generator function called &lt;code&gt;pausableOperation&lt;/code&gt;. When the function is called, it logs 'Start' and then yields. By calling &lt;code&gt;generator.next()&lt;/code&gt;, we can pause and resume the operation. The first call to &lt;code&gt;generator.next()&lt;/code&gt; logs 'Start', and the second call logs 'Resume'.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2 Using Promises and Async/Await
&lt;/h3&gt;

&lt;p&gt;If you are using promises or the async/await syntax, you can achieve pausing and resuming by combining them with a loop. Here's an example:&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;function&lt;/span&gt; &lt;span class="nx"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ms&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="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&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;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ms&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;pausableOperation&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Start&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Resume&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;let&lt;/span&gt; &lt;span class="nx"&gt;paused&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;runOperation&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&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;paused&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;pausableOperation&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="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Topause the operation:&lt;/span&gt;
&lt;span class="nx"&gt;paused&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// To resume the operation:&lt;/span&gt;
&lt;span class="nx"&gt;paused&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we define a &lt;code&gt;pausableOperation&lt;/code&gt; function that logs 'Start' and waits for 2 seconds using the &lt;code&gt;delay&lt;/code&gt; function. We also define a &lt;code&gt;runOperation&lt;/code&gt; function that runs the &lt;code&gt;pausableOperation&lt;/code&gt; in a loop. By setting the &lt;code&gt;paused&lt;/code&gt; variable to &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;, we can pause and resume the operation accordingly.&lt;/p&gt;

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

&lt;p&gt;Understanding how to handle asynchronous operations is crucial in modern web development. Being able to cancel, pause, and resume operations allows us to create more responsive and efficient applications. In this article, we explored different approaches to canceling asynchronous operations, such as using promises and event emitters. We also looked at how to pause and resume operations using generators, promises, and async/await. By mastering these concepts, you can take your JavaScript skills to the next level and build robust and user-friendly applications.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CSS Shadow Animation 🌟</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Sun, 23 Oct 2022 15:56:23 +0000</pubDate>
      <link>https://forem.com/ak_ram/css-shadow-animation-36p7</link>
      <guid>https://forem.com/ak_ram/css-shadow-animation-36p7</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a6sQ2sOB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fb9vdk5uq4l02em50wkv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a6sQ2sOB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fb9vdk5uq4l02em50wkv.gif" alt="CSS Shadow Animation Image" width="600" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can access the code from &lt;a href="https://codepen.io/Akr-am/full/JjvedzJ"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>design</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Holy Grail Flexbox Layout 🎃</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Sun, 23 Oct 2022 12:07:19 +0000</pubDate>
      <link>https://forem.com/ak_ram/holy-grail-flexbox-layout-3og7</link>
      <guid>https://forem.com/ak_ram/holy-grail-flexbox-layout-3og7</guid>
      <description>&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Holy_grail_(web_design)" rel="noopener noreferrer"&gt;The Holy Grail Layout&lt;/a&gt; is a well-known CSS issue that has had a number of remedies throughout time. If you're not aware of the background of the Holy Grail layout, this &lt;a href="http://alistapart.com/article/holygrail/" rel="noopener noreferrer"&gt;A List Apart article&lt;/a&gt; provides a decent overview and links to some of the most well-known alternatives.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F921r9w1gpih1r2i7ru7q.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F921r9w1gpih1r2i7ru7q.gif" alt="The Holy Grail Layout Gif Image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Exactly like in the image above, a page with a header, footer, and three columns makes up the Holy Grail Layout's basic structure. The left and right columns have supplementary material, such as navigation or adverts, while the center column is home to the primary text.&lt;/p&gt;

&lt;p&gt;Unfortunately, none of the traditional remedies to this issue have ever been able to completely achieve all of these aims due to the nature of these objectives and the original CSS constraints.&lt;/p&gt;

&lt;p&gt;Finally, a comprehensive solution is feasible with Flexbox.&lt;/p&gt;

&lt;p&gt;HTML Code: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fradnvqik6xvzgmc3breh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fradnvqik6xvzgmc3breh.png" alt="Holy Grail Flexbox Layout Html code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS Code: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdgl8xbag0hver9uok92p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdgl8xbag0hver9uok92p.png" alt="Holy Grail Flexbox Layout Css code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can access the code from &lt;a href="https://codepen.io/Akr-am/pen/ZEBYWyX" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>design</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Nested Dynamic Routes in React Router v6 🎯</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Fri, 21 Oct 2022 12:37:31 +0000</pubDate>
      <link>https://forem.com/ak_ram/nested-dynamic-routes-in-react-router-v6-4pgj</link>
      <guid>https://forem.com/ak_ram/nested-dynamic-routes-in-react-router-v6-4pgj</guid>
      <description>&lt;p&gt;When I first started to develop my portfolio, I fetched GitHub Repos and ran into the issue of needing to present the repo data when clicking on the repo name precisely as seen in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp7xvrv6ytxw6womnb9mr.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp7xvrv6ytxw6womnb9mr.gif" alt="Nested Dynamic Routes in React Router v6 Gif image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you look closely, you'll see that the URL is dynamically altered to reflect the chosen repository's name and the proper repo data is rendered. The term "dynamic routing" refers to this behavior.&lt;/p&gt;

&lt;p&gt;I came up with this &lt;a href="https://codesandbox.io/s/dynamic-routing-with-react-router-dom-dw8kln" rel="noopener noreferrer"&gt;Sandbox demo&lt;/a&gt; example to help you better understand this type of behavior.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/dw8kln"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Sass: Placeholder Selector 📎</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Thu, 13 Oct 2022 12:08:10 +0000</pubDate>
      <link>https://forem.com/ak_ram/sass-placeholder-selector-4cj8</link>
      <guid>https://forem.com/ak_ram/sass-placeholder-selector-4cj8</guid>
      <description>&lt;p&gt;Our series is split into two main categories: SASS rules and SASS at-rules, if you recall the course mindmap from the &lt;a href="https://dev.to/ak_ram/sass-syntax-34f1"&gt;sass syntax&lt;/a&gt; post. The one SASS rule we didn't cover in the previous posts was &lt;strong&gt;Placeholder Selector&lt;/strong&gt;, so now we're going to talk about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Placeholder Selector
&lt;/h2&gt;

&lt;p&gt;A sass placeholder is a special sass selector that begins with a % and it is used to hold CSS styles blocks like this one in the example below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F22bo7fjxq1w5jao063ya.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F22bo7fjxq1w5jao063ya.png" alt="Example on how to write placeholder selector"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although it is comparable to a class selector, it is not converted into CSS code.&lt;/p&gt;

&lt;p&gt;How then may this selection be of use?&lt;/p&gt;

&lt;p&gt;A placeholder may be seen as a box that contains a block of CSS styles that can be applied in many ways without repeating, thanks to the sass at-rule "@extend."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0jgdubsy77oselbgp29c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0jgdubsy77oselbgp29c.png" alt="another example on placeholder selector"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, we can say that the posts that will come after this one will introduce SCSS at-rules.&lt;/p&gt;

&lt;p&gt;See You 😉&lt;/p&gt;

</description>
      <category>scss</category>
      <category>css</category>
      <category>design</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Sass: More about Nesting 📚</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Sun, 09 Oct 2022 14:46:30 +0000</pubDate>
      <link>https://forem.com/ak_ram/sass-more-about-nesting-492n</link>
      <guid>https://forem.com/ak_ram/sass-more-about-nesting-492n</guid>
      <description>&lt;p&gt;We learnt how to nest Scss rules in the &lt;a href="https://dev.to/ak_ram/sass-interpolation-nesting-4d73"&gt;last post&lt;/a&gt;. Today, we'll go into more depth regarding nesting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In this post, we will cover:-&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parent Selector and pseudo-classes&lt;/li&gt;
&lt;li&gt;Grouping and Nesting CSS Selectors&lt;/li&gt;
&lt;li&gt;Selector Nest Combinators&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each point will be discussed in depth.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Parent Selector and pseudo-classes
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://sass-lang.com/documentation/style-rules/parent-selector#:~:text=The%20parent%20selector%2C%20%26%20%2C%20is,a%20selector%20before%20the%20parent."&gt;Official SASS document&lt;/a&gt; states that&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The parent selector, &amp;amp; , is a special selector invented by Sass that's used in nested selectors to refer to the outer selector&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To further understand, consider the example below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PLxsWl-1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ietox695mfnn9thgdrhh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PLxsWl-1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ietox695mfnn9thgdrhh.png" alt="Example on Parent Selector" width="800" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;amp;&lt;/code&gt; here works as a reference to the outer selector which is &lt;code&gt;.main .alert&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;It may be puzzling to you how such a selector may be helpful, right? Parent selector is most commonly used in:&lt;/p&gt;

&lt;p&gt;1.1 _&lt;strong&gt;Suffix classes&lt;/strong&gt; context.&lt;/p&gt;

&lt;p&gt;Many frameworks, including Bootstrap, have this pattern.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HUvFp2Ke--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzfp5v3e933a7cvjc19b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HUvFp2Ke--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzfp5v3e933a7cvjc19b.png" alt="Example of a parent selector-based suffix class" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.2 &lt;strong&gt;&lt;em&gt;Pseudo classes&lt;/em&gt;&lt;/strong&gt; also utilize a parent selector.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hVQF2PnM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ah6hd5ydqzwi9ps15g9x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hVQF2PnM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ah6hd5ydqzwi9ps15g9x.png" alt="Example on using parent selector with pseudo classes" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.3 also &lt;code&gt;&amp;amp;&lt;/code&gt; can be used as an argument inside pseudo-selectors functions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GTrbO-Q3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uxi6xevdqkgd6pxwac5a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GTrbO-Q3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uxi6xevdqkgd6pxwac5a.png" alt="Example 2 on using parent selector with pseudo classes" width="800" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Grouping and Nesting CSS Selectors
&lt;/h2&gt;

&lt;p&gt;We use a comma as a separator when there are many selectors in a list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KB_EysUL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l7i6bihd1tr8zose93ak.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KB_EysUL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l7i6bihd1tr8zose93ak.png" alt="Example on nesting and selector list" width="800" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Selector Nest Combinators (&amp;gt;, +, ~, space)
&lt;/h2&gt;

&lt;p&gt;selector combinators can be placed in many places as shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yoUaOy2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/33s8w0glve0g9rk9xzz0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yoUaOy2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/33s8w0glve0g9rk9xzz0.png" alt="where to write selector combinators?" width="800" height="579"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Need to read more about selector-nest-combinators? &lt;a href="https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/selector-nest-combinators/README.md"&gt;selector-nest-combinators&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;I almost covered everything I know about SCSS nesting; nevertheless, in the following post, we'll talk about a new subject called &lt;a href="https://sass-lang.com/documentation/style-rules/placeholder-selectors"&gt;placeholder selector&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>scss</category>
      <category>css</category>
      <category>design</category>
      <category>webdev</category>
    </item>
    <item>
      <title>3-minute Gitflow branching model 🎯</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Thu, 29 Sep 2022 15:08:40 +0000</pubDate>
      <link>https://forem.com/ak_ram/3-minute-gitflow-branching-model-151l</link>
      <guid>https://forem.com/ak_ram/3-minute-gitflow-branching-model-151l</guid>
      <description>&lt;p&gt;&lt;strong&gt;Git Workflow&lt;/strong&gt; is a recipe or recommendation for how to use Git to accomplish work consistently and productively. &lt;/p&gt;

&lt;p&gt;The topmost workflows present nowadays are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Git flow&lt;/li&gt;
&lt;li&gt;GitHub flow&lt;/li&gt;
&lt;li&gt;GitLab flow&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Today, we're gonna talk about &lt;strong&gt;"Git flow"&lt;/strong&gt; the most popular and widely used one.&lt;/p&gt;




&lt;h3&gt;
  
  
  Table of content:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What is Gitflow?&lt;/li&gt;
&lt;li&gt;Gitflow diagram branches.&lt;/li&gt;
&lt;li&gt;How does Gitflow works?&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;References&lt;/li&gt;
&lt;/ul&gt;




&lt;blockquote&gt;
&lt;h2&gt;
  
  
  What is Gitflow?
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is a successful git branching model that depends on &lt;strong&gt;isolating&lt;/strong&gt; your work into different types of branches. it was introduced in June 2010 by &lt;em&gt;&lt;strong&gt;Vincent Driessen&lt;/strong&gt;&lt;/em&gt;, and it's become the most popular workflow as it achieved the maximum benefit from using git.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Gitflow branching diagram
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwawde0a0gukxeig1jk0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwawde0a0gukxeig1jk0.jpg" alt="Gitflow branching diagram image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the image above shows the branching model of a repo created with Git flow workflow; we can notice that the repo consists of 2 kinds of branches :&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Permanent branches:
&lt;/h3&gt;

&lt;p&gt;Are branches created at the start of any project, they are always existing branches. (like; master and develop branches)&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Temporary branches:
&lt;/h3&gt;

&lt;p&gt;are branches created from the permanent one and it's used to perform specific development tasks, then we can delete them (like; hotfixes, release, and features branches).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. How does Gitflow work?
&lt;/h2&gt;

&lt;p&gt;As mentioned before, in git-flow workflow there are 5 different branches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Main&lt;/li&gt;
&lt;li&gt;Develop&lt;/li&gt;
&lt;li&gt;Feature&lt;/li&gt;
&lt;li&gt;Release&lt;/li&gt;
&lt;li&gt;Hotfixes&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3.1 Main branch
&lt;/h3&gt;

&lt;p&gt;Please note: the main branch is commonly referred to as “master”; we have made an intentional decision to avoid that outdated term and have chosen to use “main” instead.&lt;/p&gt;

&lt;p&gt;After initializing a new repo, the main branch is created as a default branch, it will hold only the production-ready code that can be released. It is considered a red line which means we shouldn't push directly into it.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2 Develop branch
&lt;/h3&gt;

&lt;p&gt;As the main branch is a red line, we create another branch called develop branch. It is considered the single source of truth used to hold pre-production code.&lt;/p&gt;

&lt;p&gt;inside this branch, we integrate and test new features and most bug fixes before they are merged into the main branch.&lt;/p&gt;

&lt;p&gt;now our repo has both main and develops permanent branches; now let's say we need to add a new feature to our code, so we create a feature branch to add it.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3 Feature branch
&lt;/h3&gt;

&lt;p&gt;Is a branch created from the develop branch in which, we add our new feature code then pull a request to develop branch and ask to merge? after merging is done successfully we don't need this branch anymore so we delete it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Don't add more than one feature inside the same branch [remember: one branch for one feature]&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don't make another branch from the feature branch&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.4 Release branch
&lt;/h3&gt;

&lt;p&gt;Assume that we add all necessary features and our project now is ready to release to the public, in that time release branch comes into the picture. this branch is created for testing purposes like deployment in the server.&lt;/p&gt;

&lt;p&gt;During this time if we discovered any bugs we solve them directly in the same branch then merge the changes back to develop branch then push finally it to the main as a live code.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.5 hotfixes
&lt;/h3&gt;

&lt;p&gt;if any bugs appear after publishing we can fix them quickly by creating a hotfixes branch from the main then merge the changes with develop branch and push it back to the &lt;code&gt;main&lt;/code&gt; one.&lt;/p&gt;

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

&lt;p&gt;In this pattern, we can notice that both main and develop branches are identical, that is to make sure bugs which fixed in the &lt;code&gt;main&lt;/code&gt; branch don't back again.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  List of References
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=7OTrHx56GfE&amp;amp;feature=youtu.be" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=7OTrHx56GfE&amp;amp;feature=youtu.be&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.gitkraken.com/learn/git/git-flow" rel="noopener noreferrer"&gt;https://www.gitkraken.com/learn/git/git-flow&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://axom.readthedocs.io/en/develop/docs/sphinx/dev_guide/gitflow_branching.html" rel="noopener noreferrer"&gt;https://axom.readthedocs.io/en/develop/docs/sphinx/dev_guide/gitflow_branching.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Sass: Interpolation &amp; Nesting 🎁</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Sat, 24 Sep 2022 16:14:54 +0000</pubDate>
      <link>https://forem.com/ak_ram/sass-interpolation-nesting-4d73</link>
      <guid>https://forem.com/ak_ram/sass-interpolation-nesting-4d73</guid>
      <description>&lt;p&gt;In the prior post, we discussed the SSCS rules. We began with variables and demonstrated how they cannot be used as placeholders for property names, stating that interpolation was used in their place, so let's expand on the topic of interpolation.&lt;/p&gt;

&lt;h1&gt;
  
  
  Interpolation
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://sass-lang.com/documentation/interpolation" rel="noopener noreferrer"&gt;sass docs&lt;/a&gt; said that&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Interpolation can be used almost anywhere in a Sass stylesheet to embed the result of a SassScript expression into a chunk of CSS.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It allows us to insert sass expressions into a simple SASS or CSS code by using &lt;code&gt;#{expression}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Interpolation Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#{expression}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ojaisq0tv2vo38jvqmv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ojaisq0tv2vo38jvqmv.png" alt="Interpolation Syntax"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Keep in mind that we may use interpolation as a placeholder for both property names and values.&lt;/p&gt;

&lt;p&gt;It can also be utilized as a placeholder for selectors.&lt;br&gt;
Example: &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4zfj0xech0vhymx0vg4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4zfj0xech0vhymx0vg4.png" alt="Interpolation Syntax Example No. 2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Nesting rule
&lt;/h1&gt;

&lt;p&gt;CSS selectors may be nested in Sass just as in HTML.&lt;/p&gt;

&lt;p&gt;Take a look at this Sass navigation code example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9fuet0j06r2uncfj5bdg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9fuet0j06r2uncfj5bdg.png" alt="Nesting rule"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice that in Sass, the &lt;code&gt;ul&lt;/code&gt;, &lt;code&gt;li&lt;/code&gt;, and selectors are nested inside the &lt;code&gt;nav&lt;/code&gt; selector.&lt;/p&gt;

&lt;p&gt;While in CSS, the rules are defined one by one (not nested):&lt;/p&gt;

&lt;p&gt;You can see that sass is more readable and cleaner than traditional CSS since it allows the nesting of properties.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sass Nested Properties
&lt;/h2&gt;

&lt;p&gt;Numerous CSS properties, such as text-align, text-transform, and text-overflow, all begin with the same prefix.&lt;/p&gt;

&lt;p&gt;Sass allows you to write them as nested properties:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2g1dtm8yqvs700m8sgd3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2g1dtm8yqvs700m8sgd3.png" alt="Sass Nested Properties Example"&gt;&lt;/a&gt;&lt;br&gt;
For now, that is all there is. We will discuss nesting in further detail in the following post.&lt;/p&gt;

&lt;p&gt;See You 🧡 &lt;/p&gt;

</description>
      <category>scss</category>
      <category>css</category>
      <category>design</category>
      <category>webdev</category>
    </item>
    <item>
      <title>SASS Syntax 👀</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Tue, 20 Sep 2022 09:32:24 +0000</pubDate>
      <link>https://forem.com/ak_ram/sass-syntax-34f1</link>
      <guid>https://forem.com/ak_ram/sass-syntax-34f1</guid>
      <description>&lt;p&gt;In the &lt;a href="https://dev.to/ak_ram/how-to-add-sass-to-your-project--32cn"&gt;previous post&lt;/a&gt;, we learned how to compile SCSS to CSS. Now we will learn how to write SCSS.&lt;/p&gt;

&lt;p&gt;You should first know that you can write SASS stylesheets with two syntaxes.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;SCSS Syntax&lt;/li&gt;
&lt;li&gt;SASS Syntax&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do they differ? &lt;strong&gt;&lt;em&gt;Yes&lt;/em&gt;&lt;/strong&gt;, and the table below highlights their variants.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8cg7x15xzlqv2sv0uhf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8cg7x15xzlqv2sv0uhf.jpg" alt="SCSS vs SASS table comparison"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To make things more clear, check out this example, which is written twice—once with SCSS syntax and once with sass syntax.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5v7dn1icnfifujyd31m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5v7dn1icnfifujyd31m.png" alt="SCSS vs SASS code Example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When writing SASS or SCSS, you should adhere to these two rules: &lt;br&gt;
1-Style Rules. &lt;br&gt;
2-at-Style Rules.&lt;/p&gt;

&lt;p&gt;Again, you can take an overview look at these rules in the below screenshot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F79wohy6qwz9zxd2en1d9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F79wohy6qwz9zxd2en1d9.jpg" alt="Style rules and at-rules list"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fear not, we will explain each of these rules in more detail in the following sections, but for now, let's focus on the five style principles of nesting, variables, interpolation, placeholder selectors, and selector combinators.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Variables
&lt;/h2&gt;

&lt;p&gt;Simple Sass variables allow you to use the name rather than the actual value by assigning a value to a name that starts with the letter $.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$variableName : value;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;variableName: any name that doesn't start with a number or a special character like @.&lt;/li&gt;
&lt;li&gt;value: any value (lists, strings, numbers, booleans, null, colors)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// We assign a variable
$colorOfHeading: #616165;

// then use it
h3 {
color: $colorOfHeading
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep in mind that the variables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can only be used as a property value and will throw an error if used as a property name.&lt;/li&gt;
&lt;li&gt;Is not available outside of its scope.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$propertyName: 'font-size';
$propertyValue: 30px;

h3{
    $propertyName: $propertyValue; // not Valid
     font-size: $propertyValue; // Valid
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$myColor: red; // in global scope
h1{
$myColor: green; // in local scope
color: $myColor; // green
}
p{
color: $myColor; // red
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;!global&lt;/code&gt; flag can be used to make local variables global.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$myColor: red;
h1{
$myColor: green !global;
color: $myColor; // green
}
p{
color: $myColor; // green
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; A hyphen and an underscore are equivalent in Sass. $font-size is the same as $font_size&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$font-size: 20px;
h2{
font-size: $font_size; // 20px
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Tip:&lt;/em&gt;&lt;/strong&gt; to fully control the sizes and widths of your styles, use variables in conjunction with expressions.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$full-width: 100%
.col-1 {float: left; width: $full-width / 1}
.col-2 {float: left; width: $full-width / 2}
.col-3 {float: left; width: $full-width / 3}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$baseFont: 10px;
$paragraphFontSize: 7px;
h3{font-size: $baseFont + $paragraphFontSize}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because variables cannot be used as a property name, &lt;strong&gt;&lt;a href="https://sass-lang.com/documentation/interpolation" rel="noopener noreferrer"&gt;interpolation &lt;/a&gt;&lt;/strong&gt;comes into the picture. In the following articles, interpolation will be covered in more detail.&lt;/p&gt;

</description>
      <category>scss</category>
      <category>css</category>
      <category>webdev</category>
      <category>sass</category>
    </item>
    <item>
      <title>How to add SASS to your project ? 🤔</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Wed, 14 Sep 2022 00:53:52 +0000</pubDate>
      <link>https://forem.com/ak_ram/how-to-add-sass-to-your-project--32cn</link>
      <guid>https://forem.com/ak_ram/how-to-add-sass-to-your-project--32cn</guid>
      <description>&lt;h4&gt;
  
  
  I added the course road map.
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://miro.com/app/board/uXjVPXQ4nvk=/?share_link_id=333319943899" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ro0ca8b5z7t169f1o5w.jpg" alt="Course Roadmap"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;The &lt;a href="https://dev.to/akram_ak/sass-the-style-you-want-the-code-you-need-5188"&gt;previous post&lt;/a&gt; explained what SASS is and why it's preferable to use it rather than CSS. &lt;strong&gt;Right now&lt;/strong&gt;, we are about to learn how to include it in our project.&lt;/p&gt;

&lt;p&gt;Browsers won't understand sass files since, as we all know, they only understand HTML, CSS, and JS. Therefore, in order to make it simple for browsers to grasp, we need to compile Sass scripts into CSS files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63m1yhszew26x5d9npv0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63m1yhszew26x5d9npv0.png" alt="Sass files should be compiled to CSS ones."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the next few lines, we will discuss 3 methods to compile Sass to Css&lt;/p&gt;

&lt;h2&gt;
  
  
  #1. Command Line
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2t214g7ucgcn69az3bb5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2t214g7ucgcn69az3bb5.gif" alt="Git illustrate how to install sass"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the simplest ways to compile Sass into CSS is by using the &lt;a href="https://www.npmjs.com/package/sass" rel="noopener noreferrer"&gt;sass&lt;/a&gt; package.&lt;/p&gt;

&lt;p&gt;sass can be installed on Windows, Mac OS X, Linux, and Unix operating systems. It can also be installed through the Node Package Manager (NPM). The installation process for both methods is quite simple.&lt;/p&gt;

&lt;p&gt;To install sass using NPM, we need to install &lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;node.js&lt;/a&gt; first on our machine, then open the node terminal and follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1-Run&lt;/strong&gt; &lt;code&gt;node --version&lt;/code&gt; to confirm that the node has been set up properly.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

node --version
&amp;gt; Expected: v16.16.0 or any other version


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;2-Install sass&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;

&lt;span class="nt"&gt;npm&lt;/span&gt; &lt;span class="nt"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="nt"&gt;sass&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;This will download the package from npm's repository and install it globally on your system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3-Watching sass file&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;

&lt;span class="nt"&gt;sass&lt;/span&gt; &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="nc"&gt;.sass&lt;/span&gt; &lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="nc"&gt;.css&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;This will automatically compile style.sass file to style.css file&lt;/p&gt;

&lt;p&gt;Congratulate 🎉 you have setup sass successfully.&lt;/p&gt;

&lt;p&gt;Now, if you copy &amp;amp; paste this Scss code in your local Scss file &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$socails&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;facebook&lt;/span&gt; &lt;span class="n"&gt;twitter&lt;/span&gt; &lt;span class="n"&gt;youtube&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@each&lt;/span&gt; &lt;span class="nv"&gt;$item&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$socails&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="nv"&gt;$item&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="nc"&gt;-img&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="sx"&gt;url('../images/image-&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="nv"&gt;$item&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sx"&gt;.png')&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;it will be compiled to &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;.facebook-img&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="sx"&gt;url("../images/image-facebook.png")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.twitter-img&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="sx"&gt;url("../images/image-twitter.png")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.youtube-img&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="sx"&gt;url("../images/image-youtube.png")&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;
  
  
  #2 VS Code Extensions
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.live-sass" rel="noopener noreferrer"&gt;live-sass&lt;/a&gt; is one of the most efficient VS code extensions that is used in sass compilation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ym2rv1gufpz1q5xl4rf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ym2rv1gufpz1q5xl4rf.gif" alt="live sass vs code extension"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  #3 Online Compilers
&lt;/h2&gt;

&lt;p&gt;There are some online tools, such as &lt;a href="https://www.sassmeister.com/" rel="noopener noreferrer"&gt;sassMeister&lt;/a&gt; that compile Sass without any installs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04mn1n7patpapv7gffhb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04mn1n7patpapv7gffhb.png" alt="sassMeister online compilers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, it's time to go deeper with sass. In the next article, we will learn more about sass syntax.&lt;/p&gt;

</description>
      <category>scss</category>
      <category>css</category>
      <category>design</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🎨Sass: the style you want, the code you need</title>
      <dc:creator>Akram A. Abdelbasir</dc:creator>
      <pubDate>Tue, 13 Sep 2022 09:23:46 +0000</pubDate>
      <link>https://forem.com/ak_ram/sass-the-style-you-want-the-code-you-need-5188</link>
      <guid>https://forem.com/ak_ram/sass-the-style-you-want-the-code-you-need-5188</guid>
      <description>&lt;h4&gt;
  
  
  I added the course road map.
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://miro.com/app/board/uXjVPXQ4nvk=/?share_link_id=333319943899" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ro0ca8b5z7t169f1o5w.jpg" alt="Course Roadmap"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If you are a developer or web designer, chances are you have heard about Sass at one time or another. Sass is just as easy to use as CSS but includes some additional features that make it even more powerful.&lt;/p&gt;

&lt;p&gt;It's time to start the &lt;strong&gt;&lt;em&gt;Sass series&lt;/em&gt;&lt;/strong&gt;. In this first article of the series, we will learn what Sass is and why you need to use it for more efficient web development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sass&lt;/strong&gt; is an extension of the CSS language that adds power and flexibility without getting too complicated. It provides &lt;strong&gt;variables, mixins, inheritance&lt;/strong&gt;, and other handy tools for making CSS more maintainable. Sass also helps with more advanced features like code organization (partials), data-driven styles (looks), and responsive design.&lt;/p&gt;

&lt;p&gt;In this series, we'll be going over the basics of SASS/SCSS. We'll be covering a lot of ground, from basic syntax to more advanced features. So, if you're new to SASS/SCSS or want to brush up on some old skills, this is the series for you.&lt;/p&gt;

&lt;p&gt;So let us start with this question&lt;/p&gt;

&lt;h2&gt;
  
  
  Should you be using Sass or CSS? 🤔
&lt;/h2&gt;

&lt;p&gt;That’s a question often asked, and one we can answer with a simple &lt;strong&gt;“Yes”&lt;/strong&gt;. It all comes down to stylesheets vs preprocessors — and it’s important to get things right. SASS (and its more powerful cousin, SCSS) are writing systems that let you write faster, more flexible, and more maintainable code by way of variables, mixins, and nesting.&lt;/p&gt;

&lt;p&gt;SASS was designed by Hampton Catlin and Chris Eppstein.&lt;br&gt;
The main goal of SASS is to make it easier for developers to maintain their stylesheets and also to help them avoid some common coding problems.&lt;/p&gt;

&lt;p&gt;This code, for instance, creates a set of classes twice: once using CSS and once with SCSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhs4fz734wnclyekv59vf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhs4fz734wnclyekv59vf.png" alt="an example of creating a button list twice, once with CSS and once with SCSS "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Write less and do more with Sass.&lt;/p&gt;

&lt;p&gt;That's all about this post for today, in the next article, we will learn how to use sass in your project.&lt;/p&gt;

&lt;p&gt;See You ❤&lt;/p&gt;




&lt;p&gt;Please feel free to reach out to me at &lt;a href="https://www.linkedin.com/ak-ram" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt; if you have any questions.&lt;/p&gt;

</description>
      <category>scss</category>
      <category>webdev</category>
      <category>css</category>
      <category>design</category>
    </item>
  </channel>
</rss>
