<?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: Sara</title>
    <description>The latest articles on DEV Community by Sara (@saramo93).</description>
    <link>https://dev.to/saramo93</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%2F681553%2F78936fa9-7577-446f-8fd7-a07df3cb3bc1.png</url>
      <title>DEV Community: Sara</title>
      <link>https://dev.to/saramo93</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saramo93"/>
    <language>en</language>
    <item>
      <title>Tailwind CSS- the best CSS framework? </title>
      <dc:creator>Sara</dc:creator>
      <pubDate>Sat, 07 Aug 2021 16:55:43 +0000</pubDate>
      <link>https://dev.to/saramo93/tailwind-css-the-best-css-framework-2hf0</link>
      <guid>https://dev.to/saramo93/tailwind-css-the-best-css-framework-2hf0</guid>
      <description>&lt;h2&gt;
  
  
  So what is Tailwind CSS?
&lt;/h2&gt;

&lt;p&gt;Tailwind CSS is summarised as a utility-first CSS framework. The first release of Tailwind CSS was in November 2017 which saw the framework get adopted by tech giants such as Mozilla. Today Tailwind CSS has taken the lead as the most popular CSS framework, leaving behind previous front runners like Bootstrap.&lt;/p&gt;

&lt;p&gt;The beauty of Tailwind CSS is that it allows developers to easily customize CSS classes to create unique styles and custom user interfaces. With Tailwind CSS the developer has free-reign when it comes to choosing styles as there are no restrictive design stipulations. This design autonomy is why many developers are opting for Tailwind CSS as opposed to frameworks like Bootstrap that come with preset style kits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Tailwind CSS
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Power to create truly unique styles/websites&lt;/li&gt;
&lt;li&gt;Non-restrictive framework- no preset styles/components&lt;/li&gt;
&lt;li&gt;Ability to reuse component styles&lt;/li&gt;
&lt;li&gt;Easy and fast to use&lt;/li&gt;
&lt;li&gt;Create responsive websites &lt;/li&gt;
&lt;li&gt;Smaller CSS files&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Tailwind CSS in action
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkldrh2lzlpswrb87ra2r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkldrh2lzlpswrb87ra2r.png" alt="image of code"&gt;&lt;/a&gt;&lt;br&gt;
The above code really illustrates the ease in which a developer can style html elements quickly through Tailwind classes and create the user interface that they want. I created the height for the image with "h-30" and added a margin of 1.5rem with the "m-6" class. I was able to directly edit the text positioning and colour of the text in the h2 element with "text-center text-pink-400". I was also able to customise padding around the h2 element with "px-2 pb-5". &lt;/p&gt;

&lt;h2&gt;
  
  
  How to get started with Tailwind CSS
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1- Install package&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the terminal run the following code to install the Tailwind CSS package. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8eo8544u1bggyz79iwyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8eo8544u1bggyz79iwyh.png" alt="image of code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2- Add tailwind to your created CSS file&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After creating a CSS file, copy the following code into the file. What this does it allow you to use Tailwind by adding it to your project.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp057fj66taa7dh1c1vzg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp057fj66taa7dh1c1vzg.png" alt="image of code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3- Create your Tailwind Configuration file&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run the following code into your terminal&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyehf7i6o0sszzg8xeu4q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyehf7i6o0sszzg8xeu4q.png" alt="code image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After running you will notice a new file appear in your project called tailwind.config.js which contains the following code &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frd8z5nw2262frahtk2gf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frd8z5nw2262frahtk2gf.png" alt="code image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4- Add the Postcss file&lt;/strong&gt; &lt;br&gt;
In the terminal run &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fip0n6q13hbipmu1xpufu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fip0n6q13hbipmu1xpufu.png" alt="code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After running the above installation is complete run the following code into the terminal.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzqh9x6nt4puv1mya9d9j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzqh9x6nt4puv1mya9d9j.png" alt="code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will now have a postcss.config.js file. Add the following code to the plugins.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvfdig2tlplv7hw4tzx00.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvfdig2tlplv7hw4tzx00.png" alt="code image"&gt;&lt;/a&gt;&lt;br&gt;
PostCSS is a tool used for transforming CSS with Javascript plugins. It allows you to get access to the Tailwind by adding it to the plugin. It creates a build folder where the processed Tailwind is outputted. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5- Finally in the terminal run&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzc210y3hjipxb8sf2vx2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzc210y3hjipxb8sf2vx2.png" alt="code image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Followed by&lt;/strong&gt;&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi0zsrzr4gutmyx8qed6e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi0zsrzr4gutmyx8qed6e.png" alt="code"&gt;&lt;/a&gt;&lt;br&gt;
This completes the installation process. Now you need to create a index.html file where you will be executing your Tailwind CSS code!.&lt;/p&gt;

&lt;h2&gt;
  
  
  You are now ready to use Tailwind CSS
&lt;/h2&gt;

&lt;p&gt;Now that you are up and running it is time to get creative with Tailwind CSS. Go through the extensive and limitless &lt;a href="https://tailwindcss.com/docs" rel="noopener noreferrer"&gt;Tailwind Docs&lt;/a&gt; to create your own unique website and have fun! &lt;/p&gt;

&lt;p&gt;You can now firsthand experience how powerful Tailwind CSS is and it might just become your favourite CSS framework.&lt;/p&gt;

&lt;h4&gt;
  
  
  To further explore Tailwind CSS check these out
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind Official Website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://wsvincent.com/learn-tailwind-css-beginners-guide/" rel="noopener noreferrer"&gt;William Vincent- a beginner's guide&lt;/a&gt;&lt;br&gt;
&lt;a href="https://codingthesmartway.com/tailwind-css-for-absolute-beginners/" rel="noopener noreferrer"&gt;Tailwind for absolute beginners&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.freecodecamp.org/news/what-is-tailwind-css-and-how-can-i-add-it-to-my-website-or-react-app/" rel="noopener noreferrer"&gt;Free Code Camp- how to use Tailwind CSS&lt;/a&gt;&lt;/p&gt;

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