<?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: dagpan</title>
    <description>The latest articles on DEV Community by dagpan (@dagpan).</description>
    <link>https://dev.to/dagpan</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%2F345190%2F1cbba91c-54fc-45f6-8365-f425b371078c.jpeg</url>
      <title>DEV Community: dagpan</title>
      <link>https://dev.to/dagpan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dagpan"/>
    <language>en</language>
    <item>
      <title>CSS Pseudo Elements</title>
      <dc:creator>dagpan</dc:creator>
      <pubDate>Wed, 14 Oct 2020 18:29:49 +0000</pubDate>
      <link>https://dev.to/dagpan/css-pseudo-elements-4p5b</link>
      <guid>https://dev.to/dagpan/css-pseudo-elements-4p5b</guid>
      <description>&lt;p&gt;Let's talk about …&lt;/p&gt;

&lt;h3&gt;
  
  
  Pseudo Elements
&lt;/h3&gt;

&lt;p&gt;CSS Pseudo Elements is a versatile tool that delivers dynamic and powerful results without the need for JavaScript code.&lt;br&gt;
  Let me introduce you to the before and after tags.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  ::before   ::after
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These two tags allow you to incorporate a pseudo html element either before or after an html element in your code.&lt;br&gt;
  Three things to note about these two tags. &lt;br&gt;
a. Before CSS3 there was only one semicolon used when writing before or after tags. You might see it like this,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  :before   :after
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After CSS3 specifications were introduced and became standard, it was decided to use two semicolons with before and after.&lt;br&gt;
b. You can only add a before and/or after tag to an element that has content, because the before and after pseudo elements attach themselves to the content of an element. &lt;br&gt;
c. You can only add one before and one after pseudo elements to an  element on your page.&lt;/p&gt;

&lt;p&gt;Let's see the tags in action. Here we have our simple page with a label "Name", a text input field and a submit button.&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%2Fi%2Flwiueih6xyrclbfvlvlc.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%2Fi%2Flwiueih6xyrclbfvlvlc.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Renders&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%2Fi%2F8612lnrwm60bigdk6la7.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%2Fi%2F8612lnrwm60bigdk6la7.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are going to add some attributes to the pseudo before element and see how it renders on our page. &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%2Fi%2Fxrah0dx63z39crle19l3.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%2Fi%2Fxrah0dx63z39crle19l3.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Result is&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%2Fi%2Fw8welxwjx59lbssftxh6.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%2Fi%2Fw8welxwjx59lbssftxh6.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And now let's add an after one also.&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%2Fi%2Fvuzj6la5du19csuo1i83.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%2Fi%2Fvuzj6la5du19csuo1i83.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Result&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%2Fi%2Fcgborsdujb60virm6dvi.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%2Fi%2Fcgborsdujb60virm6dvi.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So as we can see at the examples above, it seems that there was a pseudo element added before and after the label element. In actuality that happened to the content of the label element with class name "required" we selected.&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%2Fi%2Ff6wnjawja72soxhzvv61.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%2Fi%2Ff6wnjawja72soxhzvv61.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is very interesting, let's check a common real world use.&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%2Fi%2Fi5ksk7qibv19c5p269ys.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%2Fi%2Fi5ksk7qibv19c5p269ys.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Renders&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%2Fi%2F2070yu5ntqoz9qgkneio.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%2Fi%2F2070yu5ntqoz9qgkneio.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So here we selected the "required" class name element, our "Name" label, to add a pseudo element with content "*" after it's content, "Name". This is a way to display the required field asterisk when filling a form, without the need for JavaScript 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%2Fi%2Fy8l8rnhk80562o8bcgr7.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%2Fi%2Fy8l8rnhk80562o8bcgr7.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Results in this when we hover over the button&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%2Fi%2Fz83lg4dkdzonkzlccstt.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%2Fi%2Fz83lg4dkdzonkzlccstt.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this when we don't&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%2Fi%2Fvi2myiu503qld1d1l4n9.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%2Fi%2Fvi2myiu503qld1d1l4n9.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we are making the position of the data-tooltip attr element relative and we are adding a pseudo element, displayed on hover only, after it's content "Submit Form", with content the attr data-tooltip's data "Tooltip". Also make it's position absolute relatively to the relative position of the button, place it underneath, separate with a small margin and have it be light grey. And we get this dynamic effect on our page without writing any extra code. &lt;/p&gt;

&lt;p&gt;Although a 'pseudo' tool, it has very real and useful results!&lt;br&gt;
I apologize for the above line, it was a failed attempt at a pseudo joke!&lt;/p&gt;

&lt;p&gt;That's all for today folks,&lt;br&gt;
Thank you!&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%2Fi%2Fswhe2lcsdmc31arpaiuz.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%2Fi%2Fswhe2lcsdmc31arpaiuz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See you next time.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CSS Positioning - Sticky</title>
      <dc:creator>dagpan</dc:creator>
      <pubDate>Fri, 09 Oct 2020 14:08:49 +0000</pubDate>
      <link>https://dev.to/dagpan/css-positioning-sticky-fk</link>
      <guid>https://dev.to/dagpan/css-positioning-sticky-fk</guid>
      <description>&lt;p&gt;Let's talk a bit more about sticky positioning today.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sticky Positioning
&lt;/h3&gt;

&lt;p&gt;We'll examine how best to use it two examples that will show us the situations we might need to use it also. We have our simple Html document with a navigation bar "main-nav" and some text as content .&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xBmcWkL5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ccp5oj7x2k9z9cfokupc.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xBmcWkL5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ccp5oj7x2k9z9cfokupc.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Results in&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--otbbT9Sg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jqmn1fq8u2dm49br66wn.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--otbbT9Sg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jqmn1fq8u2dm49br66wn.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have our content displayed in the correct order and all, but there is an issue here. When you'll try to scroll the page you'll notice the header scrolls with the rest of the content. Let's try and fix it by using fixed positioning.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7J8dAwQ_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gc8tz3x8gqdn0ns6szx7.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7J8dAwQ_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gc8tz3x8gqdn0ns6szx7.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Page rendered&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1-QcXV8u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oyqfnard28ljw5ati37h.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1-QcXV8u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oyqfnard28ljw5ati37h.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now our header will stick at the top of the screen when we scroll but there is an issue with space between the header and the rest of the content. Let's make another change.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ue9Bzhlo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gu3fqfhqbsfyal49mr99.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ue9Bzhlo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gu3fqfhqbsfyal49mr99.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the rendering&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1SZDSwh8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/exjqy30hhqukfptsaqo2.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1SZDSwh8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/exjqy30hhqukfptsaqo2.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a perfect example for fixed position usage. But what if we had another section in our page above our header, how would that look like?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MZRrUgtS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0dvt5bmbxq9v22uheszd.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MZRrUgtS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0dvt5bmbxq9v22uheszd.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It results in&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y_ksMWkX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fscuc833dhyge4snqjx1.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y_ksMWkX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fscuc833dhyge4snqjx1.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see we removed the positioning and we added the new section above our header, but our header doesn't stick to the top when we scroll the page and all is not well with the content on our page. Let's use sticky and see what happens.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RFP2djrP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gqf2lxi8n8jnpfc43mpf.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RFP2djrP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gqf2lxi8n8jnpfc43mpf.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Renders&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jq4yvZ5a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cy6i4yu1xvulowr6qh7t.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jq4yvZ5a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cy6i4yu1xvulowr6qh7t.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now we have our picture above the header and while scrolling the page we can see the header sticking to the top as soon as it reaches it. This creates the desired effect for us.&lt;/p&gt;

&lt;p&gt;Let's take a look at a move involved example now.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JEbh6nKR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c6ujvi582d7cgq8s4my9.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JEbh6nKR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c6ujvi582d7cgq8s4my9.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It renders&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wuI7mbXX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fhd0gj4qfb3uzjmp42d0.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wuI7mbXX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fhd0gj4qfb3uzjmp42d0.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we have 4 groups with a header and a list-content for each of the groups. How can we use sticky position here? &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eOh-m693--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/icod5bbd6atsfbp7mzi3.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eOh-m693--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/icod5bbd6atsfbp7mzi3.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Resulting in&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M3SIXYb---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/91yq13ejc578et4bo5y2.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M3SIXYb---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/91yq13ejc578et4bo5y2.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's check how sticky position behaves here. All our headers were told to stick to the top of the screen once they reached it. So A header reaches the top, sticks there and once all content from A header's list-content is off the screen, A transfers the sticky to B header because it reached the top. And it will behave like that all the way till the end of our page.&lt;br&gt;
  This is all in the way we structured our elements in our document and the parent-child relationships between the headers - list content and their groups.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y73hYWis--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/59pr4qe44ulrq472s9wk.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y73hYWis--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/59pr4qe44ulrq472s9wk.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is exactly why sticky position was created, for such situations as our example. And is where we can enjoy the way our content gets displayed on the browser dynamically.&lt;/p&gt;

&lt;p&gt;There is still an issue with sticky position though and it has to do with browser compatibility. Only an estimated 90% of operational browsers actually fully support sticky right now. Other browsers might support it only partially and some not at all. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l0QmwwnJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8gvmisvb4npmlwzju6i9.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l0QmwwnJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8gvmisvb4npmlwzju6i9.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are going to have to make some changes in our styling to get through those problems, either with prefixes for individual browsers or with the second example to ensure our page will function even if the browser does not support sticky position.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V4j5xRlG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l6s9utcatf95hm665jb9.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V4j5xRlG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l6s9utcatf95hm665jb9.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--56aLJP8z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7qgg31v0y4rcn8qw6nfp.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--56aLJP8z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7qgg31v0y4rcn8qw6nfp.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for your time.&lt;br&gt;
That's all for today,&lt;br&gt;
Stay safe and Zen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s5jI1iSC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/swhe2lcsdmc31arpaiuz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s5jI1iSC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/swhe2lcsdmc31arpaiuz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CSS Positioning</title>
      <dc:creator>dagpan</dc:creator>
      <pubDate>Wed, 30 Sep 2020 19:11:14 +0000</pubDate>
      <link>https://dev.to/dagpan/css-positioning-enb</link>
      <guid>https://dev.to/dagpan/css-positioning-enb</guid>
      <description>&lt;p&gt;Let's talk about positioning today.&lt;/p&gt;

&lt;h3&gt;
  
  
  Positioning
&lt;/h3&gt;

&lt;p&gt;We'll examine four position attributes we can use to manipulate the positioning of any HTML element. We have our simple Html document with a parent element and three child elements, One, Two and Three.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_G9LQlfn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w5699kuqa4t26oge4wvl.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_G9LQlfn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w5699kuqa4t26oge4wvl.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our Styles document is straightforward and right now it contains no custom styling.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uwwfRWPX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0b3q5l3gnde7dwx2jp01.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uwwfRWPX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0b3q5l3gnde7dwx2jp01.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Static&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first position we'll check is the Static one. We have not defined any position attribute yet but if we check the document rendered &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HviCr2sg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/st5g5mmettewa1bjwxgi.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HviCr2sg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/st5g5mmettewa1bjwxgi.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can inspect the document and see the position set to static.&lt;br&gt;
That is because static, is the default value given to all HTML elements' position attribute when rendered on the page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relative&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Relative positioning works almost the same as static with a simple difference. Relative will allow you to define 4 position attributes top, bottom, left and right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JSFL5AEQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c41k5p8ix7j9fuinqg9j.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JSFL5AEQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c41k5p8ix7j9fuinqg9j.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the rendering&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h_RIlHHF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qisrls1vlilc2sc5tdcy.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h_RIlHHF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qisrls1vlilc2sc5tdcy.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have the same result, but if we change any of the four attributes, top, bottom, left or right&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jy_aQsiL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/553ey8utf97xppa1ke0k.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jy_aQsiL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/553ey8utf97xppa1ke0k.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It results in&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nyJhS15x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f4qibo9zqo6djwkzevcv.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nyJhS15x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f4qibo9zqo6djwkzevcv.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see the element changed it's positioning relative to it's static position on the page rendering flow.&lt;br&gt;
So the relative position element is taken out of it's default - static - position on the document render and repositioned relatively to it's parent element without affecting any other sibling elements on the page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Absolute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next let's check the absolute position. This one will completely remove the element from the page render flow, as if that element never existed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6tzo2O0z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e8z7ahoalej2kvpn2soz.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6tzo2O0z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e8z7ahoalej2kvpn2soz.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Renders&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aGEnmU31--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v0wgen6jdhlehgrd9pq0.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aGEnmU31--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v0wgen6jdhlehgrd9pq0.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This creates a unique situation when we manipulate the 4 attributes with an absolute positioned element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LWuK_O7Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5za73zxmrn7r1tztj5rv.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LWuK_O7Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5za73zxmrn7r1tztj5rv.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Renders&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VD84GHg0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l8kfmj9fbecz5avjz57d.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VD84GHg0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l8kfmj9fbecz5avjz57d.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above example, the absolute element repositioned itself relative to the document, because it's parent is positioned static and ended up at the top of the page. This creates a perfect way to couple relative and absolute positioning, let's change the parents' position to relative.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sbSn2nbf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vo7dfbc14myrgcnaf2at.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sbSn2nbf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vo7dfbc14myrgcnaf2at.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It renders&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5xaB5510--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nghsdlim83083odbv61k.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5xaB5510--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nghsdlim83083odbv61k.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see above the absolute element repositioning itself relatively to it's parent relative position and ended up on the parent's top edge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fixed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fixed positioning works differently as it "fixes" the position of the element relatively to the rendered html page and it doesn't bother with parent elements. A very important thing to remember with fixed elements, is that they will stay where you place them even when the page scrolls.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mcfaob3d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6v1nhh7esakpqrbps5pn.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mcfaob3d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6v1nhh7esakpqrbps5pn.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Renders&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YpASO3Uv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jiboyp7xvfv3ht64ddix.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YpASO3Uv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jiboyp7xvfv3ht64ddix.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sticky&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lastly we'll check the sticky position. It's a combination of both relative and fixed, as we can see at the examples bellow the sticky element behaves like a relative one when the page is rendered, but if the page scrolls down and that element reaches the top of the page, it will change behavior to fixed and stay at the top as the page scrolls.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TMDd_pOb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jeppil5f13bxggnd2zuj.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TMDd_pOb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jeppil5f13bxggnd2zuj.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Renders&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VwIyzD51--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/so9vo2gjia6cquk0mmli.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VwIyzD51--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/so9vo2gjia6cquk0mmli.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And as the page scrolls&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H_YCi_0w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yiuof9qbd11ilqkpne22.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H_YCi_0w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yiuof9qbd11ilqkpne22.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for your time.&lt;br&gt;
That's all for today,&lt;br&gt;
Stay safe and Zen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s5jI1iSC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/swhe2lcsdmc31arpaiuz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s5jI1iSC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/swhe2lcsdmc31arpaiuz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Starting with CSS,  part 2</title>
      <dc:creator>dagpan</dc:creator>
      <pubDate>Wed, 23 Sep 2020 18:23:23 +0000</pubDate>
      <link>https://dev.to/dagpan/starting-with-css-part-2-4jlh</link>
      <guid>https://dev.to/dagpan/starting-with-css-part-2-4jlh</guid>
      <description>&lt;p&gt;Let's continue with ...&lt;/p&gt;

&lt;h3&gt;
  
  
  Loading our styles
&lt;/h3&gt;

&lt;p&gt;There are 3 basic ways to achieve this.&lt;br&gt;
The first is by adding our CSS on the same lines as the HTML elements we are trying to style in the HTML file and it's called &lt;strong&gt;Inline&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1 style="color: blue;"&amp;gt;
     Title 
&amp;lt;/h1&amp;gt;}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It is not recommended though, as it is considered not good practice to include the styling in the HTML file, it should include the structure and the content. It's not very efficient, we would have to add our styling to every single element we mean to manipulate, we cannot use the styling anywhere else. Lastly this method might add to the page's loading time on the browser. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ii3d8MaF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/05i7w3m2dyxisnqxsi0q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ii3d8MaF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/05i7w3m2dyxisnqxsi0q.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The second method is called &lt;strong&gt;Style Element&lt;/strong&gt;.&lt;br&gt;
It's slightly similar to Inline, we have to again include the styling in the HTML file, but this time we are creating all the CSS in the head section of the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;head&amp;gt;
   &amp;lt;style&amp;gt;
       h3 {
          color: blue;
       }
   &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This is also not recommended because we would have to include a style section in every HTML file, styling is applied only to the page it is included in and not re-usable across our pages, something not efficient or practical. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5ZFsjR3C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m5fs7gy8xjc165m1qr9t.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5ZFsjR3C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m5fs7gy8xjc165m1qr9t.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The third method, &lt;strong&gt;External CSS&lt;/strong&gt;&lt;br&gt;
requires as to create separate CSS file or files that will include all our styling and be linked to the HTML pages, through the pages themselves.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;head&amp;gt;
   &amp;lt;link rel="stylesheet" href="style.css" /&amp;gt;
&amp;lt;/head&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We use the above syntax to link an external file to our HTML.&lt;br&gt;
It requires adding two attributes, first the rel one - we define the relation between the files - rel="stylesheet" will tell HTML this is a stylesheet file. The other one is href - we point to the location of the file - href="style.css" will let HTML know where to look for the file, we can use a relevant (to the location of the HTML) path or a URL as the location. &lt;/p&gt;

&lt;p&gt;This is the recommended method of loading our styles and the one most widely used. It will keep the content/general structure and the presentation/style of that content separate, it allows us to re-use styles through our application and is considered good practice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NNjrMoWa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e5z1w3uqfcujoqsimtry.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NNjrMoWa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e5z1w3uqfcujoqsimtry.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for your time, &lt;/p&gt;

&lt;p&gt;In the next part we'll start with some detailed examples and see how we can combine all the concepts we discussed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ktXoAl-E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7pw2t3vhtc21sab9juys.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ktXoAl-E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7pw2t3vhtc21sab9juys.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Starting with CSS</title>
      <dc:creator>dagpan</dc:creator>
      <pubDate>Fri, 11 Sep 2020 17:39:47 +0000</pubDate>
      <link>https://dev.to/dagpan/starting-with-css-2j9c</link>
      <guid>https://dev.to/dagpan/starting-with-css-2j9c</guid>
      <description>&lt;p&gt;Let's start with ...&lt;/p&gt;

&lt;h3&gt;
  
  
  Definition
&lt;/h3&gt;

&lt;p&gt;CSS is a styling language used to modify the appearance of the content of web-pages, so it helps us change the presentation and design of web-page content, lets us express our creativity and gives us freedom in the way we accomplish that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ii3d8MaF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/05i7w3m2dyxisnqxsi0q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ii3d8MaF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/05i7w3m2dyxisnqxsi0q.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Syntax
&lt;/h3&gt;

&lt;p&gt;CSS' syntax is straightforward and easy to understand &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T24ndl3Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/97fb2ddb085e19q12fir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T24ndl3Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/97fb2ddb085e19q12fir.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;selector {
   property1: value;
   property2: value;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;First part is the selector -we are selecting HTML elements-, next we need to have opening and closing brackets -we will define styles  that will apply to the selected HTML element-, here we'll provide property-value pairs that will manipulate those styles for us, like color, font-size, for the HTML element that matches the selector.  Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h3 {
  color: blue;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Selectors
&lt;/h3&gt;

&lt;p&gt;There are many type of selectors, but the three most commonly used are: Element, Class and ID selectors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Element&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html element {
  property: value;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can use an HTML element as selector.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h3&amp;gt; Title &amp;lt;/h3&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h3 {
  color: blue;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This will select all h3 elements in the web-page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Class&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.classname {
  property: value;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Class selector is the most commonly used and versatile one, it lets you select HTML elements by their class attribute.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h1 class="big-header"&amp;gt; Title &amp;lt;/h1&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.big-header {
  color: purple;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The period tells CSS that whatever follows is a class-name and not an HTML element name. It provides the easiest way to create reusable components, for example:&lt;/p&gt;

&lt;p&gt;If your site has 3 kinds of buttons that share basic styling but have something unique to each, like background color, you can have one class for all three with the basic common styling and then three different classes for each with the unique styling.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;button class="btn btn-1"&amp;gt; Button 1 &amp;lt;/button&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;button class="btn btn-2"&amp;gt; Button 2 &amp;lt;/button&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;button class="btn btn-3"&amp;gt; Button 3 &amp;lt;/button&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.btn {
    padding: 10px;
    color: white;
}
.btn-1 {
    background-color: blue;
}
.btn-2 {
    background-color: purple;
}
.btn-3 {
    background-color: red;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We created 3 for the unique styles and one for the common styles and in the class attribute of the HTML elements, we have to include both class names and separate them by space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ID&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#element-ID {
  property: value;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Another commonly used selector is the ID one. It also has to do with selecting using an HTML element's attribute, the id attribute. Difference here is an element can have only one id and it has to be unique through your HTML page.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h1 id="main-header"&amp;gt; Title &amp;lt;/h1&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#main-header {
      color: white;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;For this selector you simply have to use a pound sign followed by the id-name, much like the period we used before the class-name.&lt;br&gt;
  You can see why the class selectors are the most commonly used, take the above buttons example, we wouldn't be able to use that with the id selector, because they are unique through the HTML page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NNjrMoWa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e5z1w3uqfcujoqsimtry.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NNjrMoWa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e5z1w3uqfcujoqsimtry.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Combining selectors&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.selector-1.selector-2 {
          property1:value;
          property2:value;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can also combine multiple selectors to define an HTML element. You only have to name all the selectors you are using, with no spaces. For example:&lt;br&gt;
&lt;code&gt;&amp;lt;h1 class="large-header"&amp;gt;Title &amp;lt;/h1&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1.large-header {
         font-size: 200%;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;&amp;lt;h2 id="big-blue" class="large-blue"&amp;gt; Title &amp;lt;/h2&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#big-blue.large-blue {
         font-size: 200%;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We can also combine selectors with a method that uses &lt;br&gt;
ancestor-child element relationships in the HTML page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.ancestor .child {
         property: value;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here we have to use a comma between the ancestor and child selectors. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;div&amp;gt;
   &amp;lt;p&amp;gt; Selection &amp;lt;/p&amp;gt;
   &amp;lt;p&amp;gt; Selection &amp;lt;/p&amp;gt;
   &amp;lt;p&amp;gt; Selection &amp;lt;/p&amp;gt;
   &amp;lt;span&amp;gt;
      &amp;lt;p&amp;gt; Selection &amp;lt;/p&amp;gt;
   &amp;lt;/span&amp;gt;
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div p {
    color: red;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This will select all p elements in a div element even if they might have another parent.&lt;/p&gt;

&lt;p&gt;Another way to combine selectors is using a comma to define elements we want to style the same way.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.big {
    font-size: 200%;
    color: purple;
}
.large {
    font-size: 200%;
    color: purple;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.big, .large {
    font-size: 200%;
    color: purple;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;That's all for today folks,&lt;br&gt;
Thank you!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s5jI1iSC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/swhe2lcsdmc31arpaiuz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s5jI1iSC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/swhe2lcsdmc31arpaiuz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Starting with CSS, will comeback with another installment.&lt;/p&gt;

</description>
      <category>css</category>
    </item>
    <item>
      <title>Setting up a Coding Environment in Windows</title>
      <dc:creator>dagpan</dc:creator>
      <pubDate>Tue, 03 Mar 2020 15:11:25 +0000</pubDate>
      <link>https://dev.to/dagpan/setting-up-a-coding-environment-in-windows-ibf</link>
      <guid>https://dev.to/dagpan/setting-up-a-coding-environment-in-windows-ibf</guid>
      <description>&lt;p&gt;Hi folks, let’s talk Operating Systems! &lt;br&gt;
    I guess introductions are in order, so let’s introduce the Operating System.&lt;br&gt;
    Operating System or OS is installed on a computer and acts as the manager of the computer’s resources. Its main functions include managing those resources, allocating them to specific programs whenever necessary to perform a particular task, and establishing a user interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some Operating System History&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1950s - General Motors Research Lab implemented the first OS for their IBM 701.&lt;br&gt;
1969 - Unix was developed at Bell Labs by Dennis Ritchie and Ken Thompson.&lt;br&gt;
1981 - Microsoft markets DOS after it purchased 86-DOS software from a Seattle company.&lt;br&gt;
1984 - Apple creates a Graphical User Interface paired with a Unix-type OS.&lt;br&gt;
1985 - Microsoft launched Windows when a GUI was created and paired with MS-DOS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ua06ZTRI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m8p9t1wn0oj4inerffap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ua06ZTRI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m8p9t1wn0oj4inerffap.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Both macOS — the operating system used on Apple desktop and notebook computers — and Linux are based on the Unix operating system.&lt;br&gt;
Like all major Linux distributions, such as Ubuntu, Red Hat, and SuSE Linux, macOS offers a desktop environment that provides a graphical user interface to application programs and system settings. This desktop environment is built on top of a Unix-type OS just as the desktop environments of Linux distros are built on top of the core Linux OS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wqh41CaQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oc2vpg03iyiig65amhq7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wqh41CaQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oc2vpg03iyiig65amhq7.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The practical aspect of the common roots of Linux and macOS is that both follow the Standard created for all Unix-like Operating Systems. This compatibility makes it possible to compile applications developed on Linux, on macOS systems. Like Linux distros, macOS includes a Terminal application, which provides a text window in which you can run Linux commands. This terminal is also often referred to as command line, shell, or shell window. It's the text-based environment that people used to operate computers before the graphical user interface became available. The popular Bash shell is available in macOS as it is in most Linux distributions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JyoU89YQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4un4zlj4qi4wa4tvy00y.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JyoU89YQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4un4zlj4qi4wa4tvy00y.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is why a macOS’s terminal app, integrated with github and a text editor of your choice, will provide an easier to setup, environment for us to start coding with.&lt;br&gt;
Recently I had to setup such an environment for coding, when I joined a rather dysfunctional assortment of characters, calling themselves ‘CodeBenders’,  but more on them later.&lt;/p&gt;

&lt;p&gt;As a user with 85% Windows - 12% Unix-Linux and 3% macOS experience, having to do that on unfamiliar territory proved to not be as pleasant as I had hoped.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TT4lOHQD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/aiyd83bq89uszantfujo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TT4lOHQD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/aiyd83bq89uszantfujo.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Analytics data for 2019 show that about 88% of Desktop/Laptop computers worldwide, run Windows, about 10% run macOS, the other 2% run Linux or some other kind of OS. If you like me, are part of that 88 percent and you prefer the OS you are most familiar with, stay tuned and we’ll walk through some of the most important steps you need to pay attention to, together.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vJH1S1Ig--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s5a2x17ox5ozktdcg8br.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJH1S1Ig--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s5a2x17ox5ozktdcg8br.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WSL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Windows's Command Prompt tool works on its host file system and its not compatible with what we will be running on it. We need another Terminal Application that will be compatible, like a Terminal that will point to a Linux kernel.&lt;br&gt;
Windows has a feature installed but not enabled by default, Windows Subsystem for Linux or WSL, it acts as a virtual temporary environment in which Windows 10 installs a Linux distribution, or ‘distro’ for you. So all we have to do is enable it, in Windows features options for your system. &lt;br&gt;
You visit the Microsoft Store and from a selection of Linux distributions you pick the one you want, download free of charge and install. Windows will guide you through the process and when it’s done you’ll have access to a fully functional terminal of a Linux kernel! &lt;/p&gt;

&lt;p&gt;Setting up everything else is exactly the same as the macOS environment setup. Install the editor of your choice and integrate it with your wsl terminal, integrate your sql adapter, github, learn accounts and you are all set. Manipulating the .profile or .bashrc files depending on the Linux distro you chose, for customization of the terminal or to have an authenticated ssh agent running as soon as you open your terminal, is a breeze.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some things to keep in mind&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Windows and Linux file systems are not compatible, WSL will save some important files in your Windows with the installation files of the Linux distro, but your projects will be stored in your Windows file system.&lt;/p&gt;

&lt;p&gt;A very good alternative to using git commands in the terminal, is the Desktop Application Git provides for its users, Windows and macOS versions are available. The App itself is very light in resource usage, it has a delightful Graphical Interface and is very user friendly.&lt;/p&gt;

&lt;p&gt;Look, CodeBenders mostly are thoughtful folk, so I will not leave you without some great news!    &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microsoft recently made WSL 2 available&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Main upgrades from WSL include the usage of a Virtual Hardware Disk (VHD) to store your files, Linux system can dynamically allocate Disk space as needed, it will also allow you to place files that your Linux apps will access, in your Linux root file system for faster file performance speed. Because of the new features when starting, WSL 2 will now use a small proportion of memory, so lesser impact on you system's resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A few important notes here are&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WSL 2 is only available in Windows 10 builds 18917 or higher.&lt;br&gt;
You will need to make sure that you have both the Windows Subsystem for Linux and the Virtual Machine Platform optional components installed.&lt;/p&gt;

&lt;p&gt;I Will be testing WSL 2 first chance I get, so stay tuned for any updates and news from CodeBenders!&lt;br&gt;
Have a Great Day folks!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
