<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sandrin Joy</title>
    <description>The latest articles on Forem by Sandrin Joy (@sandrinjoy).</description>
    <link>https://forem.com/sandrinjoy</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%2F709152%2Ff94169ee-d708-45e2-8f65-a3341dd896bd.png</url>
      <title>Forem: Sandrin Joy</title>
      <link>https://forem.com/sandrinjoy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sandrinjoy"/>
    <language>en</language>
    <item>
      <title>Here is why I switched from bootstrap to tailwind.</title>
      <dc:creator>Sandrin Joy</dc:creator>
      <pubDate>Fri, 25 Mar 2022 13:31:01 +0000</pubDate>
      <link>https://forem.com/sandrinjoy/here-is-why-i-switched-from-bootstrap-to-tailwind-1a86</link>
      <guid>https://forem.com/sandrinjoy/here-is-why-i-switched-from-bootstrap-to-tailwind-1a86</guid>
      <description>&lt;p&gt;Hello fellow developers, this is my first blog post, and please comment if you enjoy reading experiential blogs like this one. :)&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Let's Begin!&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Jump to &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;So, what is bootstrap and tailwind?&lt;/li&gt;
&lt;li&gt;My Experience of using Bootstrap&lt;/li&gt;
&lt;li&gt;My Experience of using Tailwind&lt;/li&gt;
&lt;li&gt;Which one is better?&lt;/li&gt;
&lt;li&gt;What's Next?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;So, what is bootstrap and tailwind?
&lt;/h3&gt;

&lt;p&gt;Tailwind and bootstrap are CSS frameworks.&lt;/p&gt;

&lt;p&gt;A CSS framework is a set of CSS template classes mixed with several JavaScript features that can be used to style html elements.&lt;/p&gt;

&lt;h4&gt;
  
  
  why CSS Framework?
&lt;/h4&gt;

&lt;p&gt;Well, again, it's a person's choice. CSS frameworks speed up styling because they are easier to implement and require less code.&lt;br&gt;
When I created my first web project I didn't know about it and I spend most of my time in this project writing CSS.&lt;br&gt;
After realizing this, I quickly googled and found out about bootstrap. I immediately looked up some YouTube tutorials and used them on my next web project and what was the result? I was able to devote more time to the core features and also keep the site's style neat and beautiful.&lt;/p&gt;

&lt;p&gt;to be honest, the style was much better than my first web project :)&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;My Experience of using Bootstrap
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Well, let's first know about bootstrap as a CSS framework.
&lt;/h4&gt;

&lt;p&gt;Bootstrap has template classes for components (like buttons, lists, modals, navigation bars, etc.) as well as utility classes (like padding, display, margins, etc.). sounds good, right? Yes it is.&lt;/p&gt;
&lt;h4&gt;
  
  
  My experience
&lt;/h4&gt;

&lt;p&gt;As I said, my first CSS framework is bootstrap. And it helped me a lot in creating projects faster and more stylishly.&lt;/p&gt;

&lt;p&gt;But after creating several projects, I realized that most project components have a similar style. Also, when I need a button with a different style, I either have to write all the CSS for it separately, or mix in some bootstrap classes and my custom classes. Well, I did was second.&lt;/p&gt;

&lt;p&gt;After a while, I realized that I was back to writing 1000 lines of CSS.&lt;/p&gt;
&lt;h5&gt;
  
  
  So what bothered me about bootstrap
&lt;/h5&gt;

&lt;p&gt;well, specifically, it was component classes. Sometimes I hate the default padding, border properties for certain components.&lt;br&gt;
Some of them are: buttons, input forms, modals, etc.&lt;/p&gt;

&lt;p&gt;Also, if you look at the utility classes, there are only a limited number of options available for each utility.&lt;/p&gt;

&lt;p&gt;ex: padding (p-1,p-2,p-3,p-4 and p-5)&lt;/p&gt;

&lt;p&gt;So, for example, if I need a specific value on a utility for an element, I write a separate CSS class for it, or use an inline CSS style (❌ not recommended, well, if you're wondering why, either you can google it or I'll write a little blog for it:)).&lt;/p&gt;

&lt;p&gt;However, I would recommend bootstrap to all beginner frontend developers and people who are a bit weak in design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trust me, if you think your design skills are weak, create a few projects with bootstrap, and slowly but steadily you will learn so many design basics to style each component&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;My Experience of using Tailwind CSS
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Well, let's first know about Tailwind as a CSS Framework.
&lt;/h4&gt;

&lt;p&gt;Tailwind is a CSS utility Framework, which means that, unlike bootstrap, Tailwind does not come with pre-built component classes.&lt;/p&gt;

&lt;p&gt;Well, that means basically you'll be styling each html element on its own with the utility classes it provides.&lt;/p&gt;
&lt;h5&gt;
  
  
  So how exactly does Tailwind help you as a CSS framework?
&lt;/h5&gt;

&lt;p&gt;-Tailwind has utility classes for almost all CSS classes, including pseudo-elements.&lt;/p&gt;

&lt;p&gt;-Tailwind also supports providing explicit values ​​to any utility classes that support it. (eg: p-[10px], width-[80vw] etc.)&lt;/p&gt;

&lt;p&gt;-Tailwind also supports writing classes specifically for dark mode. &lt;/p&gt;
&lt;h4&gt;
  
  
  My experience
&lt;/h4&gt;

&lt;p&gt;I have been using Tailwind for 4 months now and I really like it.&lt;/p&gt;

&lt;p&gt;For me, learning Tailwind wasn't that hard because I've used utility classes with bootstrap before.&lt;/p&gt;

&lt;p&gt;One thing I quickly noticed is that some utility classes have shorter names compared to bootstrap.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS -&amp;gt; 'display: flex' 

Bootstrap -&amp;gt; 'd-flex'

Tailwind -&amp;gt; 'flex'

&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;
//CSS-&amp;gt; justify-content: center

Bootstrap -&amp;gt; 'justify-content-center'

Tailwind -&amp;gt; 'justify-center' 

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

&lt;/div&gt;



&lt;p&gt;I used this example because flex is something I use a lot on my websites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But one thing should be noted. if you want your project to be completed quickly (like a college project, which has to be submitted in a deadline), tailwind may not be the best choice.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now my projects have their own unique style and that's what I really like.&lt;/p&gt;

&lt;p&gt;If you have time, you can check out my personal website which is styled using Tailwind CSS.&lt;/p&gt;

&lt;p&gt;One more note: since Tailwind doesn't come with pre-built components, does that mean you have to code everything yourself? Probably no. There are many component-based libraries like Headless UI, Radix UI (primitives), etc. that coded the component's skeleton and logic, you just need to style it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;Which one is better?
&lt;/h3&gt;

&lt;p&gt;To me, this is clearly Tailwind CSS. But, as I pointed out its positive and negative sides, the choice of a favorite is up to you.&lt;/p&gt;

&lt;p&gt;Well, this is where my personal opinion about bootstrap and tailwind ends.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;So what's next?
&lt;/h3&gt;

&lt;p&gt;Well, there are many more CSS frameworks like Material UI (MUI), Bulma, Foundation, etc.&lt;/p&gt;

&lt;p&gt;But there is one more thing called "CSS-in-JS", which is not a CSS framework, instead it is considered to be a better way to write CSS for the modern web applications. There are many libraries that use this, such as Styled Components, Emotion, Stitches, and so on. This is what I will try next.&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>css</category>
      <category>styling</category>
      <category>firstpost</category>
    </item>
  </channel>
</rss>
