<?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: Ansub Khan</title>
    <description>The latest articles on Forem by Ansub Khan (@ansub).</description>
    <link>https://forem.com/ansub</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%2F433355%2F8f65e8c0-4177-45c3-89bc-5efbbc376b98.jpeg</url>
      <title>Forem: Ansub Khan</title>
      <link>https://forem.com/ansub</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ansub"/>
    <language>en</language>
    <item>
      <title>Blockchain for Beginners</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Thu, 03 Feb 2022 11:11:04 +0000</pubDate>
      <link>https://forem.com/ansub/blockchain-for-beginners-53i0</link>
      <guid>https://forem.com/ansub/blockchain-for-beginners-53i0</guid>
      <description>&lt;h2&gt;
  
  
  What is Blockchain?
&lt;/h2&gt;

&lt;p&gt;it is a permanent database that is shared across a lot of computers around the world which makes it a chain of networks connected together that forms a blockchain.&lt;/p&gt;

&lt;p&gt;blockchain was made popular by an anonymous person, Satoshi Nakamoto. when he released Bitcoin Network back in 2008. Bitcoin is a cryptocurrency network that handles the transfer of BTC assets across the network, without a need of a middleman or authority. while ensuring that the network itself is secure and cannot be hacked. &lt;/p&gt;

&lt;p&gt;overtime a lot of other cryptocurrencies were made after getting inspiration from Bitcoin, another popular cryptocurrency is Ethereum.&lt;/p&gt;

&lt;h2&gt;
  
  
  State Management
&lt;/h2&gt;

&lt;p&gt;in blockchain, we store data like a spreadsheet which contains a list of all transactions, the content of that spreadsheet at any given time will be called as "state" of that database. hence state management is simply the process of updating the data with new transactions and recording it for everyone to see.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nodes
&lt;/h2&gt;

&lt;p&gt;Node is basically a device that forms the infrastructure of blockchain. all nodes on a blockchain are connected to each other and they constantly exchange the latest blockchain data with each other so all nodes stay up to date. A &lt;strong&gt;full node&lt;/strong&gt; is basically a device (like a computer) that contains a full copy of the transaction history of the blockchain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N5mLkCsC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643884944683/oyjSLYKZt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N5mLkCsC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643884944683/oyjSLYKZt.png" alt="2020-09-PM-blog-centralized-e2ee-p2p-1024x512.png" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Use of Node: *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;checks if the block of transactions is valid to accept or reject it.&lt;/li&gt;
&lt;li&gt;save and store the block of transactions in the history of blockchain transactions.&lt;/li&gt;
&lt;li&gt;broadcast and spread this transaction history to other nodes to sync them all with blockchain.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;there is also another kind of node, which is called a mining node( aka miners), These are the nodes that can add transactions to a blockchain. Every node in the blockchain network has an option to become a mining node. The process of adding transactions to a blockchain is called mining.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decentralization
&lt;/h2&gt;

&lt;p&gt;because we are storing the data in peer to peer network of nodes, blockchain is basically a decentralized network. which has great advantages over a decentralized network.&lt;/p&gt;

&lt;p&gt;for example: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data breaches are common which exposes a lot of data&lt;/li&gt;
&lt;li&gt;Centralized authorities can censor and shut down speech&lt;/li&gt;
&lt;li&gt;Reliance on a central authority means upstream problems affect downstream consumers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;on the other hand, decentralized networks bring a lot of benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No censorship as there is no single authority or middleman that can censor you&lt;/li&gt;
&lt;li&gt;No downtime as the overall network is running across 1000's of nodes across the globe&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Use Cases:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;cryptocurrency&lt;/li&gt;
&lt;li&gt;smart contract&lt;/li&gt;
&lt;li&gt;decentralized finance&lt;/li&gt;
&lt;li&gt;gaming&lt;/li&gt;
&lt;li&gt;supply chain tracking&lt;/li&gt;
&lt;li&gt;decentralized governance&lt;/li&gt;
&lt;li&gt;verifiable ownership of assets and many more&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;here are some good resources to understand blockchain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=bBC-nXj3Ng4"&gt;But how does bitcoin actually work?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bitcoin.org/bitcoin.pdf"&gt;Bitcoin Whitepaper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ethereum.org/en/whitepaper/"&gt;Ethereum Whitepaper&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>bitcoin</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is a Single-Page Application [ SPA ]?</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Fri, 21 Jan 2022 15:03:36 +0000</pubDate>
      <link>https://forem.com/ansub/what-is-a-single-page-application-spa--2l6d</link>
      <guid>https://forem.com/ansub/what-is-a-single-page-application-spa--2l6d</guid>
      <description>&lt;h2&gt;
  
  
  What is SPA?
&lt;/h2&gt;

&lt;p&gt;SPA as the name suggests means when you load the app for once. In simple words, the pages don't reload when you click on something. on clicking on an element on the page, SPA only renders that element, instead of what traditional pages do (rendering the whole page with every 🖱)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you Notice Gmail&lt;/strong&gt; when you browse through your email you’ll notice that not much changes during navigation - the sidebar and header remain untouched as you go through your inbox.&lt;/p&gt;

&lt;p&gt;The three most popular SPA tools are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;** Angular**: developed by Google and now almost ten years old)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;React&lt;/strong&gt;: created by Facebook a few years later&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Vue&lt;/strong&gt;: developed by an ex-Google employee and which has enjoyed a surge in popularity over the past few years.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Examples of SPA
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Facebook&lt;/li&gt;
&lt;li&gt;Google Maps&lt;/li&gt;
&lt;li&gt;Gmail&lt;/li&gt;
&lt;li&gt;Twitter&lt;/li&gt;
&lt;li&gt;Google Drive&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Pros of SPA
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speed and Response Time&lt;/strong&gt; because you are loading everything at once&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;a &lt;strong&gt;better User Experience&lt;/strong&gt; as users can access information very quickly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Caching&lt;/strong&gt; as SPA only have to request data from the server one time, upon initial download.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Cons of SPA
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;SEO is the biggest problem with SPAs because of fewer pages and HTML Content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;will not work for users who have disabled Javascript in their browser&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;if you like this article then follow me on &lt;a href="https://twitter.com/justansub"&gt;Twitter&lt;/a&gt;&lt;br&gt;
I learn and try to simply stuff for you :)&lt;/p&gt;

&lt;p&gt;Thanks For Reading!&lt;/p&gt;

</description>
      <category>react</category>
      <category>angular</category>
      <category>vue</category>
      <category>javascript</category>
    </item>
    <item>
      <title>React Basics!</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Thu, 20 Jan 2022 16:10:30 +0000</pubDate>
      <link>https://forem.com/ansub/react-basics-3j4i</link>
      <guid>https://forem.com/ansub/react-basics-3j4i</guid>
      <description>&lt;h3&gt;
  
  
  💭 What is React?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt; A UI library developed by Facebook&lt;/li&gt;
&lt;li&gt;creates interactive, stateful, and reusable components&lt;/li&gt;
&lt;li&gt; it uses Virtual DOM&lt;/li&gt;
&lt;li&gt;example: Instagram .com is completely written in React&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✨ Features is React?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt; it makes quick and responsive apps&lt;/li&gt;
&lt;li&gt;uses Virtual DOM&lt;/li&gt;
&lt;li&gt;Does Server-Side Rendering&lt;/li&gt;
&lt;li&gt;Single Way Data Flow
*Open Source&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  😌 Why Use React?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Simple and easy to learn&lt;/li&gt;
&lt;li&gt;it is fast, simple, and scalable&lt;/li&gt;
&lt;li&gt;it uses a component-based approach&lt;/li&gt;
&lt;li&gt;no need for direct DOM Manipulation &lt;/li&gt;
&lt;li&gt;Increases App Performance&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🥺 Limitations Of React
&lt;/h3&gt;

&lt;p&gt;everything has some limitations and React is not an exception! &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it is very rapidly evolving which might get difficult for some developers to keep up.&lt;/li&gt;
&lt;li&gt; Inline HTML and JSX confuses a lot of people.&lt;/li&gt;
&lt;li&gt;Size of the Library is quite large.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://twitter.com/justansub"&gt;Follow Me On Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Javascript Concepts that you should Learn in 2022</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Sat, 15 Jan 2022 07:16:33 +0000</pubDate>
      <link>https://forem.com/ansub/javascript-concepts-that-you-should-learn-in-2022-6lk</link>
      <guid>https://forem.com/ansub/javascript-concepts-that-you-should-learn-in-2022-6lk</guid>
      <description>&lt;h3&gt;
  
  
  Lexical Structure
&lt;/h3&gt;

&lt;p&gt;lexical Structure is basically the building block on Javascript: Unicode, semicolons, white space, case sensitivity, comments, literals, identifiers, and reserved words. some of the very important topics one must know before starting with the other topics of JS. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://flaviocopes.com/javascript-lexical-structure/"&gt;Learning Link&lt;br&gt;
&lt;/a&gt; &lt;/p&gt;
&lt;h3&gt;
  
  
  Expressions
&lt;/h3&gt;

&lt;p&gt;Expressions are units of code that can be evaluated and resolved to a value.&lt;br&gt;
 &lt;a href="https://flaviocopes.com/javascript-expressions/"&gt;Learning Link&lt;/a&gt; &lt;/p&gt;
&lt;h3&gt;
  
  
  Types
&lt;/h3&gt;

&lt;p&gt;String   - represents a sequence of characters e.g. "hello"&lt;br&gt;
Number - represents numeric values e.g. 100&lt;br&gt;
Boolean - represents boolean value either false or true&lt;br&gt;
Undefined   - represents undefined value&lt;br&gt;
Null - represents null i.e. no value at all&lt;/p&gt;
&lt;h3&gt;
  
  
  Variables
&lt;/h3&gt;

&lt;p&gt;a variable stores the data value that can be changed later on.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myVariable = 22; //this can be a string or number.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Functions
&lt;/h3&gt;

&lt;p&gt;JavaScript functions are used to perform operations. We can call JavaScript function many times to reuse the code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var x = myFunction(4, 3);     // Function is called, return value will end up in x

function myFunction(a, b) {
    return a * b;             // Function returns the product of a and b
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Object
&lt;/h3&gt;

&lt;p&gt;an object is an unordered collection of key-value pairs. Each key-value pair is called a property.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let object = {
  'key1': 'value1',
  'key2': 'value2',
  'keyn': 'valuen',
};
console.log(object);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.javatpoint.com/javascript-objects"&gt;Learning Link&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Classes
&lt;/h3&gt;

&lt;p&gt;Classes are similar to functions.They use class keyword instead of function keyword. &lt;br&gt;
They use the constructor method to initialise.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class ClassMates{
    constructor(name,age){
        this.name=name;
        this.age=age;
    }
    displayInfo(){
        return this.name + "is " + this.age + " years old!";
    }
}

let classmate = new ClassMates("Mike Will",15);
classmate.displayInfo();  // result: Mike Will is 15 years old!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.javatpoint.com/javascript-objects"&gt;Learning Link&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Arrow functions
&lt;/h3&gt;

&lt;p&gt;Arrow functions were introduced in ES6, they allow us to write shorter function syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myFunction = (a, b) =&amp;gt; a * b;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Loops
&lt;/h3&gt;

&lt;p&gt;Loops are handy, if you want to run the same code over and over again, each time with a different value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.w3schools.com/js/js_loop_for.asp"&gt;Learning Link&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Scopes
&lt;/h3&gt;

&lt;p&gt;The scope is the accessibility of variables, functions, and objects in some particular part of your code during runtime. In other words, scope determines the visibility of variables and other resources in areas of your code.&lt;br&gt;
&lt;a href="https://www.digitalocean.com/community/tutorials/understanding-scope-in-javascript"&gt;Learning Link&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Arrays
&lt;/h3&gt;

&lt;p&gt;Objects allow you to store keyed collections of values. That’s fine, But quite often we find that we need an ordered collection, where we have a 1st, a 2nd, a 3rd element, and so on. For example, we need that to store a list of something: users, goods, HTML elements, etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let fruits = ["Apple", "Orange", "Plum"];

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://javascript.info/array"&gt;Learning Link&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Template literals
&lt;/h3&gt;

&lt;p&gt;Template Literals use back-ticks (``) rather than the quotes ("") to define a string:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
let text = `Hello World!`;&lt;br&gt;
`&lt;/code&gt; &lt;br&gt;
&lt;a href="https://www.w3schools.com/js/js_string_templates.asp"&gt;Learning Link&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Strict mode
&lt;/h3&gt;

&lt;p&gt;Strict Mode is a new feature in ECMAScript 5 that allows you to place a program, or a function, in a "strict" operating context. This strict context prevents certain actions from being taken and throws more exceptions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://javascript.info/strict-mode"&gt;Strict Mode&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ECMAScript 6
&lt;/h3&gt;

&lt;p&gt;ECMAScript 2015 was the second major revision to JavaScript, ECMAScript 2015 is also known as ES6 and ECMAScript 6.&lt;br&gt;
&lt;a href="https://www.w3schools.com/js/js_es6.asp"&gt;Learning Link&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  HTTP Request
&lt;/h3&gt;

&lt;p&gt;All modern browsers have a built-in XMLHttpRequest object to request data from a server, The XMLHttpRequest object is a developers dream because you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update a web page without reloading the page&lt;/li&gt;
&lt;li&gt;Request data from a server - after the page has loaded&lt;/li&gt;
&lt;li&gt;Receive data from a server  - after the page has loaded&lt;/li&gt;
&lt;li&gt;Send data to a server - in the background&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.w3schools.com/xml/xml_http.asp"&gt;Learning Link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Some GitHub Terms You Should Know!
</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Sun, 09 Jan 2022 06:06:38 +0000</pubDate>
      <link>https://forem.com/ansub/some-github-terms-you-should-know-1e6k</link>
      <guid>https://forem.com/ansub/some-github-terms-you-should-know-1e6k</guid>
      <description>&lt;p&gt;GitHub is one of the most used hosting platform for version control and collaboration, we must have heard about the terms like repo and PR in your coding career what do they mean, or simply put what do they even mean to us? here are a few Github terms you must know!&lt;/p&gt;

&lt;h3&gt;
  
  
  Repository (Repo)
&lt;/h3&gt;

&lt;p&gt;it is a directory that stores all of the files and folders you used to build the project and it also stores the changes made to the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Commit
&lt;/h3&gt;

&lt;p&gt;commit is a change that you bring to your program, it can be adding, removing, modifying code or files from your project. &lt;/p&gt;

&lt;h3&gt;
  
  
  Local and Remote
&lt;/h3&gt;

&lt;p&gt;your project will have two independent repos one which is offline is called Local and one which is hosted online on platforms like GitHub or GitLab is Remote&lt;/p&gt;

&lt;h3&gt;
  
  
  Pull, Push or Fetch
&lt;/h3&gt;

&lt;p&gt;to synchronize your project between local and remote we use these three operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pull&lt;/strong&gt; - pull changes from remote to local&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Push&lt;/strong&gt; - push changes from local to remote&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fetch&lt;/strong&gt; - only downloads new data but doesn't integrate it to your working project in local&lt;/p&gt;

&lt;h3&gt;
  
  
  Branch
&lt;/h3&gt;

&lt;p&gt;they basically divert you from the mainline of development, so that you can fix the bug or build a new feature and then merge it back without messing up the main code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pull Request
&lt;/h3&gt;

&lt;p&gt;it is simply a way of telling people that you want the changes you made in the branch to get included in Main Code.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Top 5 Visual Studio Code Keyboard Shortcuts
</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Mon, 27 Dec 2021 16:34:04 +0000</pubDate>
      <link>https://forem.com/ansub/top-5-visual-studio-code-keyboard-shortcuts-3okp</link>
      <guid>https://forem.com/ansub/top-5-visual-studio-code-keyboard-shortcuts-3okp</guid>
      <description>&lt;p&gt;keyboard shortcuts are there to make our life much easier, imagine copying and pasting if we don't have cmd + C and cmd + V (control for windows). VS Code also comes with a lot of helpful shortcuts that can make our work very easy.&lt;/p&gt;

&lt;p&gt;here are the Top 5 Visual Studio Code Keyboard Shortcuts that we should know about:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Command Palette Shortcut:
&lt;/h3&gt;

&lt;p&gt;use shift + cmd + P to open the command palette and you can search for any setting in VS Code that you want to do. command palette is like the brain of VS Code. it is Ctrl+Shift+P for windows.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Search for Item in File
&lt;/h3&gt;

&lt;p&gt;use Cmd + F to instantly search for the keyword you are looking for inside the VS Code file that you are working on. here you can find and replace the words and there is much more. Ctrl+F for windows.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Toggle Panel
&lt;/h3&gt;

&lt;p&gt;use Cmd + J to hide or reveal the bottom panel, it is much handy when you are going to use the terminal inside VS Code because with this shortcut you can quickly reveal or hide the terminal window. do give this one a try!&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Find a File
&lt;/h3&gt;

&lt;p&gt;as the name suggests it opens up the search for files, where you can quickly search for files that you are looking for. use Cmd + P for that.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Global Finder
&lt;/h3&gt;

&lt;p&gt;this is similar to the 3rd one but this works globally, which means that you can search keywords in every file instead of doing it in just one file Shift + Cmd + F&lt;/p&gt;

&lt;p&gt;here is the cheat sheet for all the commands discussed above.&lt;/p&gt;

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

&lt;p&gt;if you like reading this blog feel free to follow me on &lt;a href="https://twitter.com/ansubcodes"&gt;Twitter&lt;/a&gt;, where I try to simplify Web Development for you.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>tricks</category>
      <category>developer</category>
      <category>tips</category>
    </item>
    <item>
      <title>What is Local Storage?</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Fri, 24 Dec 2021 16:14:58 +0000</pubDate>
      <link>https://forem.com/ansub/what-is-local-storage-1im9</link>
      <guid>https://forem.com/ansub/what-is-local-storage-1im9</guid>
      <description>&lt;p&gt;localStorage is a way of saving the key-value pair in the web browser and the best part about it is that there is no expiration date meaning that data will still be there in the browser even if you reload the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does localStorage work?
&lt;/h3&gt;

&lt;p&gt;to storage the localStorage in your web application, you can use five methods:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;setItem() : adds key value to localStorage&lt;/li&gt;
&lt;li&gt;getItem() : retrieve the items you entered in localStorage&lt;/li&gt;
&lt;li&gt;clear(): to clear the local storage&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Where is localStorage stored?
&lt;/h3&gt;

&lt;p&gt;it depends upon the browsers that how and where they are storing it, for example, Firefox stores localstorage in &lt;code&gt;webappsstore.sqlite&lt;/code&gt; file in the &lt;em&gt;profile&lt;/em&gt; folder.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is window.localStorage?
&lt;/h3&gt;

&lt;p&gt;localStorage is available via the windows.localStorage property which is a part of the Window interface in Javascript that represents the window containing the DOM Document. &lt;/p&gt;

&lt;h3&gt;
  
  
  setItem()
&lt;/h3&gt;

&lt;p&gt;it is a method to store the values in localStorage object&lt;/p&gt;

&lt;p&gt;it takes two parameters: key and a value &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;window.localStorage.setItem('name',&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'Ansub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Khan')&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;

&lt;p&gt;over here you can see that ‘name’ is basically a key that stores the value ‘Ansub Khan’, now the thing is that localStorage only stores String but what if we have to store data of different data types like an array? &lt;/p&gt;

&lt;p&gt;for that we use a method called JSON.stringify() before passing it to setItem(). &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;person&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; 
    &lt;/span&gt;&lt;span class="err"&gt;name:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ansub Khan"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; 
    &lt;/span&gt;&lt;span class="err"&gt;age:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;window.localStorage.setItem('user',&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;JSON.stringify(person));&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  getItem()
&lt;/h3&gt;

&lt;p&gt;it is used to access the data that you have stored in the localStorage using setItem() method.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// this is going to give us&lt;/span&gt;

&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;{"name":"Ansub Khan","age":21}&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;now to use this value as an object you need to convert it back to an object,  if you remember localStorage stores data in String format, that’s why we used JSON.stringify(), now to convert it back to object we are going to use &lt;strong&gt;JSON.parse()&lt;/strong&gt;&lt;/p&gt;

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

&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  clear()
&lt;/h3&gt;

&lt;p&gt;it is used to delete the data that we saved in local storage, you can see the localStorage in Chrome, open inspect element, and then click on the application, there you are going to find the local storage as seen in the image below&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%2Fh186ojh36ainepxee4qt.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%2Fh186ojh36ainepxee4qt.png" alt="local-storage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;on using this method&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clear&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 get empty like it was before.&lt;/p&gt;

&lt;h3&gt;
  
  
  localStorage has some limitations tho:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Do not store sensitive user information in localStorage&lt;/li&gt;
&lt;li&gt;It is not a substitute for a server-based database as information is only stored on the browser&lt;/li&gt;
&lt;li&gt;localStorage is limited to 5MB across all major browsers&lt;/li&gt;
&lt;li&gt;localStorage is quite insecure as it has no form of data protection and can be accessed by any code on your web page&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CSS Colors Simplified!</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Sun, 28 Nov 2021 11:00:35 +0000</pubDate>
      <link>https://forem.com/ansub/css-colors-simplified-47ep</link>
      <guid>https://forem.com/ansub/css-colors-simplified-47ep</guid>
      <description>&lt;h3&gt;
  
  
  Abstract
&lt;/h3&gt;

&lt;p&gt;CSS Color Property helps us to add colors to the webpage which makes the website quite appealing. using CSS Color Property we can give color to the text, make changes in the background and also add gradients. and it is actually quite easy to add colors to the website. we only have to use a simple syntax.&lt;/p&gt;

&lt;h3&gt;
  
  
  Content
&lt;/h3&gt;

&lt;p&gt;Color Basics&lt;br&gt;
Hex Color Code&lt;br&gt;
RGB Color Values&lt;br&gt;
HSL Color Values&lt;br&gt;
Changing Color Using Class and Id&lt;br&gt;
CSS Background Color&lt;br&gt;
CSS Link Color&lt;br&gt;
Summary&lt;/p&gt;
&lt;h3&gt;
  
  
  CSS Color Basics
&lt;/h3&gt;

&lt;p&gt;CSS (short for cascading stylesheets ) makes it very easy to add colors also there are a lot of formats that we can use to add colors like HTML Color Names, RGB, and HSL Value.&lt;/p&gt;

&lt;p&gt;let’s start with the most basic way of adding color to your website:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&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;this is going to change the text of the website to Red, so whenever you are going to add any text in your HTML it is going to appear in red color. &lt;/p&gt;

&lt;p&gt;you must be wondering that we just typed red and this is showing text in red color? &lt;/p&gt;

&lt;p&gt;they are W3C color names assigned by the W3C to specify colors in web pages or files. These names can be used instead of their corresponding hexadecimal value to refer to that color in an HTML file or CSS stylesheet. These names are supported by all modern web browsers and used because it's easier to remember color names than color codes.&lt;/p&gt;

&lt;p&gt;some examples of W3C colors are green, yellow, blue, MediumSlateBlue, etc.&lt;/p&gt;

&lt;p&gt;visit the W3C website to see the complete list of colors.&lt;/p&gt;

&lt;h3&gt;
  
  
  HEX Color Code
&lt;/h3&gt;

&lt;p&gt;The most common way to add color to an HTML element using CSS is with hex color codes. To change the default color of your website's text, use the CSS color property in your stylesheet. the default color of your website's text.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ff0000&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;Hex color codes start with a hashtag (#) and are followed by six letters and/or numbers. The first two letters/numbers refer to red, the next two refer to green, and the last two refer to blue. The color values are defined in values between 00 and FF&lt;/p&gt;

&lt;h3&gt;
  
  
  RGB Color Value
&lt;/h3&gt;

&lt;p&gt;RGB Color Value is commonly found in many design apps and technologies, here RGB stands for Red Green Blue. RGB colors can be used by wrapping the values in parentheses and adding rgb in lowercase in front of them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;225&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&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;we can also change the opacity of the color when it comes to rgb(), we just have to add ‘a’ in rgb() and add the value between 0 and 1, to control the opacity. for example, if I am &lt;br&gt;
setting 0.5 opacity then the text would have 50% opacity.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;225&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  HSL Color Values
&lt;/h3&gt;

&lt;p&gt;HSL Stands for Hue, Saturation, and Lightness, Hue is measured in degrees from 0 – 360, while Saturation and Lightness use a scale of 0% – 100%.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;50%&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 should be noted that the rgba(), hsl(), and hsla() functions are relatively new additions to CSS and are not supported by some older browsers. Depending on your needs, you may want to experiment with different methods for adjusting the opacity of your colors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Changing Color Using Class and Id
&lt;/h3&gt;

&lt;p&gt;now to change the color of a specific element, you can directly call that element in CSS, for example, if we want to change the color of all H1s to Blue then we can call H1 in CSS like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&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;but what if we want to change the color of specific elements inside a Class or Id? &lt;/p&gt;

&lt;p&gt;for that, we are going to call the class or id inside CSS and change their color.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"parent"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Id name is Parent&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"child"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Class name is Child&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#parent&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.child&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  CSS Background Color
&lt;/h3&gt;

&lt;p&gt;the background is something that consists of the width and height of the element, this is going to include the padding and borders but does not include margin, to change the background color in CSS we use background-color property. for example, let’s try changing the background color of our webpage to Green.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&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;we can also create a rectangle using CSS Color Properties:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"box"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  CSS Background Image
&lt;/h3&gt;

&lt;p&gt;CSS Background Image property allows us to place the image inside the HTML, you can add images like JPG, PNG, SVG, etc. for that we use the url() syntax. for example, if we want to add a image of deer in my HTML body we will type this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url(deer.jpg)&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;we can also add gradient using the same property&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;yellow&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;here we have a choice to add the color and what type of gradient we want to add&lt;/p&gt;

&lt;p&gt;CSS defines three types of gradients:&lt;/p&gt;

&lt;p&gt;Linear Gradients (goes down/up/left/right/diagonally)&lt;br&gt;
Radial Gradients (defined by their center)&lt;br&gt;
Conic Gradients (rotated around a center point)&lt;/p&gt;

&lt;p&gt;The background property in CSS allows you to control the background of any element&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&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(sweettexture.jpg)&lt;/span&gt;    &lt;span class="c"&gt;/* image */&lt;/span&gt;
     &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                     &lt;span class="c"&gt;/* color */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;CSS Color Property helps us to add colors to the webpage which makes the website quite appealing.&lt;br&gt;
using CSS Color Property we can easily add the color inside CSS&lt;br&gt;
there are different color formats that CSS Color Property supports&lt;br&gt;
They are known as Hex Code, RGB Color Code, HSL Color Code&lt;br&gt;
to change the text color we use the “color” property&lt;br&gt;
to change the background we use ‘background-color” property.&lt;br&gt;
to change the background to an image or a gradient we use “background-image” property.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CSS Animation Simplified!</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Tue, 16 Nov 2021 07:52:27 +0000</pubDate>
      <link>https://forem.com/ansub/css-animation-simplified-2g0i</link>
      <guid>https://forem.com/ansub/css-animation-simplified-2g0i</guid>
      <description>&lt;p&gt;CSS animations are a module that lets you animate the element which changes the element from one style to another. and to use the CSS animation we use &lt;code&gt;@keyframes&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;before talking about animation, let us make two boxes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;.parent{}&lt;/code&gt; - this is going to create a box &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.child{}&lt;/code&gt; - this is going to create a small box inside the parent.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note: container class is here to make the box come to the center for easier visibility.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.parent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;21&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;214&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;124&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.child&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;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%2Frx7rtl1em520hr7cu9fi.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%2Frx7rtl1em520hr7cu9fi.png" alt="css-animation-box"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Transition Property
&lt;/h3&gt;

&lt;p&gt;let's move our box from left to right, for that we don't have to use the animation and keyframe property because the animation of moving a box from left to right is quite simple easy and a one-step process. because the object is moving from left to right that's it.&lt;/p&gt;

&lt;p&gt;so that's why we use transition property.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;
&lt;span class="nc"&gt;.child&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;transform&lt;/span&gt; &lt;span class="n"&gt;ease-in&lt;/span&gt; &lt;span class="m"&gt;1s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.child&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;this is going to make to move the child box from left to right when you are going to hover on it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://postimg.cc/0rmw6M3h" 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%2Fi.postimg.cc%2FDfpdM1cf%2F7065468b160fdfdcf3cb3cc4ad9eb96bf5349b3b.gif" alt="7065468b160fdfdcf3cb3cc4ad9eb96bf5349b3b.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;syntax of transition property is like:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;transition&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;transition-property&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;transition-duration&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;transition-timing-function&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;transition-delay&lt;/span&gt;&lt;span class="o"&gt;];&lt;/span&gt;

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;transition property&lt;/strong&gt; : it is used to specify which specific property you have to change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;transition-duration&lt;/strong&gt;: this determines the duration of the transition&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;transition-timing-function&lt;/strong&gt;: this is used to define a function that describes how a transition will proceed over its duration, allowing a transition to change speed during its course. learn more about &lt;a href="https://css-tricks.com/almanac/properties/t/transition-timing-function/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;transition-duration&lt;/strong&gt;: it is used to define a length of time to delay the start of a transition.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;but what if we want to make the child circle around the parent box?&lt;/strong&gt;&lt;br&gt;
now here comes the role of &lt;code&gt;animation&lt;/code&gt; property&lt;/p&gt;

&lt;p&gt;animation also has a lot of properties but we can use a shorthand &lt;code&gt;animation&lt;/code&gt; to include all the properties. so let's get started:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.child&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.child&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;left-to-right&lt;/span&gt; &lt;span class="m"&gt;1s&lt;/span&gt; &lt;span class="n"&gt;ease-in&lt;/span&gt; &lt;span class="n"&gt;forwards&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;left-to-right&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="err"&gt;30&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="err"&gt;60&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;first you will see that the animation actually has a name "left-to-right" and then i am using that same name in the keyframe. this is to determine that animation is going to apply on that exact keyframes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;second is that you will find forwards, it actually comes from &lt;code&gt;animation-fill-mode&lt;/code&gt; property which is actually saying that you have to stop the animation at 100% otherwise what animation is going to do is that it will reset the animation when it will reach to 100% and the box will come again to 0%.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sub-Properties of Animation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;animation-name&lt;/strong&gt;: declares the name of the @keyframes at-rule to manipulate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-duration&lt;/strong&gt;: the length of time it takes for an animation to complete one cycle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-timing-function&lt;/strong&gt;: establishes preset acceleration curves such as ease or linear.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-delay&lt;/strong&gt;: the time between the element being loaded and the start of the animation sequence (cool examples).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-direction&lt;/strong&gt;: sets the direction of the animation after the cycle. Its default resets on each cycle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-iteration-count&lt;/strong&gt;: the number of times the animation should be performed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-fill-mode&lt;/strong&gt;: sets which values are applied before/after the animation.
For example, you can set the last state of the animation to remain on screen, or you can set it to switch back to before when the animation began.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-play-state&lt;/strong&gt;: pause/play the animation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and this will be the result: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://postimg.cc/BtpGCsjN" 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%2Fi.postimg.cc%2FX7S74Y4M%2Fezgif-6-cc307b2c5c6b.gif" alt="ezgif-6-cc307b2c5c6b.gif"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;so that's CSS Animation for you, this is actually quite the basics of animation there is a lot more to CSS Animations, I will provide some links which can help you become a PRO in CSS Animations:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://css-tricks.com/almanac/properties/a/animation/" rel="noopener noreferrer"&gt;CSS Tricks Animation Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=YszONjKpgg4&amp;amp;ab_channel=WebDevSimplified" rel="noopener noreferrer"&gt;CSS3 Animation &amp;amp; Transitions Crash Course&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;you can also buy my handwritten notes on CSS Grid which i made while learning about GRID topic for just $1:&lt;br&gt;
&lt;a href="https://ansubkhan.gumroad.com/l/css-grid-notes" rel="noopener noreferrer"&gt;Get My CSS Grid Notes&lt;/a&gt;&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%2Ff9p72peeadpkp8n5967d.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%2Ff9p72peeadpkp8n5967d.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Connect With Me!
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/justansub" 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%2Fimg.shields.io%2Fbadge%2FTwitter-1DA1F2%3Fstyle%3Dfor-the-badge%26logo%3Dtwitter%26logoColor%3Dwhite"&gt; &lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://ansubkhan.com" 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%2Fimg.shields.io%2Fbadge%2Fwebsite-000000%3Fstyle%3Dfor-the-badge%26logo%3DAbout.me%26logoColor%3Dwhite"&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ansub" 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%2Fimg.shields.io%2Fbadge%2FLinkedIn-0077B5%3Fstyle%3Dfor-the-badge%26logo%3Dlinkedin%26logoColor%3Dwhite"&gt; &lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/ansub"&gt; &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2Fdev.to-0A0A0A%3Fstyle%3Dfor-the-badge%26logo%3Ddevdotto%26logoColor%3Dwhite"&gt; &lt;/a&gt; &lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>CSS Grids Simplified!</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Fri, 12 Nov 2021 09:53:08 +0000</pubDate>
      <link>https://forem.com/ansub/css-grids-simplified-2m9f</link>
      <guid>https://forem.com/ansub/css-grids-simplified-2m9f</guid>
      <description>&lt;h3&gt;
  
  
  What is CSS Grid?
&lt;/h3&gt;

&lt;p&gt;CSS Grid Layout is a two-dimensional grid-based layout system that is specifically designed to make the layout work easy on CSS. &lt;/p&gt;

&lt;p&gt;Before we used to layout our web pages using tables, float, then positioning, and inline-block, but all these methods were more like hacks. Flexbox is also a good layout tool that a lot of people use but it is one-directional flow and it also has different use cases as well. Grid is the first CSS Module which is created specifically to solve the layout problems.&lt;/p&gt;

&lt;p&gt;let's start with adding grid to the layout, I am making a simple HTML Container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet.&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet.&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet.&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet.&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet.&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet.&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now let's add grid to out CSS layout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#eee&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/* changed nth child color to tell the difference */&lt;/span&gt;
&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="nd"&gt;:nth-child&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;odd&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ddd&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now this will give us the output of 6 divs divided into columns having 3fr (MDN defines the fr unit as a unit that represents a fraction of the available space in the grid container). you can also use px or rem even % but they are fixed. hence it is a better practice to use fr.&lt;/p&gt;

&lt;h3&gt;
  
  
  grid-template-columns
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="py"&gt;grid-column-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;it specifies the number and the width of columns in a grid layout. in simple words more fr you are going to add is going to add more columns and change the value of fr is going to change the width of the specific box;&lt;/p&gt;

&lt;p&gt;Now, in my case, I have added 2fr with the value of 3. then it will give them an equal space of 3.&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%2Fk0kcp3gu6qo9vgfoja6a.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%2Fk0kcp3gu6qo9vgfoja6a.png" alt="CSS GRID"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;if I am going to increase the fr then it is going to create more columns. you can also change the value to make one column bigger than the other one. &lt;/p&gt;
&lt;h3&gt;
  
  
  grid-gap
&lt;/h3&gt;

&lt;p&gt;you must be wondering how I am getting the space between the spaces I used grid-gap property for gap;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="py"&gt;grid-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  grid-template-rows
&lt;/h3&gt;

&lt;p&gt;grid-template-rows is also the same thing as we did for the column, for example, i added grid-template-rows along with grid-template-row&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Frsids3dzq7vougsdoafk.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%2Frsids3dzq7vougsdoafk.png" alt="CSS GRID"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;you can also use repeat(value, fr) to make the consistent columns or rows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this is going to make 3 columns of 1fr.&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%2Fw6h9yfq82v679v4y2go7.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%2Fw6h9yfq82v679v4y2go7.png" alt="CSS GRID"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  grid-auto-rows
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;we can also increase the height of boxes we use by using grid-auto-rows.&lt;/li&gt;
&lt;li&gt;for example, if I want to increase the height by 10rem I will type:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;grid-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-auto-rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F4xzoarj1416tzaull0dv.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%2F4xzoarj1416tzaull0dv.png" alt="CSS GRID"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  minmax()
&lt;/h3&gt;

&lt;p&gt;now if you match it with the image before this one then you are going to find out the difference between the height of the two images. if you have text which is more than the height you have given then you can use minmax(), we use this to give the min-height we need and then we can give maximum height to for the element which can also be auto where the browser is going to adjust the text inside the grid by itself.&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%2Fq3ximpvdd7v3z1j3zlf4.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%2Fq3ximpvdd7v3z1j3zlf4.png" alt="CSS GRID"&gt;&lt;/a&gt;&lt;br&gt;
look in this case, the text is going out of the box, and below the other box, let's add mixmax() to fix this issue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;grid-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-auto-rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;minmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10rem&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fftnbh3n6tg7uu8mkrgv8.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%2Fftnbh3n6tg7uu8mkrgv8.png" alt="CSS GRID"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  justify-items, align-items &amp;amp; align-self, justify-self
&lt;/h3&gt;

&lt;p&gt;just like we use justify-content and align-items in flex, we have the same thing in GRID as well, we call them justify-items, align-items. in order to look into that you can just look at the flex-properties they both do the same thing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Grid Column
&lt;/h3&gt;

&lt;p&gt;Shorthand property for &lt;code&gt;[grid-column-start]&lt;/code&gt; and &lt;code&gt;[grid-column-end]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;grid-column: auto auto&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;the grid item's column start and end are automatically set.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;grid-column: 1 / 3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The grid item starts before the first column and ends just before the third one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;grid-column: span 3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The grid item spans &lt;strong&gt;3 columns&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;grid-column: 1 / span 4&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The grid items start before the first column and span for &lt;strong&gt;4 columns&lt;/strong&gt;, creating a new one in the process.&lt;/p&gt;

&lt;p&gt;the same thing goes with grid-rows as well. &lt;/p&gt;

&lt;p&gt;you can also buy my handwritten notes on CSS Grid which i made while learning about this topic for just $1:&lt;br&gt;
&lt;a href="https://ansubkhan.gumroad.com/l/css-grid-notes" rel="noopener noreferrer"&gt;Get My CSS Grid Notes&lt;/a&gt;&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%2Ff9p72peeadpkp8n5967d.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%2Ff9p72peeadpkp8n5967d.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;these are some advanced topics of GRID, I will recommend you this video on CSS Grids.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/t6CBKf8K_Ac"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h3&gt;
  
  
  Thanks For Reading!
&lt;/h3&gt;

&lt;p&gt;if you need any help with HTML, CSS and Javascript then you can find me on my &lt;a href="//www.ansubkhan.com"&gt;website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;you can also download my FREE NOTION TEMPLATE which is a powerful to-do list that can boost your productivity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ansubkhan.gumroad.com/l/to-do-list" rel="noopener noreferrer"&gt;Click Here!&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Best Visual Studio Code Themes</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Tue, 09 Nov 2021 09:15:10 +0000</pubDate>
      <link>https://forem.com/ansub/best-visual-studio-code-themes-3cmk</link>
      <guid>https://forem.com/ansub/best-visual-studio-code-themes-3cmk</guid>
      <description>&lt;p&gt;VS Code probably has the best community, and they have a lots of editor customization options. Here are a few of my favourite VS Code themes.&lt;/p&gt;

&lt;h3&gt;
  
  
  SynthWave ’84 (this one is the best)
&lt;/h3&gt;

&lt;p&gt;Do you remember that endless summer back in ’84? Cruising down the ocean-highway with the top down, the wind in our hair and heads buzzing with neon dreams? No, I don’t remember it either, but with this experimental theme, we can go there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DiRy7V-c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1629549429033/-Qs5iRwAAP.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DiRy7V-c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1629549429033/-Qs5iRwAAP.png" alt="Screenshot 2021-08-21 at 6.07.03 PM.png" width="880" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=RobbOwen.synthwave-vscode"&gt;Download SynthWave '84&lt;/a&gt; &lt;br&gt;
I have disabled the glow effect but you can enable it if you want to.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shades of Purple
&lt;/h3&gt;

&lt;p&gt;I also like shades of purple, Shades of the purple theme is built with several shades of purple and a few contrast colors to make things pop. This also makes SOP a very good theme for teaching, presenting,&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zmic9MOH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1629549487521/XDwEjHJdA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zmic9MOH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1629549487521/XDwEjHJdA.png" alt="Screenshot 2021-08-21 at 6.08.03 PM.png" width="880" height="570"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;a href="https://marketplace.visualstudio.com/items?itemName=ahmadawais.shades-of-purple"&gt;Download Shades of Purple&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Horizon Theme
&lt;/h3&gt;

&lt;p&gt;it is the beautiful warm dual theme for Visual Studio Code, it comes in dark mode as well, but the light mode looks much better.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lMsDdAZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1629549753589/alF41eu27.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lMsDdAZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1629549753589/alF41eu27.png" alt="Screenshot 2021-08-21 at 6.12.29 PM.png" width="880" height="570"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;a href="https://marketplace.visualstudio.com/items?itemName=jolaleye.horizon-theme-vscode"&gt;Download Horizon Theme&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Atom Dark One Theme
&lt;/h3&gt;

&lt;p&gt;VSCode Theme based on Atom's One Dark theme. Best rated One Dark theme port in the marketplace, features full Workbench theming.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---jwp8Pap--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1629549775051/WuMTlOm_S.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---jwp8Pap--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1629549775051/WuMTlOm_S.png" alt="Screenshot 2021-08-21 at 6.12.50 PM.png" width="880" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=akamud.vscode-theme-onedark"&gt;Download Atom Dark One&lt;/a&gt; &lt;/p&gt;

</description>
      <category>vscode</category>
      <category>themes</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is Semantic HTML?</title>
      <dc:creator>Ansub Khan</dc:creator>
      <pubDate>Tue, 09 Nov 2021 09:12:28 +0000</pubDate>
      <link>https://forem.com/ansub/what-is-semantic-html-35ig</link>
      <guid>https://forem.com/ansub/what-is-semantic-html-35ig</guid>
      <description>&lt;h3&gt;
  
  
  What is  Semantic HTML?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Semantic HTML is a coding style where elements which we use actually have some meaning. Semantic simply put means a logic that has an actual meaning hence comes the name: Semantic HTML, an HTML which is a logic and also has a meaning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This practice is good for Search Engine Optimization (SEO)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;it is also good for accessibility, especially for visually impaired people who rely on browser speech, screen readers to interpret page content clearly.&lt;br&gt;
&lt;strong&gt;Here is how a non-semantic HTML looks like:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eJa4BtbH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1636103009387/8eTJPGf0R.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eJa4BtbH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1636103009387/8eTJPGf0R.jpeg" alt="IMG_0135.jpg" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;here is how a semantic HTML looks like&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zSrkp3lE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1636103034458/R43hLkp7H.jpeg" alt="IMG_0136.jpg" width="880" height="880"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Remember:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;to write semantic HTML, avoid using div tags everywhere, instead use elements like header, nav, section, article, aside, footer. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;all these elements are built with a specific purpose - they are good for SEO too.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;In Simple Words:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;non-semantic elements: &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; tells nothing about its content.&lt;/p&gt;

&lt;p&gt;Semantic Elements: &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt;and &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt; -&amp;gt; clearly defines its content.&lt;/p&gt;

&lt;p&gt;if you want any help with the Semantic HTML or any other query then please contact me on my Twitter&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>web3</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
