<?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:  Ayesh Perera</title>
    <description>The latest articles on DEV Community by  Ayesh Perera (@pererayesh17).</description>
    <link>https://dev.to/pererayesh17</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%2F1501995%2Fa2604ec2-d856-43dc-9d6f-8bbee4e7f599.png</url>
      <title>DEV Community:  Ayesh Perera</title>
      <link>https://dev.to/pererayesh17</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pererayesh17"/>
    <language>en</language>
    <item>
      <title>What is Tailwind CSS? Modern Web Designing</title>
      <dc:creator> Ayesh Perera</dc:creator>
      <pubDate>Sat, 22 Jun 2024 07:52:13 +0000</pubDate>
      <link>https://dev.to/pererayesh17/what-is-tailwind-css-modern-web-designing-2kge</link>
      <guid>https://dev.to/pererayesh17/what-is-tailwind-css-modern-web-designing-2kge</guid>
      <description>&lt;h2&gt;
  
  
  What is Tailwind CSS?
&lt;/h2&gt;

&lt;p&gt;Tailwind CSS is a utility-first framework with pre-designed components that you can use to design your own website with more customized features. It lets you write pre-designed components in your HTML form.&lt;/p&gt;

&lt;p&gt;This approach allows you to design your own very unique and responsive web page without writing a single line of CSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpj30gsu80xvejtdvosrw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpj30gsu80xvejtdvosrw.jpg" alt="what is tailwind css" width="800" height="393"&gt;&lt;/a&gt;&lt;br&gt;
Tailwind CSS was first created by Adam Wathan and Steve Schoger in November 2017. Their goal was to create a framework that prioritized utility and flexibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Framework?
&lt;/h2&gt;

&lt;p&gt;A framework for programming is a tool that provides reusable and ready-made components that can build applications more efficiently. Frameworks offer pre-written codes, tools, and libraries, allowing developers to focus on writing specific functions rather than writing the same function again and again.&lt;/p&gt;

&lt;p&gt;In the web development industry, there are several programming frameworks we use to develop and design the web. Some of them are &lt;strong&gt;React&lt;/strong&gt;, &lt;strong&gt;Angular&lt;/strong&gt;, &lt;strong&gt;Express.js&lt;/strong&gt; and &lt;strong&gt;Ruby&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The most famous CSS frameworks are &lt;strong&gt;Bootstrap&lt;/strong&gt; and &lt;strong&gt;Tailwind&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bootstrap vs Tailwind CSS
&lt;/h2&gt;

&lt;p&gt;If you are a web developer or if you have any knowledge about web development, you either know about or have used Bootstrap and Tailwind CSS.&lt;br&gt;
Both Bootstrap and Tailwind CSS are frontend frameworks, which means we use them to design the web page.&lt;/p&gt;

&lt;p&gt;Both have their own strengths and weaknesses, and some developers prefer Bootstrap while others prefer Tailwind CSS. Today I am not going to do an in-depth comparison between Bootstrap and Tailwind CSS. I will do an article about the comparison soon.&lt;/p&gt;

&lt;p&gt;Bootstrap is good for developers who need to build professional-looking websites. On the other hand, Tailwind CSS is excellent for those who want to do custom designs and optimize performance. Therefore, choosing between Bootstrap and Tailwind CSS totally depends on your project requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do use Tailwind CSS?
&lt;/h2&gt;

&lt;p&gt;Using Tailwind CSS is very simple compared to Bootstrap and Vanilla CSS. You have to write your style code in the component class.&lt;/p&gt;

&lt;p&gt;I'll show you an example of creating a simple button with rounded corners and inside text using both Vanila CSS and Tailwind CSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6dc6g4yadwj6y3ptovk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6dc6g4yadwj6y3ptovk.png" alt="button" width="217" height="82"&gt;&lt;/a&gt;&lt;br&gt;
I'll first design this button using vanilla CSS.&lt;/p&gt;

&lt;h3&gt;
  
  
  With Vanilla CSS
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button class="btn"&amp;gt;View More&amp;lt;/button&amp;gt;
&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;.btn {
  margin: 0 auto 1rem;
  padding: 0.5 mm x 2 mm;
  font-weight: 600;
  font-size: 1.5rem;
  background-color: #f97316;
  border-radius: 0.5rem;
  color: white;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  With Tailwind CSS
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button class="mb-4 py-2 px-8 font-semibold text-2xl bg-orange-500 rounded-lg text-white"&amp;gt;View More&amp;lt;/button&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;As you can see, you need to write all your style code in your HTML form and in the component class. So, you need to create a separate style.css file and write the code there.&lt;/p&gt;

&lt;p&gt;If you need to learn deeply about Tailwind CSS, read this article. &lt;a href="https://kinsta.com/blog/tailwind-css/" rel="noopener noreferrer"&gt;Tailwind CSS&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In summary, Tailwind CSS offers a flexible approach to styling web pages with its predefined components, making it the best choice for developers who want to do their design without writing custom CSS. &lt;/p&gt;

&lt;p&gt;In this article, we explored what Tailwind CSS is and did a little comparison between two famous CSS frameworks, which are Bootstrap and Tailwind CSS. And we designed a simple button using Tailwind CSS as well.&lt;/p&gt;

&lt;p&gt;So, I hope you've learned something about Tailwind CSS from this article. See you in the next article.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tailwindcss</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
