<?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: Mahesh Patidar</title>
    <description>The latest articles on DEV Community by Mahesh Patidar (@ali6nx404).</description>
    <link>https://dev.to/ali6nx404</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%2F718375%2F8c637c70-e5c6-449e-91ca-9252a82d7b33.jpg</url>
      <title>DEV Community: Mahesh Patidar</title>
      <link>https://dev.to/ali6nx404</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ali6nx404"/>
    <language>en</language>
    <item>
      <title>Box Model in CSS:- "Boxes - Boxes rectangular Boxes Everywhere 😅"</title>
      <dc:creator>Mahesh Patidar</dc:creator>
      <pubDate>Thu, 28 Oct 2021 04:11:59 +0000</pubDate>
      <link>https://dev.to/ali6nx404/--31fn</link>
      <guid>https://dev.to/ali6nx404/--31fn</guid>
      <description>&lt;p&gt;The first thing you need to understand is that, Everything you see on a web page is made up of rectangles boxes.&lt;/p&gt;

&lt;p&gt;on a website, you will see all the content is just a combination of boxes, Arranged on top to, on next to, bottom, or nested in each other.&lt;/p&gt;

&lt;p&gt;Header, nav, footer everything made up with boxes. Usually, we called it HTML elements instead of rectangles boxes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;𝘉𝘰𝘹𝘦𝘴 - 𝘉𝘰𝘹𝘦𝘴 𝘳𝘦𝘤𝘵𝘢𝘯𝘨𝘶𝘭𝘢𝘳 𝘉𝘰𝘹𝘦𝘴 𝘌𝘷𝘦𝘳𝘺𝘸𝘩𝘦𝘳𝘦 😅&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Take a look below 👇&lt;/p&gt;

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

&lt;p&gt;Code added by me to see all the boxes 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
 outline: 2px solid #ffb400 !important;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What is the Box model in CSS?
&lt;/h2&gt;

&lt;p&gt;Whenever you create an HTML element it is wrapped around in a box, and we are able to modify it using CSS. &lt;/p&gt;

&lt;p&gt;this box is built with several different layers such as margin, padding, border, and content.&lt;/p&gt;

&lt;p&gt;and with the help of CSS, we can manipulate the size, position, and properties of these boxes.&lt;/p&gt;

&lt;p&gt;It is used to develop the design and structure of a web page. &lt;/p&gt;

&lt;h3&gt;
  
  
  Layers of Box Model:-
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Content Area&lt;/li&gt;
&lt;li&gt;Padding&lt;/li&gt;
&lt;li&gt;Border&lt;/li&gt;
&lt;li&gt;margin&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's talk about each Layer of Box model.&lt;/p&gt;

&lt;h4&gt;
  
  
  ✔ Content Area:-
&lt;/h4&gt;

&lt;p&gt;The content area contains the real content which is put inside HTML elements such as text, image, etc.&lt;/p&gt;

&lt;p&gt;The width and height properties define the width and height of the content box. &lt;/p&gt;

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

&lt;p&gt;Also, you can define the width and height of content with other properties such as,&lt;/p&gt;

&lt;p&gt;max-width, min-width, max-height, and min-height set constraints and not a fixed size.&lt;/p&gt;

&lt;p&gt;if we didn't define height and width then it will calculate based on content, But we have also the option to set fixed height and width with the given properties.&lt;/p&gt;

&lt;p&gt;take a look below 👇&lt;/p&gt;

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

&lt;h5&gt;
  
  
  Output -
&lt;/h5&gt;

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

&lt;h4&gt;
  
  
  ✔ Padding:-
&lt;/h4&gt;

&lt;p&gt;Padding in CSS refers to the space between the border and the element content.&lt;/p&gt;

&lt;p&gt;To set padding on top, right, bottom, and left. we have properties such as &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;padding-top &lt;/li&gt;
&lt;li&gt;padding-right&lt;/li&gt;
&lt;li&gt;padding-bottom&lt;/li&gt;
&lt;li&gt;padding-left&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The padding shorthand defines all four sides of an element in one declaration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p {
   padding:20px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  ✔ Border:-
&lt;/h4&gt;

&lt;p&gt;The border in CSS is between the margin and padding components of the box model. &lt;/p&gt;

&lt;p&gt;Usually, we see the border around buttons like this 👇&lt;/p&gt;

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

&lt;p&gt;the border shorthand property takes three inputs:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- border size
- border-style : solid/ dashed
- border-color
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;button {
     border: 2px solid #ffb400;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List of border styles we can use 👇&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1433301171343544327-158" src="https://platform.twitter.com/embed/Tweet.html?id=1433301171343544327"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1433301171343544327-158');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1433301171343544327&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h4&gt;
  
  
  ✔ margin:-
&lt;/h4&gt;

&lt;p&gt;margin is nothing but space between the box and surrounding boxes.&lt;/p&gt;

&lt;p&gt;To set the margin on the top, right, bottom, and left. we have properties such as &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;margin-top &lt;/li&gt;
&lt;li&gt;margin-right&lt;/li&gt;
&lt;li&gt;margin-bottom&lt;/li&gt;
&lt;li&gt;margin-left&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The margin shorthand defines all four sides of an element in one declaration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div {
  margin: 30px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  The size of the box is calculated like this:
&lt;/h4&gt;

&lt;p&gt;𝐓𝐨𝐭𝐚𝐥 𝐖𝐢𝐝𝐭𝐡 = width + padding-left + padding-right + border-left + border-right.&lt;/p&gt;

&lt;p&gt;𝐓𝐨𝐭𝐚𝐥 𝐇𝐞𝐢𝐠𝐡𝐭 = height + padding-top + padding-bottom + border-top + border-bottom.&lt;/p&gt;

&lt;p&gt;the way the default box model calculates the width and height of elements add so many problems because in total width and height padding and border also added.&lt;/p&gt;

&lt;p&gt;🤜 To solve this issue another property was introduced known as box-sizing.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is box-sizing?
&lt;/h3&gt;

&lt;p&gt;The CSS box-sizing sets the way the total width and height of HTML elements should be calculated.&lt;/p&gt;

&lt;p&gt;Values you can specify:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;content-box&lt;/li&gt;
&lt;li&gt;border-box&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  ✔ content-box -
&lt;/h4&gt;

&lt;p&gt;By adding content-box nothing will change because it is the default behavior of the box-sizing property. &lt;/p&gt;

&lt;p&gt;If you set Width, padding, and border like this 👇&lt;/p&gt;

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

&lt;h4&gt;
  
  
  ✔ border-box -
&lt;/h4&gt;

&lt;p&gt;Border box is the best choice, it says the content box shrinks to add padding and border.&lt;/p&gt;

&lt;p&gt;if you add 300px width to box and 20px padding and 3px border.&lt;/p&gt;

&lt;p&gt;all of this together becomes 300 because the content box shrinks to add padding and border.&lt;/p&gt;

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

&lt;p&gt;𝐓𝐢𝐩: border-box is the best choice for designing layouts and managing the sizes of HTML elements.&lt;/p&gt;

&lt;p&gt;No need to set this property for each element individually.&lt;/p&gt;

&lt;p&gt;box-sizing Reset Method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html {
   box-sizing: border-box;
}

*, *::before, *::after {
   box-sizing: inherit;
}

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

&lt;/div&gt;



&lt;p&gt;if you're not familiar with inheritance and global reset,&lt;/p&gt;

&lt;p&gt;then take reference from this blog to understand the above code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/" rel="noopener noreferrer"&gt;https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;😍 We learned enough theory let's see it in an action.&lt;/p&gt;

&lt;p&gt;notice the difference in the size of both elements in code and after inspecting the element.&lt;/p&gt;

&lt;p&gt;codepen 👇&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Key Points -
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;always prefer border-box.&lt;/li&gt;
&lt;li&gt;Use the Browser tool to see the exact calculated size of an element.&lt;/li&gt;
&lt;li&gt;Use global reset for ease of work.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion -
&lt;/h3&gt;

&lt;p&gt;ok, that's it, we covered all the most important parts of the box model.😍&lt;/p&gt;

&lt;p&gt;Thanks for stopping and checking these resources, I'm sure it's going to help you at some point in time.&lt;/p&gt;

&lt;p&gt;If you enjoyed reading then don't forget to share with other Devs too😇.&lt;/p&gt;

&lt;p&gt;Let's connect with me on &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/Ali6nX404" rel="noopener noreferrer"&gt;twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/mahesh-patidar-34a982192/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Cheat Sheets that always save my time during web development 🚀</title>
      <dc:creator>Mahesh Patidar</dc:creator>
      <pubDate>Fri, 22 Oct 2021 17:00:02 +0000</pubDate>
      <link>https://dev.to/ali6nx404/cheat-sheets-that-always-save-my-time-during-web-development-2ga4</link>
      <guid>https://dev.to/ali6nx404/cheat-sheets-that-always-save-my-time-during-web-development-2ga4</guid>
      <description>&lt;p&gt;During Coding I often forget exact properties and at that time searching on google take time at least for me ( because I don't know about you 😁😅).&lt;/p&gt;

&lt;p&gt;So I always prefer cheatsheets because in 90% of cases I got my answer from them.&lt;/p&gt;

&lt;p&gt;So today I'm going to share a list of top cheatsheets that save my time during development.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. &lt;a href="https://htmlcheatsheet.com/" rel="noopener noreferrer"&gt;HTML Cheatsheet &lt;/a&gt;-
&lt;/h4&gt;

&lt;p&gt;This Cheat Sheet contains useful code examples and developer tools, markup generators, and more on a single page. &lt;/p&gt;

&lt;p&gt;This is a helpful quick guide for those who already know how to work with these languages.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. &lt;a href="https://htmlcheatsheet.com/css/" rel="noopener noreferrer"&gt;CSS Cheatsheet &lt;/a&gt;-
&lt;/h4&gt;

&lt;p&gt;This Cheat Sheet contains the CSS properties, text-shadow generators, color picker, and some common code snippets.  &lt;/p&gt;

&lt;h4&gt;
  
  
  3. &lt;a href="https://grid.malven.co/" rel="noopener noreferrer"&gt;Grid Layout&lt;/a&gt; -
&lt;/h4&gt;

&lt;p&gt;This one is not only a time saver but it is really a lifesaver because whenever I'm working with grid layout, most of the time I need a cheat sheet.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. &lt;a href="https://flexbox.malven.co/" rel="noopener noreferrer"&gt;FlexBox&lt;/a&gt; -
&lt;/h4&gt;

&lt;p&gt;Another visual-based cheat sheet for CSS flexbox, this one contains all the flexbox properties with visual examples.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. &lt;a href="https://htmlcheatsheet.com/js/" rel="noopener noreferrer"&gt;JavaScript&lt;/a&gt; -
&lt;/h4&gt;

&lt;p&gt;This Cheat Seet contains useful code examples on a single page. Find code for JS loops, variables, objects, data types, strings, events, and many other categories. &lt;/p&gt;

&lt;h4&gt;
  
  
  6. &lt;a href="https://ilovecoding.org/blog/js-cheatsheet" rel="noopener noreferrer"&gt;JavaScript&lt;/a&gt; -
&lt;/h4&gt;

&lt;p&gt;This cheat sheet contains basic to advanced concepts. ES6+, simple explanations, DOM API, Event loop, functions, array, object, Type and so much more.&lt;/p&gt;

&lt;h4&gt;
  
  
  7. &lt;a href="http://www.developer-cheatsheets.com/react" rel="noopener noreferrer"&gt;React&lt;/a&gt; -
&lt;/h4&gt;

&lt;p&gt;This single cheat sheet contains various code examples to boost your react development.&lt;/p&gt;

&lt;h4&gt;
  
  
  8. &lt;a href="http://git-cheatsheet.com/" rel="noopener noreferrer"&gt;Git&lt;/a&gt; -
&lt;/h4&gt;

&lt;p&gt;This cheat sheet contains a list of handy git commands to make your life easier!&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion -
&lt;/h3&gt;

&lt;p&gt;Cheat Sheets are best for taking quick references and boosting productivity. I hope you found this article useful and you enjoyed the reading.&lt;/p&gt;

&lt;p&gt;Let's connect with me on &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/Ali6nX404" rel="noopener noreferrer"&gt;twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/mahesh-patidar-34a982192/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>javascript</category>
      <category>react</category>
      <category>webdeveloper</category>
    </item>
    <item>
      <title>I wasted 2 months in tutorial hell😖😫</title>
      <dc:creator>Mahesh Patidar</dc:creator>
      <pubDate>Wed, 20 Oct 2021 10:30:01 +0000</pubDate>
      <link>https://dev.to/ali6nx404/i-wasted-2-months-in-tutorial-hell-136c</link>
      <guid>https://dev.to/ali6nx404/i-wasted-2-months-in-tutorial-hell-136c</guid>
      <description>&lt;p&gt;As I started learning to code, I was stuck in tutorial hell. It felt like, I am learning a lot of the stuff. I have mastered CSS and JS.&lt;/p&gt;

&lt;p&gt;After Creating a lot of projects while watching tutorials. One day I decided to create a project of my own, and the biggest myth busted 😫.&lt;/p&gt;

&lt;p&gt;I came to know that I don't know anything so I started another course and then the same happens until I discovered that I was in tutorial hell.&lt;/p&gt;

&lt;h2&gt;
  
  
  WTF is Tutorial Hell?
&lt;/h2&gt;

&lt;p&gt;Tutorial hell is when you continuously watch tutorials one after another and you feel like, you are learning a lot of things.&lt;/p&gt;

&lt;p&gt;But when you start doing something your own, you found out you're even not able to solve a basic coding problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with tutorial hell?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You get fake confidence.&lt;/li&gt;
&lt;li&gt;Fake feeling of growth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Quote by Albert Einstein - &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;" insanity is doing the same thing over and over again and expecting different results. "&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There is nothing wrong with using tutorials to learn new things. You just need to stop that desire of starting a new tutorial as soon as you finish the one you were working on.&lt;/p&gt;

&lt;p&gt;When you complete a tutorial, try to recreate the same code using only your memory.  You will probably be stuck in a few things so rewatch/reread and again start the solving problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Break tutorial hell?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Learn the Basics&lt;/li&gt;
&lt;li&gt;take Proper Notes&lt;/li&gt;
&lt;li&gt;Start With a Small problem&lt;/li&gt;
&lt;li&gt;Be consistent&lt;/li&gt;
&lt;li&gt;Teach others&lt;/li&gt;
&lt;li&gt;Build Projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deep Dive 👇&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Learn Basics -
&lt;/h4&gt;

&lt;p&gt;Don't try to jump into advanced stuff without learning enough basics.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Core Fundamentals &amp;gt;&amp;gt;&amp;gt;&amp;gt; frameworks&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  2. take proper Notes -
&lt;/h4&gt;

&lt;p&gt;Notes are the best way to revise your learning because we humans are never able to remember all the things.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note the key points.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  3. Start with a small problem -
&lt;/h4&gt;

&lt;p&gt;Always start with small coding problems, do not try to solve big problems because you get demotivated easily in the beginning.&lt;/p&gt;

&lt;p&gt;Coding is all about solving problems so always break your problem into small sub-problem. &lt;/p&gt;

&lt;h4&gt;
  
  
  4. Be consistent -
&lt;/h4&gt;

&lt;p&gt;Do not try to learn everything in one or two months. be consistent with your learning soon you will see Great results.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Teach others -
&lt;/h4&gt;

&lt;p&gt;teaching is the best way to Recalling back what we have learned. &lt;/p&gt;

&lt;h4&gt;
  
  
  6. Build Projects -
&lt;/h4&gt;

&lt;p&gt;The more you code, The better you become 💛, Don't just watch the tutorials, practice what you learn.&lt;/p&gt;

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

&lt;p&gt;If you are able to relate to this article that you are in tutorial hell. Use the given techniques to escape from tutorial hell. &lt;/p&gt;

&lt;p&gt;I hope you enjoyed reading&lt;/p&gt;

&lt;p&gt;Let's connect with me on &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/Ali6nX404" rel="noopener noreferrer"&gt;twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/mahesh-patidar-34a982192/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>developer</category>
      <category>css</category>
      <category>webdeveloper</category>
    </item>
    <item>
      <title>Confused About rem and em units in CSS?</title>
      <dc:creator>Mahesh Patidar</dc:creator>
      <pubDate>Wed, 13 Oct 2021 16:32:35 +0000</pubDate>
      <link>https://dev.to/ali6nx404/confused-about-rem-and-em-units-in-css-26go</link>
      <guid>https://dev.to/ali6nx404/confused-about-rem-and-em-units-in-css-26go</guid>
      <description>&lt;p&gt;rem and em units in CSS is creating confusion for beginners, &lt;/p&gt;

&lt;p&gt;Most beginners don't understand the correct meaning of both units and then use them without thinking much and it creates lots of problems for them.&lt;/p&gt;

&lt;p&gt;em and rem both are known as relative units in CSS. &lt;/p&gt;

&lt;p&gt;You've probably been using em and rem units now for a while already, but still, you might be confused about which unit is best in which scenario.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is em?
&lt;/h2&gt;

&lt;p&gt;An em value is equal to the computed font size of the parent of that element. example if font size of parent element is 20 px then 1em is equal to 20px.&lt;/p&gt;

&lt;p&gt;if the font size is not specified in the parent element then it will look continues up until the root element.&lt;/p&gt;

&lt;p&gt;Root element font size is provided by the browser and by default it is 16px.&lt;/p&gt;

&lt;p&gt;in this case, 1em is equal to 16px.&lt;/p&gt;

&lt;h2&gt;
  
  
  compounding effect of em -
&lt;/h2&gt;

&lt;p&gt;check the below challenge, and then jump on the answer and understand how em works.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1445427836320247810-353" src="https://platform.twitter.com/embed/Tweet.html?id=1445427836320247810"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1445427836320247810-353');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1445427836320247810&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;We have three divs,  container, parent, and child and respectively are specified font-size 1em, 3em, and 2em.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;font-size of container is 1em eqaul to 16px.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;font size of parent is 3em means 3 * 16px ( parent font-size) so it becomes 48px now.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;font size of child is 2em means 2 * 48px ( size of parent element) so it becomes 96px now.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;the final size of the child becomes 96px, 😅 power of compounding. &lt;/p&gt;

&lt;p&gt;check live example 👇&lt;/p&gt;

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

&lt;p&gt;let's see this in action 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1634009342704%2F1mwKQC-Ar.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1634009342704%2F1mwKQC-Ar.webp" alt="86pxx.webp" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is rem?
&lt;/h2&gt;

&lt;p&gt;While em is relative to the font size of its direct or nearest parent, rem is only relative to the Html (root) font size.&lt;/p&gt;

&lt;p&gt;by default, it is 16px until we didn't specify in the Html element.&lt;/p&gt;

&lt;p&gt;rem value is not much convenient when it comes to specifying such as&lt;/p&gt;

&lt;p&gt;1rem = 16px &lt;/p&gt;

&lt;p&gt;But what if we want to use 10px than we need to calculate the rem value which is equal to 0.625rem.&lt;/p&gt;

&lt;p&gt;To solve this problem we have one trick, specify the Html element font size as 62.5%.&lt;/p&gt;

&lt;p&gt;than our 1rem becomes 10px and now we are able to calculate size easily.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which is better?
&lt;/h2&gt;

&lt;p&gt;There’s no better unit really, and it all depends on your personal choice. Some people like to use rem units for consistency and scalability, &lt;/p&gt;

&lt;p&gt;while some like to use em units in places where the influence of nearby parent elements would make sense.&lt;/p&gt;

&lt;p&gt;I personally use rem more than em but be careful with both, em becomes a trouble when you don't understand the relation between parents and child, &lt;/p&gt;

&lt;p&gt;and we already see the example of compounding effect in em. so I like to say use rem more often than em.&lt;/p&gt;

&lt;p&gt;If you want to calculate the accurate size in rem and em, then &lt;a href="http://pxtoem.com/" rel="noopener noreferrer"&gt;pxtoem&lt;/a&gt; website is pretty useful.&lt;/p&gt;

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

&lt;p&gt;Trying both units and understanding the use cases is most important. I would like to suggest you play with both units and understand both of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's Connect -
&lt;/h3&gt;

&lt;p&gt;✔ &lt;a href="https://twitter.com/Ali6nX404" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;br&gt;
✔ &lt;a href="https://www.linkedin.com/in/mahesh-patidar-34a982192/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>html</category>
    </item>
    <item>
      <title>How to Create Beautiful Gradients with CSS</title>
      <dc:creator>Mahesh Patidar</dc:creator>
      <pubDate>Sun, 03 Oct 2021 16:52:02 +0000</pubDate>
      <link>https://dev.to/ali6nx404/how-to-create-beautiful-gradients-with-css-2pjm</link>
      <guid>https://dev.to/ali6nx404/how-to-create-beautiful-gradients-with-css-2pjm</guid>
      <description>&lt;p&gt;Let's start this blog with a confession, I wrote this detailed thread for Twitter then I decided to turn it into the blog and upload it here too.&lt;/p&gt;

&lt;p&gt;I'm writing this blog because I found learning gradient a little bit difficult in my early days. there are different types of gradients available and we mostly end up using a basic linear-gradient, but the gradient is far more powerful than you think. &lt;/p&gt;

&lt;p&gt;In this, I'm going to cover all the basics and most important concepts of the gradient.&lt;/p&gt;

&lt;p&gt;in the next blog, I will share some real-world examples and more advanced usage of gradients.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the gradient?
&lt;/h2&gt;

&lt;p&gt;CSS gradient allows you to create a smooth gradient between two colors, right up to impressive mixing and multiple gradients.&lt;/p&gt;

&lt;p&gt;Gradient makes the background more attractive than a solid color.&lt;/p&gt;

&lt;p&gt;We all know about Instagram but did you notice that the Instagram logo is also a gradient.&lt;/p&gt;

&lt;p&gt;The genius is in its simplicity.✨&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxnfjxdy4eccccr93zaoq.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxnfjxdy4eccccr93zaoq.jpeg" alt="logo.jpg" width="474" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of gradients?
&lt;/h2&gt;

&lt;p&gt;There is three gradient function in CSS.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linear Gradient&lt;/li&gt;
&lt;li&gt;Radial gradient
&lt;/li&gt;
&lt;li&gt;Conic gradient &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's talk about each type in more detail.✨&lt;/p&gt;

&lt;h2&gt;
  
  
  Linear Gradient -
&lt;/h2&gt;

&lt;p&gt;A linear gradient starts at one point and changes along a straight line to the endpoint. &lt;/p&gt;

&lt;p&gt;The direction of the linear gradient can be up/down, left/right, or diagonal.&lt;/p&gt;

&lt;p&gt;To create a linear gradient you must define at least two-color.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Basic linear gradient -
&lt;/h3&gt;

&lt;p&gt;To create the most basic gradient you just need to specify two-color. Two colors are the minimum required but you can have color as much as you want.&lt;/p&gt;

&lt;p&gt;Without specifying angle will consider top-to-bottom.&lt;/p&gt;

&lt;p&gt;Example👇&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Changing the direction of Gradient -
&lt;/h3&gt;

&lt;p&gt;The values are "to top", "to bottom", "to left", and "to right" used to change direction.&lt;/p&gt;

&lt;p&gt;even we're free to use both the horizontal side (left or right), and the vertical side (top or bottom) after "to".&lt;/p&gt;

&lt;p&gt;Example 👇&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Angle for changing direction -
&lt;/h3&gt;

&lt;p&gt;We Are free to use an angle unit to specify the direction of the gradient.&lt;/p&gt;

&lt;p&gt;The values are equivalent -&lt;/p&gt;

&lt;p&gt;to top - 0deg,&lt;br&gt;
to bottom - 180deg,&lt;br&gt;
to left - 270deg,&lt;br&gt;
to right - 90deg.&lt;/p&gt;

&lt;p&gt;you can also use other angle units.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Color stop -
&lt;/h3&gt;

&lt;p&gt;One thing we didn't talk about as of now is "color-stop". Color stops are the colors you want to render smooth transitions among. &lt;/p&gt;

&lt;p&gt;A color-stop value, followed by one or two optional stop positions. in percentage or in length.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Radial gradient -
&lt;/h2&gt;

&lt;p&gt;A radial gradient starts from a central point and radiates outwards towards the outer endpoint.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Before we move further let's discuss some key terms -
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Size&lt;/li&gt;
&lt;li&gt;Shape&lt;/li&gt;
&lt;li&gt;Position&lt;/li&gt;
&lt;li&gt;color-stop ( Same as linear one )&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's dive deeper 👇&lt;/p&gt;

&lt;p&gt;✔ size - &lt;/p&gt;

&lt;p&gt;The size influences the ending shape of the gradient by taking the shape value you determined and instructing the gradient where to end.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;closest-side&lt;/li&gt;
&lt;li&gt;closest-corner&lt;/li&gt;
&lt;li&gt;farthest-side&lt;/li&gt;
&lt;li&gt;farthest-corner ( default one )&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Detailed explanation 👇&lt;/p&gt;

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

&lt;p&gt;✔ Shape - &lt;/p&gt;

&lt;p&gt;This determines the shape of the gradient, and because we’re talking about radial gradients, &lt;/p&gt;

&lt;p&gt;they’re limited to being circular in nature. our shapes will be between an ellipse or a circle. &lt;/p&gt;

&lt;p&gt;✔ Position - &lt;/p&gt;

&lt;p&gt;This works the same way it does on background-position, So, keywords like “top,” “right,” “left,” and “center” will work here.  You can even use a combination like, “top center.” &lt;/p&gt;

&lt;p&gt;We can also specify an exact position using a numeric value, including the percentage. Default is center center.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Radial gradient -
&lt;/h3&gt;

&lt;p&gt;To create the most basic gradient you just need to specify two-color. Two colors are the minimum required but you can have color as much as you want.&lt;/p&gt;

&lt;p&gt;All others are default values because we are just specifying colors.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  shaping of radial gradient -
&lt;/h3&gt;

&lt;p&gt;we already discussed shape and we have 2 values an ellipse or a circle.&lt;/p&gt;

&lt;p&gt;Let's see an example of both 👇&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Sizing of radial gradients -
&lt;/h3&gt;

&lt;p&gt;we already discussed all the sizing values, let's see one or two values in the example.&lt;/p&gt;

&lt;p&gt;for better understanding play with all values.&lt;/p&gt;

&lt;p&gt;example 👇&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Changing Position  -
&lt;/h3&gt;

&lt;p&gt;We already talked about the positioning of the gradient.&lt;/p&gt;

&lt;p&gt;A radial gradient doesn’t have to start at the default center. It can specify a certain point.&lt;/p&gt;

&lt;p&gt;example 👇&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Conic gradient -
&lt;/h2&gt;

&lt;p&gt;A conic gradient has a center point in your box and starts from the top and goes around in a 360-degree circle.&lt;/p&gt;

&lt;p&gt;The conic-gradient function accepts the position and angle arguments. By default, the angle is 0 degrees which starts at the top, in the center&lt;/p&gt;

&lt;p&gt;Above we already talked about position or angle, so let's see some examples. &lt;/p&gt;

&lt;p&gt;👇👇&lt;/p&gt;

&lt;h3&gt;
  
  
  basic conic gradient -
&lt;/h3&gt;

&lt;p&gt;As like linear and radial gradients, all we need to create a conic gradient are two colors.&lt;/p&gt;

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

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

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

&lt;h2&gt;
  
  
  Easy gradient generators 👇
&lt;/h2&gt;

&lt;p&gt;⚡ &lt;a href="https://gradientgenerator.com" rel="noopener noreferrer"&gt;https://gradientgenerator.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚡ &lt;a href="https://cssgradient.io" rel="noopener noreferrer"&gt;https://cssgradient.io&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚡ &lt;a href="https://colordesigner.io/gradient-generator" rel="noopener noreferrer"&gt;https://colordesigner.io/gradient-generator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is my first blog post and I would like to read your feedback as well as criticism.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>html</category>
    </item>
  </channel>
</rss>
