<?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: Arvind Ram Sankar</title>
    <description>The latest articles on DEV Community by Arvind Ram Sankar (@arvindrs).</description>
    <link>https://dev.to/arvindrs</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%2F536761%2F91db571b-9b1e-440c-89b9-1f282e1a21d7.jpeg</url>
      <title>DEV Community: Arvind Ram Sankar</title>
      <link>https://dev.to/arvindrs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arvindrs"/>
    <language>en</language>
    <item>
      <title>Four SEO Practices every Frontend Developer should Follow</title>
      <dc:creator>Arvind Ram Sankar</dc:creator>
      <pubDate>Sat, 26 Dec 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/arvindrs/four-seo-practices-every-frontend-developer-should-follow-1g5f</link>
      <guid>https://dev.to/arvindrs/four-seo-practices-every-frontend-developer-should-follow-1g5f</guid>
      <description>&lt;p&gt;SEO is critical to any website. You might be using HTML and vanilla javascript or fancy frameworks like react and vue, but in order to make sure that people see it, it needs to show up on google search.&lt;/p&gt;

&lt;p&gt;A recent study shows that more than 70% of the people prefer changing their search query rather than going to the second page of google. Therefore, we have to make sure that our website shows up on the first page of google.&lt;/p&gt;

&lt;p&gt;In this article, I’ll take you through four simple tips, which will greatly improve the SEO compatibility of your website.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Header Tag
&lt;/h2&gt;

&lt;p&gt;The header tag &lt;code&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/code&gt; contains all the information about the html page. Some of the important tags important for SEO are listed below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;head&amp;gt;
&amp;lt;meta charset="utf-8"&amp;gt;
&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&amp;gt;
&amp;lt;title&amp;gt;Home | Brand&amp;lt;/title&amp;gt;
&amp;lt;meta name="description" content="Description of your website"&amp;gt;
&amp;lt;link rel="canonical" href="https://www.example.com/"&amp;gt;
&amp;lt;/head&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Title
&lt;/h3&gt;

&lt;p&gt;The title tag &lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/code&gt; is nothing but the title of your website. It is displayed on the browser tab. The title should be relevant to your website and include all the necessary keywords.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CTWf5f8Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.arvindrs.com/assets/images/seo-tips/title.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CTWf5f8Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.arvindrs.com/assets/images/seo-tips/title.png" alt="An example of Title tag for SEO"&gt;&lt;/a&gt;Example of Title Tag&lt;/p&gt;

&lt;p&gt;For example, if your website is for a specific brand, make sure your title always has the brand name. The home page should be &lt;strong&gt;“Home | Brand”&lt;/strong&gt; , the about page should be &lt;strong&gt;“About Us | Brand”&lt;/strong&gt; and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Meta Description
&lt;/h3&gt;

&lt;p&gt;Meta description is another extremely important tag. Whenever you search for something in google, the small description that you see below each link is the Meta description of the website. This is what the users read before clicking on the link.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zEjvU5iD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.arvindrs.com/assets/images/seo-tips/meta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zEjvU5iD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.arvindrs.com/assets/images/seo-tips/meta.png" alt="An example of Title tag for SEO"&gt;&lt;/a&gt;Example of Meta Description&lt;/p&gt;

&lt;p&gt;Always keep the meta description between 90-160 characters long. Google only shows the first 160 characters of your description and cuts out the rest.&lt;/p&gt;

&lt;p&gt;A good meta description should have all the relevant keywords that will make the users click on the link as soon as they read it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Canonical URL
&lt;/h3&gt;

&lt;p&gt;Let’s take a simple example to understand this tag. Let’s say you write an amazing blog post. You post it on your website. Then you post on Medium, Blogger and some of the other blogging platforms. Now, there are multiple copies of the same content existing on different websites.&lt;/p&gt;

&lt;p&gt;You don’t want the google bot to think that one website has copied from the other or vice versa. And you also don’t want the same content to compete against each other for top ranking on search results page. Therefore, if you put the &lt;code&gt;&amp;lt;link rel="canonical" href="https://example.com"&amp;gt;&lt;/code&gt;, the google search engine will know that they are the same content existing in two different places. The &lt;code&gt;href&lt;/code&gt; provided in the tag is considered to be the master copy. And you need to put the canonical tag in all the other websites where you’ve duplicated the content.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Image Alt Attribute
&lt;/h2&gt;

&lt;p&gt;Always add alt tags to your images. Image alt tags are extremely important. It looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;img src="someimage.jpg" alt="Image of a flower"&amp;gt; &amp;lt;/img&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The google bots which crawl your websites cannot see what the image is about. Instead, they use the alt tag to understand what the image is about. Therefore, it is important that you put these alt tags to all the images on your website.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;code&gt;rel&lt;/code&gt; Attribute for Links
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;SEO is all about links.&lt;/em&gt; In order to have a higher SEO ranking, you need to gain links from various websites. Adding links to your website provides helps improve SEO of the linked website.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;a href="https://google.com" rel="nofollow noopener"&amp;gt; Link &amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;rel="nofollow"&lt;/code&gt; is essentially like a SEO blocker. If you see a website that has links to your website but has the &lt;code&gt;rel="nofollow"&lt;/code&gt; attribute, that means it doesn’t contribute to your SEO. Similarly putting it on your website won’t pass on SEO juice to the linked website.&lt;/p&gt;

&lt;p&gt;Make sure to use this cleverly and always keep this in mind when you are looking for backlinks to your website.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Sitemaps and Robots.txt
&lt;/h2&gt;

&lt;p&gt;Sitemaps, just like its name suggests is a map to your site. It is usually located at &lt;code&gt;/sitemap.xml&lt;/code&gt;. For example, the sitemap for my website is located at &lt;a href="https://www.arvindrs.com/sitemap.xml"&gt;arvindrs.com/sitemap.xml&lt;/a&gt;. It contains a list of all the URLs located in my website. Since my website is built using Jekyll, I use the &lt;a href="https://github.com/jekyll/jekyll-sitemap"&gt;jekyll-sitemap&lt;/a&gt; plugin to automatically generate these sitemaps.&lt;/p&gt;

&lt;p&gt;Google and other search engines use web crawlers to index and rank your website. &lt;strong&gt;Robots.txt&lt;/strong&gt; is a file which contains guidelines on how these crawlers should index your website. You can mention which URLs to crawl and which shouldn’t be crawled. You can checkout my Robots.txt file at &lt;a href="https://arvindrs.com/robots.txt"&gt;arvindrs.com/robots.txt&lt;/a&gt;. It doesn’t really have anything because I don’t have any restrictions for crawling.&lt;/p&gt;

&lt;p&gt;Now, although both of these files don’t affect SEO directly, these are really helpful for web crawlers when they index your website. It is always a good practice to add both the files to your website.&lt;/p&gt;

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

&lt;p&gt;In this article, we saw four basic ways to perform search engine optimization as a front-end engineer. We should always follow these good practices to make sure that our content has a good ranking.&lt;/p&gt;

&lt;p&gt;But remember, &lt;strong&gt;these four points are barely the tip of the iceberg&lt;/strong&gt;. There are so many things that you need to take care of when performing search engine optimization. There are social media tags, open graph tags, h1 tags and so much more. So, keep exploring!&lt;/p&gt;

</description>
      <category>seo</category>
      <category>tutorial</category>
      <category>frontend</category>
      <category>html</category>
    </item>
    <item>
      <title>How to Make your own CSS Framework - Part 3</title>
      <dc:creator>Arvind Ram Sankar</dc:creator>
      <pubDate>Wed, 23 Dec 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/arvindrs/how-to-make-your-own-css-framework-part-3-f9e</link>
      <guid>https://dev.to/arvindrs/how-to-make-your-own-css-framework-part-3-f9e</guid>
      <description>&lt;p&gt;This article is the third part of a comprehensive guide on how to build your own CSS framework, starting from planning, designing all the way to coding. These are the things that I learnt while I built my own CSS Framework &lt;a href="https://sleek.arvindrs.com/" rel="noopener noreferrer"&gt;Sleek&lt;/a&gt;, which is completely useless.&lt;/p&gt;

&lt;p&gt;If you haven’t seen the two previous articles, go check it out here:&lt;br&gt;&lt;br&gt;
&lt;a href="https://dev.to/arvindrs/how-to-make-your-own-css-framework-part-1-1fj1"&gt;How to Make your Own CSS Framework - Part 1&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://dev.to/arvindrs/how-to-make-your-own-css-framework-part-2-16mp"&gt;How to Make your Own CSS Framework - Part 2&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Designing and other stuff
&lt;/h2&gt;

&lt;p&gt;This is the final step before we start the coding. In this section we will mainly talk about the following things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;CSS Reset&lt;/li&gt;
&lt;li&gt;Media Queries for Responsive Design&lt;/li&gt;
&lt;li&gt;
Coming Up with Design System

&lt;ol&gt;
&lt;li&gt;Tools for Designing&lt;/li&gt;
&lt;li&gt;Typography&lt;/li&gt;
&lt;li&gt;Color Scheme&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you are already familiar with these things, feel free to skip ahead.&lt;/p&gt;
&lt;h3&gt;
  
  
  CSS Reset
&lt;/h3&gt;

&lt;p&gt;Different people use different browsers, it maybe Firefox, Chrome, Safari or even Internet Explorer. We need to make sure that our style looks the same everywhere. This is where the CSS Reset comes in.&lt;/p&gt;

&lt;p&gt;CSS Reset does exactly what it sounds like, it resets the style so that we have &lt;strong&gt;a uniform and a consistent style&lt;/strong&gt; across all types of browsers and devices.&lt;/p&gt;

&lt;p&gt;The code below shows what a CSS reset might look like. This is just a small subset. There are a lot of other components that require reset, for example tables, captions, textinput etc.&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="c"&gt;/* CSS reset */&lt;/span&gt;
&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;dl&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;dt&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;dd&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;ol&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h4&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h5&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h6&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;pre&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;form&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;fieldset&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;textarea&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;blockquote&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;th&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;td&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&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="nt"&gt;html&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&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="nt"&gt;ol&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;list-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h4&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h5&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h6&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nb"&gt;normal&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 will be using &lt;a href="https://necolas.github.io/normalize.css/" rel="noopener noreferrer"&gt;&lt;strong&gt;Normalize CSS&lt;/strong&gt;&lt;/a&gt;, which is a really small and an amazing reset. You can checkout the code for Normalize &lt;a href="https://github.com/necolas/normalize.css/blob/master/normalize.css" rel="noopener noreferrer"&gt;here&lt;/a&gt;. It is well documented and you’ll be able to clearly see what components are being reset to what values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Media Queries
&lt;/h3&gt;

&lt;p&gt;A responsive design is one which works well on any device irrespective of the screen size. Obviously, in order to make that happen, you need to write CSS which is responsive. This is what media query helps us with.&lt;/p&gt;

&lt;p&gt;Media query allows you to write different CSS for different screen sizes.&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="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;only&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;600px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;only&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;600px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code sets the body background color as blue when the screen size is below 600px and sets it to green when the screen size is above 600px. Using media query, we can write CSS that looks perfect on all devices starting from desktops to smartphones. We will be setting &lt;strong&gt;breakpoints&lt;/strong&gt; to distinguish different screen sizes and use different CSS for different breakpoints.&lt;/p&gt;

&lt;p&gt;Bootstrap uses the following breakpoints:&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="c"&gt;/*Extra small devices (portrait phones, less than 576px)*/&lt;/span&gt;
&lt;span class="c"&gt;/*No media query for 'xs' since this is the default in Bootstrap*/&lt;/span&gt;

&lt;span class="c"&gt;/*Small devices (landscape phones, 576px and up)*/&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;576px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*Medium devices (tablets, 768px and up)*/&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*Large devices (desktops, 992px and up)*/&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;992px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*Extra large devices (large desktops, 1200px and up)*/&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1200px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&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 will be defining similar breakpoints for different devices and try to make the design more responsive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design System
&lt;/h2&gt;

&lt;p&gt;Before you can start making your framework, you need to have a design in mind. For example, if you want to build a button, you need to determine it’s size, the margin, the padding, size of the text inside the button, border radius and so much more.&lt;/p&gt;

&lt;p&gt;There are a lot of good design systems like &lt;a href="https://material.io/design" rel="noopener noreferrer"&gt;Material Design&lt;/a&gt; or &lt;a href="https://ant.design/" rel="noopener noreferrer"&gt;Ant Design&lt;/a&gt; which you can use for inspiration. Their websites have extensive guidelines about the design system.&lt;/p&gt;

&lt;p&gt;I am not really an expert in web design or UI/UX. But it is really easy to find a lot of good design guides and references on the internet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tools for designing
&lt;/h3&gt;

&lt;p&gt;My go to tool for designing is &lt;a href="https://www.figma.com/" rel="noopener noreferrer"&gt;Figma&lt;/a&gt;. The main reason is that it’s an online tool and it offers upto 3 projects in free version, which is more than enough for me.&lt;/p&gt;

&lt;p&gt;There are lots of other good tools in the market like AdobeXD, Sketch. &lt;a href="https://www.citrusbits.com/app-designing-tools-comparison-with-pros-and-cons/" rel="noopener noreferrer"&gt;This article&lt;/a&gt; gives a really good comparison of some design tools.&lt;/p&gt;

&lt;p&gt;But always keep in mind that in the end, it’s just a design tool. What matters is what you build with it. A lot of people tend to waste time jumping from one tool to another. Just pick one which feels comfortable to use. You can always switch tools in the future if it doesn’t feel right. Most of the skills you pick up are transferable. Once you master one software, it won’t take much time to master a new one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Typography
&lt;/h3&gt;

&lt;p&gt;This is another essential element to a CSS Framework. Your font defines your CSS framework.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.arvindrs.com%2Fassets%2Fimages%2Fmakecss%2Ffonts.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%2Fwww.arvindrs.com%2Fassets%2Fimages%2Fmakecss%2Ffonts.png" alt="Typefaces"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are a plethora of font faces available for you to choose from. Picking the right font is just as important as anything else. Your font should be cohesive with the rest of your design.&lt;/p&gt;

&lt;p&gt;While browsing the web, I found this is really good &lt;a href="https://www.jotform.com/blog/a-crash-course-in-typography-the-basics-of-type/" rel="noopener noreferrer"&gt;Crash Course on Fonts&lt;/a&gt;. This will give you a good idea about types of font available for you to use.&lt;/p&gt;

&lt;p&gt;Personally, I tend to find Sans-serif Geometric Typefaces to be really attractive because they are simple and elegant. But the typeface also depends on your framework. If you are building some wacky CSS Framework like &lt;a href="https://nostalgic-css.github.io/NES.css/" rel="noopener noreferrer"&gt;NES&lt;/a&gt;, you can even use Comic Sans. That’s totally upto you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.arvindrs.com%2Fassets%2Fimages%2Fmakecss%2Fnes.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%2Fwww.arvindrs.com%2Fassets%2Fimages%2Fmakecss%2Fnes.png" alt="NES CSS Framework"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But make sure it is in harmony with the rest of your framework. It shouldn’t stand out from the rest of the design.&lt;/p&gt;

&lt;h3&gt;
  
  
  Color Scheme
&lt;/h3&gt;

&lt;p&gt;There are a total of 256 x 256 x 256 combinations of color possible. It is generally preferred to pick a bunch of colors from this huge set and use it on your website.&lt;/p&gt;

&lt;p&gt;Again this is not something that I am expert at, but there is a whole subject about colors, how to choose appealing colors and what colors look good when you combine them. There are different color schemes like monochromatic, complimentary, triads etc.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://color.adobe.com/create/color-wheel" rel="noopener noreferrer"&gt;Adobe Color&lt;/a&gt; is a really good online tool which gives you colors based on different schemes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.arvindrs.com%2Fassets%2Fimages%2Fmakecss%2Fadobecolor.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%2Fwww.arvindrs.com%2Fassets%2Fimages%2Fmakecss%2Fadobecolor.png" alt="Adobe Color Tool"&gt;&lt;/a&gt;Adobe Color Tool&lt;/p&gt;

&lt;p&gt;The image below shows the colors used in &lt;a href="https://bulma.io/documentation/overview/colors/" rel="noopener noreferrer"&gt;Bulma&lt;/a&gt; CSS Framework. If you have worked with different frameworks, you should know that a framework traditionally has colors like primary, success, danger etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.arvindrs.com%2Fassets%2Fimages%2Fmakecss%2Fbulmacolor.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%2Fwww.arvindrs.com%2Fassets%2Fimages%2Fmakecss%2Fbulmacolor.png" alt="Adobe Color Tool"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’ve linked to various frameworks’ colors. Check them out and observe what colors they are using. Maybe you’ll find some inspiration for your own framework.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://getbootstrap.com/docs/5.0/customize/color/" rel="noopener noreferrer"&gt;Bootstrap Colors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://material.io/design/color/the-color-system.html" rel="noopener noreferrer"&gt;Material Design Colors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://semantic-ui.com/usage/theming.html#sitewide-defaults" rel="noopener noreferrer"&gt;Semantic UI Colors&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;In this article, we briefly went through some of the basic things involved in designing a CSS Framework. Since I am not good at designing, I decided to not write much about it. You can easily find more guides online about various things like color theory, typography etc.&lt;/p&gt;

&lt;p&gt;In the next article, we will finally start coding the CSS Framework. When building the framework, I will be mostly borrowing designs from Bootstrap and Bulma, since they are really popular and lloks good.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further Links
&lt;/h2&gt;

&lt;p&gt;This is the third article out of a series of article I am going to write. I hope this gave you more insight into how to plan out your framework.&lt;/p&gt;

&lt;p&gt;This is still a work in progress. I will be finishing up these articles soon so that you can get started building your own framework.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.arvindrs.com/how-to-make-your-own-css-framework-part-1" rel="noopener noreferrer"&gt;How to Make your Own CSS Framework - Part 1&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.arvindrs.com/how-to-make-your-own-css-framework-part-2" rel="noopener noreferrer"&gt;How to Make your Own CSS Framework - Part 2&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://dev.tojavascript:void(0)"&gt;How to make your own CSS Framework - Coding/Documenting&lt;/a&gt; (Coming on 31st December)&lt;/p&gt;

</description>
      <category>css</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to make your own CSS Framework - Part 1</title>
      <dc:creator>Arvind Ram Sankar</dc:creator>
      <pubDate>Wed, 09 Dec 2020 13:40:34 +0000</pubDate>
      <link>https://dev.to/arvindrs/how-to-make-your-own-css-framework-part-1-1fj1</link>
      <guid>https://dev.to/arvindrs/how-to-make-your-own-css-framework-part-1-1fj1</guid>
      <description>&lt;p&gt;A couple of years ago, I made my very own CSS framework from scratch called &lt;a href="https://sleek.arvindrs.com"&gt;Sleek&lt;/a&gt;. Of course, no one used it, including me.&lt;/p&gt;

&lt;p&gt;So I decided to write a series of article on how I went about making one starting from the planning, designing stage all the way to coding and documenting.&lt;/p&gt;

&lt;p&gt;Here's a link to this series:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.arvindrs.com/how-to-make-your-own-css-framework-part-1/"&gt;How to make your own CSS Framework Part -1 : Introduction&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.arvindrs.com/how-to-make-your-own-css-framework-part-2/"&gt;How to make your own CSS Framework Part -2 : Planning&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.arvindrs.com/how-to-make-your-own-css-framework-part-3/"&gt;How to make your own CSS Framework Part -3 : Design&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The rest of the articles are coming up soon. &lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Make your own CSS Framework - Part 2</title>
      <dc:creator>Arvind Ram Sankar</dc:creator>
      <pubDate>Wed, 09 Dec 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/arvindrs/how-to-make-your-own-css-framework-part-2-16mp</link>
      <guid>https://dev.to/arvindrs/how-to-make-your-own-css-framework-part-2-16mp</guid>
      <description>&lt;p&gt;This article is the second part of a comprehensive guide on how to build your own CSS framework, starting from planning, designing all the way to coding. These are the things that I learnt while I built my own CSS Framework &lt;a href="https://sleek.arvindrs.com/"&gt;Sleek&lt;/a&gt;, which is completely useless.&lt;/p&gt;

&lt;p&gt;If you haven’t seen the previous article, go check it out here: &lt;a href="https://www.arvindrs.com/how-to-make-your-own-css-framework-part-1"&gt;How to Make your Own CSS Framework - Part 1&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s start Planning
&lt;/h2&gt;

&lt;p&gt;Now that you have decided to start making a CSS Framework, it’s time to start planning and chalk things out. There are two main things that you need to address at this stage:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Various CSS Architectures for Frameworks&lt;/li&gt;
&lt;li&gt;Complexity of your Framework&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both of these are something that you need to determine before you go any further. Let’s have a look at each one of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS Architectures
&lt;/h3&gt;

&lt;p&gt;Now, the unique thing about CSS is,it has no rules. What I mean is that &lt;strong&gt;there are several ways to achieve the same thing&lt;/strong&gt;. For example, if you want to center a text, you can use text-align, or you can use margin and padding to align it, or you can use flexbox to justify it, or &lt;strong&gt;use a code that you copied from stackoverflow&lt;/strong&gt;. It’s like a lawless jungle. Since CSS doesn’t have any such rules, people might end up writing haphazard code with weird classnames and styles.&lt;/p&gt;

&lt;h5&gt;
  
  
  What are CSS Architectures?
&lt;/h5&gt;

&lt;p&gt;CSS architectures are guidelines on how to name, organize and write your CSS classes and styles with a focus on &lt;strong&gt;maintainability, scalability and reusability&lt;/strong&gt; , which is really important when building a framework. You can use these architectures even when writing the CSS for a website. They help you write better CSS with a lot of flexibility.&lt;/p&gt;

&lt;p&gt;If you haven’t heard of CSS Architectures before, then this is a really good place to start. In this article, I’ll be looking at mainly four popular architectures:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;OOCSS - Object Oriented CSS&lt;/li&gt;
&lt;li&gt;BEM - Block Element Modifier&lt;/li&gt;
&lt;li&gt;SMACSS - Scalable Modular Architecture for CSS&lt;/li&gt;
&lt;li&gt;ACSS - Atomic CSS&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Again, these are &lt;strong&gt;not strict rules&lt;/strong&gt; but rather guidelines to better organize your code. You need not stick completely to these guidelines. You can always go wild and modify it according to your needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="http://oocss.org/"&gt;Object Oriented CSS (OOCSS)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Object Oriented CSS is loosely based on object oriented programming. Object Oriented Programming promotes the use of classes, object with a focus on reusability and modularity. The aim of OOCSS is the same.&lt;/p&gt;

&lt;p&gt;But &lt;strong&gt;what does an object in OOCSS mean?&lt;/strong&gt; Here, an object refers to any repeating style that can be converted into reusable code. If something repeats again and again, make it into a reusable snippet, as simple as that.&lt;/p&gt;

&lt;p&gt;Here is a quick overview of the OOCSS guidelines.&lt;/p&gt;

&lt;h4&gt;
  
  
  Reusability
&lt;/h4&gt;

&lt;p&gt;If you have something 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="nc"&gt;.box1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="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;.box2&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="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 convert this into following:&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;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.redbox&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;.greenbox&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;And then you can use it HTML like &lt;code&gt;&amp;lt;div class="box redbox"&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;div class="box greenbox"&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Separation of Skin and Structure
&lt;/h4&gt;

&lt;p&gt;We should also separate the skin and structure of components.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure&lt;/strong&gt; involves physical attributes like height, width, margin, overflow, padding etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Skin&lt;/strong&gt; refers to visual details like color, font, border etc.&lt;/p&gt;

&lt;p&gt;Here is a simple example of separation of skin and structure:&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;.box-structure&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;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.box-skin1&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="no"&gt;black&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-skin2&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="no"&gt;green&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;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;Separating skin also improves modularity and reusability. A same structure can be used multiple times with different skins.&lt;/p&gt;

&lt;h4&gt;
  
  
  Separation of Container and Content
&lt;/h4&gt;

&lt;p&gt;Let’s say you have a &lt;code&gt;&amp;lt;div class="shape"&amp;gt;&lt;/code&gt; and an &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; inside the div.&lt;/p&gt;

&lt;p&gt;Try to avoid combining the styles of parent and child. For example :&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;.shape&lt;/span&gt; &lt;span class="nt"&gt;img&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&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="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="no"&gt;black&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;Doing this prevents reusability of code. Always separate the container and the content.&lt;/p&gt;

&lt;p&gt;Many of the popular frameworks such as Bootstrap and bulma use the OOCSS guidelines. This was just a brief overview of some of the OOCSS guidelines. You can read about it in this amazing article by &lt;a href="https://www.smashingmagazine.com/2011/12/an-introduction-to-object-oriented-css-oocss/"&gt;Smashing Magazine&lt;/a&gt; or at it’s &lt;a href="https://github.com/stubbornella/oocss"&gt;Github page&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="http://getbem.com/"&gt;Block Element Modifier (BEM)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The BEM contains guidelines on how one can go about &lt;strong&gt;naming their CSS classes&lt;/strong&gt;. BEM is actually a subset of the bigger OOCSS architecure. As it’s name suggests, in BEM you essentially split you CSS into blocks, elements and modifiers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blocks :&lt;/strong&gt; A block is a standalone entity that is meaningful on its own. Headers, footers, Forms etc fall can be considered as blocks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Elements :&lt;/strong&gt; Elements are a part of a block that has no standalone meaning and is semantically tied to its block. Buttons in Navbar, Text Inputs in a form etc are elements associated with blocks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modifiers :&lt;/strong&gt; Modifiers are variants/extension of the Blocks and Elements. They might be offer different size, different color etc.&lt;/p&gt;

&lt;p&gt;Elements of a block class &lt;code&gt;.block{}&lt;/code&gt; are denoted as &lt;code&gt;.block__element{}&lt;/code&gt; and a modifier is denoted as &lt;code&gt;.block--modifier{}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The codepen below illustrates an example of BEM based CSS&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/r-arvind/embed/QWKGOOq?height=600&amp;amp;default-tab=css,result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;This was just a simple overview of the BEM style guide. You can find out more about it on it’s website &lt;a href="http://getbem.com/"&gt;BEM&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="http://smacss.com/"&gt;Scalable Modular Architecture for CSS (SMACSS)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;SMACSS provides a way to &lt;strong&gt;maintain and organize your code&lt;/strong&gt; such that it is scalable and modular. It divides the complete CSS codebase into five different categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Base :&lt;/strong&gt; Base contains the code for all the default values. For example, you might want to remove all margins from &lt;code&gt;html&lt;/code&gt;, or set a default size for &lt;code&gt;h1&lt;/code&gt;, &lt;code&gt;h2&lt;/code&gt; etc. All of these fall under this category.
&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="nt"&gt;html&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;a&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;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&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;strong&gt;Layout :&lt;/strong&gt; These components help divide the page into major sections. This includes components like header, footer, body etc.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Modules :&lt;/strong&gt; These are the reusable modular components of a design. That includes components like buttons, cards, alerts, lists etc&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State :&lt;/strong&gt; State describe how things look when in a particular state (hidden/expanded or active/inactive). These are generally prefixed with &lt;code&gt;is-&lt;/code&gt;. For example, &lt;code&gt;is-active&lt;/code&gt;, &lt;code&gt;is-inactive&lt;/code&gt;, &lt;code&gt;is-expanded&lt;/code&gt;, &lt;code&gt;is-hidden&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Theme :&lt;/strong&gt; Theme define things that have to do with the appearance like a color scheme or typography etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Frameworks like Bulma and PureCSS follow the SMACSS guidelines. The &lt;a href="http://smacss.com/book/categorizing"&gt;SMACSS website&lt;/a&gt; has more in-depth information about each one of those categories. But this much should be enough to proceed further.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://acss.io/"&gt;Atomic CSS (ACSS)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Atomic CSS is completely different from conventional CSS Architecture. Tailwind CSS uses Atomic design and if you have used it before you must know that it is quite a unique way of working with CSS.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Atomic CSS is the approach to CSS architecture that favors small, single-purpose classes with names based on visual function.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Atomic CSS, also known as Functional CSS is nothing but a collection of single purpose styling units. Atomic CSS is like a common “vocabulary” meant to style documents regardless of context or content.&lt;/p&gt;

&lt;p&gt;The code below shows a simple example:&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="c"&gt;/*red background*/&lt;/span&gt;
&lt;span class="nc"&gt;.bg-r&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="m"&gt;#eb4034&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*green background*/&lt;/span&gt;
&lt;span class="nc"&gt;.bg-g&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="m"&gt;#34eb59&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*small margin*/&lt;/span&gt;
&lt;span class="nc"&gt;.mr-s&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*medium margin*/&lt;/span&gt;
&lt;span class="nc"&gt;.mr-m&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can keep building CSS vocabulary like this and use it in your HTML. The codepen below illustrates the same.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/r-arvind/embed/rNMWdER?height=600&amp;amp;default-tab=html,result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The CSS classes themselves are small and immutable, you cannot modify them. And the most important thing is that &lt;strong&gt;Atomic CSS is unopinionated&lt;/strong&gt;. It’s not a framework with fancy components having fancy design. Rather, it’s just a bunch of utility classes that you can put to use. You can construct your own design out of these utility classes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which architecture is the best?
&lt;/h2&gt;

&lt;p&gt;When we build our own CSS Framework in Part 4 of this series, we won’t be sticking to any one architecture. These are just guidelines to facilitate the process of making the framework. We will be borrowing a lot of concepts from these architectures and build one of our own. For example, we will use SMACSS guidelines to organize our folder, we will use OOCSS and BEM to name our classes and structure the styles and we will build some utility classes just like in Atomic CSS.&lt;/p&gt;

&lt;p&gt;There is no such thing as the “best” architecture. Each has it’s own set of advantages, disadvantages and use cases. You are free to choose whichever framework depending on what your vision for the framework is.&lt;/p&gt;

&lt;h3&gt;
  
  
  Complexity of your Framework
&lt;/h3&gt;

&lt;p&gt;The complexity of your framework can lie anywhere between 0 to 10, with frameworks like &lt;a href="https://purecss.io/"&gt;PureCSS&lt;/a&gt; and &lt;a href="https://milligram.io/"&gt;Milligram&lt;/a&gt; at level 1 and frameworks like &lt;a href="https://getbootstrap.com/"&gt;Bootstrap&lt;/a&gt;, &lt;a href="https://semantic-ui.com/"&gt;Semantic&lt;/a&gt; and &lt;a href="https://get.foundation/"&gt;Foundation&lt;/a&gt; at a level of 10.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remember, there is nothing right or wrong here&lt;/strong&gt;. Bootstrap is complex because &lt;strong&gt;Bootstrap is meant for rapid prototyping&lt;/strong&gt;. You can put together a big website using bootstrap in a matter of minutes; just put a navbar at the top, a jumbotron, a couple of cards, some grid layout and you are set. &lt;strong&gt;PureCSS on the other hand is meant to be simple and extensible&lt;/strong&gt;. It’s less than 10kB and it only comes with a few basic components, typographies and layouts. You can easily extend it with your own CSS or combine it with any other frameworks too.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;complexity of your framework depends on what your vision for the framework is&lt;/strong&gt;. You don’t need to stuff it with all sorts of different components, unless that’s what your aim is.&lt;/p&gt;

&lt;p&gt;If you are building one for learning purposes, it doesn’t exactly matter what you are doing. You are free to make it however you want because no one is probably gonna use it.&lt;/p&gt;

&lt;p&gt;If you want to make a design system as a part of an organization or for yourself, start small. First implement the bare minimums like buttons and layouts that are used frequently. Incrementally add more and more components until you have a collection of components.&lt;/p&gt;

&lt;p&gt;And finally, if you are building it for other people to use, you might wanna think about how it is different from the existing ones out there. Does your framework offer a superior design? Or maybe some components that people use frequently but isn’t provided by any existing frameworks. What is it’s selling point? It should be really good in order to make people leave their existing framework and use a new one. Most of the developers take a liking to framework and never come out of the comfort zone.&lt;/p&gt;

&lt;p&gt;If it’s just another framework with a couple of layouts, buttons and cards, no one will probably use it, just like my framework &lt;a href="https://sleek.arvindrs.com/"&gt;Sleek&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Here’s an Assignment for you
&lt;/h4&gt;

&lt;p&gt;Go through the components list of each and every framework out there, have a look at the various components they offer and how they look, feel and work. &lt;strong&gt;Make a list of components that you would like to have in the V0.0.1 of your framework&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here’s a link to some of the framework’s documentation. My favourite component to start off with is the button. So, I have linked to buttons of all these frameworks. Use this as a starting point and check out all the other components.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://bulma.io/documentation/elements/button/"&gt;Bulma&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://getbootstrap.com/docs/5.0/components/buttons/"&gt;Bootstrap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://semantic-ui.com/elements/button.html"&gt;Semantic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://purecss.io/buttons/"&gt;Pure CSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://milligram.io/#button"&gt;Milligram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://get.foundation/sites/docs/button.html"&gt;Foundation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://getuikit.com/docs/button"&gt;UIKit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember, only choose components that are essential. You can always add more components in the future.&lt;/p&gt;

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

&lt;p&gt;If you managed to read till this point, I hope this article gives some insight into what goes into planning a CSS framework. When you finish your planning, you should have an idea about the components that you will be including in your framework and have some clarity on different CSS architectures.&lt;/p&gt;

&lt;p&gt;In the next article, we will talk about some basic design guidlines after which we will start coding the framework in SASS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further Links
&lt;/h2&gt;

&lt;p&gt;This is the second article out of a series of article I am going to write. I hope this gave you more insight into how to plan out your framework.&lt;/p&gt;

&lt;p&gt;This is still a work in progress. I will be finishing up these articles soon so that you can get started building your own framework.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.tojavascript:void(0)"&gt;How to make your own CSS Framework - Designing&lt;/a&gt; (Coming on 14th December)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.tojavascript:void(0)"&gt;How to make your own CSS Framework - Coding/Documenting&lt;/a&gt; (Coming on 16th December)&lt;/p&gt;

&lt;p&gt;There are various other architectures likes &lt;a href="https://suitcss.github.io/"&gt;SuitCSS&lt;/a&gt; which I haven’t mentioned here for the purpose of keeping this aricle short and concise. You can find more about it by just seraching them on the internet.&lt;/p&gt;

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