<?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: Samuel Robertson</title>
    <description>The latest articles on DEV Community by Samuel Robertson (@srobdev).</description>
    <link>https://dev.to/srobdev</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%2F426529%2Fd22412f4-7b3a-4211-b147-4e8ef62cc82a.jpeg</url>
      <title>DEV Community: Samuel Robertson</title>
      <link>https://dev.to/srobdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/srobdev"/>
    <language>en</language>
    <item>
      <title>TailwindCSS in CodeSandbox: A Detailed Guide</title>
      <dc:creator>Samuel Robertson</dc:creator>
      <pubDate>Tue, 11 Aug 2020 20:02:50 +0000</pubDate>
      <link>https://dev.to/srobdev/tailwindcss-in-codesandbox-a-detailed-guide-1hji</link>
      <guid>https://dev.to/srobdev/tailwindcss-in-codesandbox-a-detailed-guide-1hji</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://codesandbox.io/" rel="noopener noreferrer"&gt;CodeSandbox&lt;/a&gt; is an awesome web-based editor and playground for developers.  However, there is not currently a template for TailwindCSS, and no clear way to run Tailwind outside of using a &lt;code&gt;link&lt;/code&gt; to the CDN.  The CDN approach works, but robs you of a lot of customization, which Tailwind &lt;a href="https://tailwindcss.com/docs/installation/#using-tailwind-via-cdn" rel="noopener noreferrer"&gt;details here&lt;/a&gt;.  This guide will show you how to get up and running with TailwindCSS in CodeSandbox with a build process included, similar to my &lt;a href="https://srobdev.hashnode.dev/tailwindcss-the-very-basics-installation-intellisense-ckdf25ild006xpts1c95j9r9d" rel="noopener noreferrer"&gt;previous blog&lt;/a&gt;.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 - CodeSandbox Node Template Setup
&lt;/h3&gt;

&lt;p&gt;To start on this journey, head on over to CodeSandbox, and click "Create Sandbox" in the top right.  Then, in the popup, search for or select &lt;code&gt;Node HTTP Server&lt;/code&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596570033702%2FKUMvn2ti9.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596570033702%2FKUMvn2ti9.png" alt="Screen Shot 2020-08-04 at 1.39.42 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Creating a sandbox based off the Node HTTP Server template is necessary for having access to the &lt;code&gt;Terminal&lt;/code&gt;, which is present in CodeSandbox's &lt;a href="https://codesandbox.io/docs/environment" rel="noopener noreferrer"&gt;Container Environments&lt;/a&gt;.  This will spawn a Node project with a default &lt;code&gt;package.json&lt;/code&gt; script that will watch &lt;code&gt;index.js&lt;/code&gt; and refresh when it sees changes.  Having access to the Terminal is necessary for building and processing our CSS through PostCSS, using Tailwind's Purge capabilities, and for doing any extension or customization of Tailwind (as this requires a Tailwind config file). At this point, you should an environment similar (or hopefully identical) to this:&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596570395333%2FfQAZiSMsV.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596570395333%2FfQAZiSMsV.png" alt="Screen Shot 2020-08-04 at 1.46.26 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: You will have to sign in with your GitHub account in order to fork/make changes to the Node HTTP Server template! If you have not signed in at this point, please do so before proceeding with this guide.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Good job! You've now got your own Node instance running in CodeSandbox, and you're well on your way to getting to experiment with Tailwind.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 - Serving the App via Express
&lt;/h3&gt;

&lt;p&gt;Using the built-in &lt;code&gt;http&lt;/code&gt; library is great, but we want to quickly and easily serve a static HTML file so that we can focus on creating pages using Tailwind.  For this purpose, we'll be using Express to serve an &lt;code&gt;index.html&lt;/code&gt; file.  This section of the guide is based on scotch.io's article "&lt;a href="https://scotch.io/tutorials/use-expressjs-to-deliver-html-files" rel="noopener noreferrer"&gt;Use Express to Deliver HTML Files&lt;/a&gt;".&lt;/p&gt;

&lt;p&gt;To get started, create an &lt;code&gt;index.html&lt;/code&gt; file in the &lt;code&gt;src&lt;/code&gt; folder of your Node project.  Then, insert this HTML into that file: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;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.0" /&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="ie=edge" /&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div&amp;gt;Hello from the HTML!&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;


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

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: You can also use the Emmet Abbreviation &lt;code&gt;!&lt;/code&gt; or &lt;code&gt;html:5&lt;/code&gt; to create this snippet, and then add the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; section! &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, we need to install a few dependencies.  CodeSandbox makes this easy, and you can add new dependencies by clicking the &lt;code&gt;Add dependency&lt;/code&gt; button in the primary project sidebar.  You'll be greeted with this popup: &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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596571359868%2FbSflZlP_6.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596571359868%2FbSflZlP_6.png" alt="Screen Shot 2020-08-04 at 2.02.31 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the search box, type &lt;code&gt;express&lt;/code&gt; and click the top result for it (the one with 54.2M+ downloads).  After that, bring up the dependency popup again, type &lt;code&gt;path&lt;/code&gt;, and add the top result for it (3M+ downloads). In the &lt;code&gt;Dependencies&lt;/code&gt; section in the sidebar, you should now see both &lt;code&gt;express&lt;/code&gt; and &lt;code&gt;path&lt;/code&gt;.  They will also be present in your &lt;code&gt;package.json&lt;/code&gt; file, since CodeSandbox automatically goes through the full install process for new dependencies. &lt;/p&gt;

&lt;p&gt;We're now ready to actually serve the app via &lt;code&gt;express&lt;/code&gt;.  Head on over to your &lt;code&gt;index.js&lt;/code&gt; file and replace the contents of the file with the following JS:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const express = require("express");
const path = require("path");
const app = express();

app.get("/", (req, res) =&amp;gt; {
  res.sendFile(path.join(__dirname + "/index.html"));
});

app.listen(8080);


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

&lt;/div&gt;

&lt;p&gt;For anyone not familiar with what's going on in the above code, I'll do a quick rundown.  First, we're importing the dependencies that we just installed and creating a new instance of &lt;code&gt;express&lt;/code&gt; that we can access through &lt;code&gt;app&lt;/code&gt;.  Then, we're telling &lt;code&gt;app&lt;/code&gt; to listen for &lt;code&gt;GET&lt;/code&gt; requests on the &lt;code&gt;/&lt;/code&gt; path of our HTTP server (which, in this case, is our only path).  When a request is made on this path, we're using &lt;a href="http://expressjs.com/en/api.html#res.sendFile" rel="noopener noreferrer"&gt;sendFile&lt;/a&gt; to transfer the file at the given path, which we create using the &lt;code&gt;path&lt;/code&gt; dependency and by joining &lt;code&gt;__dirname&lt;/code&gt; with the location of our &lt;code&gt;index.html&lt;/code&gt; that we created in the previous step. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: &lt;code&gt;__dirname&lt;/code&gt; is a core feature of Node.js and returns the absolute path of the file that is currently executing!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You may notice that the output in the Browser on the right doesn't change when you save &lt;code&gt;index.js&lt;/code&gt;.  To see the proper output of our modified JS file, just refresh the built-in Browser!  You should then see a (mostly) blank page with &lt;code&gt;Hello from the HTML!&lt;/code&gt; proudly indicating that you have properly directed Node to serve your HTML file.  &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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596572326263%2F7Zzrchhrf.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596572326263%2F7Zzrchhrf.png" alt="Screen Shot 2020-08-04 at 2.18.37 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We're getting there.  The next few steps are pretty easy, so sit back, relax, and read on...&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 - Using &lt;code&gt;live-server&lt;/code&gt; to Automatically Reload Our HTML
&lt;/h3&gt;

&lt;p&gt;For this step, open up the trusty &lt;code&gt;Add dependency&lt;/code&gt; popup again, type in &lt;code&gt;live-server&lt;/code&gt;, and select the top result (383K+ downloads).  As before, your new dependency will be visible under &lt;code&gt;Dependencies&lt;/code&gt; and in &lt;code&gt;package.json&lt;/code&gt;.  Now, open up your &lt;code&gt;package.json&lt;/code&gt; if you haven't already, and find the &lt;code&gt;scripts&lt;/code&gt; block.  Under the current &lt;code&gt;start&lt;/code&gt; script, add a new line and insert our new &lt;code&gt;watch&lt;/code&gt; script, so that your scripts block now looks like so: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

"scripts": {
    "start": "nodemon src/index.js",
    "watch": "live-server src/ --no-css-inject"
 }


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

&lt;/div&gt;

&lt;p&gt;What we're doing here is telling &lt;code&gt;live-server&lt;/code&gt; to serve the files in our &lt;code&gt;src&lt;/code&gt; folder, as well as watch for changes in those files.  &lt;code&gt;--no-css-inject&lt;/code&gt; tells it to reload the page when CSS changes, instead of trying to dynamically inject the CSS (this is important later).&lt;/p&gt;

&lt;p&gt;To run this script, we'll need to open up a new &lt;code&gt;Terminal&lt;/code&gt; instance.  Do so by clicking the &lt;code&gt;+&lt;/code&gt; in the sandbox's Terminal section: &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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596572831765%2FA-AWqHXEO.jpeg" 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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596572831765%2FA-AWqHXEO.jpeg" alt="terminalclickthis.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: We have to open a new &lt;code&gt;Terminal&lt;/code&gt; instance because CodeSandbox keeps the primary instance (the one that is running when you load the sandbox) in a read-only state, so we can't run commands in there.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you've done that, simply type &lt;code&gt;yarn watch&lt;/code&gt; and the script we just added will run.  You should get output similar to the following:&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596573006313%2FwoLb9aP3n.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596573006313%2FwoLb9aP3n.png" alt="Screen Shot 2020-08-04 at 2.29.51 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As well as a toast that indicates a new server port has opened, with the option to open it in a new Browser pane.  Click that, and you'll once again see your HTML!  To verify that our hot-reloading functionality is working, make some changes to the text of your HTML and save.  You should see &lt;code&gt;live-server&lt;/code&gt; catch the changes and reload your HTML.  If not, take a step back and make sure that you have the dependency installed and the script set up properly.  &lt;/p&gt;

&lt;p&gt;Pretty simple, right?  As promised, we have another easy step next...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Whenever this guide says to make a new &lt;code&gt;Terminal&lt;/code&gt; instance, cancel (with &lt;code&gt;cmd/ctrl+c&lt;/code&gt;) or close your old one before running the new commands!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 4 - Installing TailwindCSS and Co. (PostCSS and autoprefixer)
&lt;/h3&gt;

&lt;p&gt;If you've read my blog on &lt;a href="https://srobdev.hashnode.dev/tailwindcss-the-very-basics-installation-intellisense-ckdf25ild006xpts1c95j9r9d" rel="noopener noreferrer"&gt;installing Tailwind&lt;/a&gt;, this step will be very familiar to you.  I'll hustle through this process in this guide with some light explanation, so head on over to that guide if you want more in-depth explanation!&lt;/p&gt;

&lt;p&gt;From the &lt;code&gt;Add dependency&lt;/code&gt; popup, add &lt;code&gt;tailwindcss&lt;/code&gt;, &lt;code&gt;postcss-cli&lt;/code&gt;, and &lt;code&gt;autoprefixer&lt;/code&gt;, and create the following configuration file named &lt;code&gt;postcss.config.js&lt;/code&gt; in the root directory of your project:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

//postcss.config.js
module.exports = {
  plugins: [require("tailwindcss"), require("autoprefixer")]
};


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

&lt;/div&gt;

&lt;p&gt;Then, in a new &lt;code&gt;Terminal&lt;/code&gt; instance (make sure you've stopped or exited your other one!), run &lt;code&gt;npx tailwindcss init&lt;/code&gt;.  If this works, you'll see a new file called &lt;code&gt;tailwind.config.js&lt;/code&gt; in your root directory.  However, if this command didn't work for you, simply create the file manually and paste the following code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

module.exports = {
  purge: [],
  theme: {
    extend: {},
  },
  variants: {},
  plugins: [],
}


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

&lt;/div&gt;

&lt;p&gt;You're now set up with some default configurations for &lt;code&gt;postcss&lt;/code&gt; and &lt;code&gt;tailwindcss&lt;/code&gt;.  To finish up with the basic Tailwind installation, we need to create a CSS file.  In your &lt;code&gt;src&lt;/code&gt; directory, create a new file named &lt;code&gt;index.css&lt;/code&gt; and place the default Tailwind directives in there: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

@tailwind base;

@tailwind components;

@tailwind utilities;


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

&lt;/div&gt;

&lt;p&gt;With this, you've fully installed Tailwind!  You can't quite write any TailwindCSS yet though, so let's get to the next step...&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 - Tailwind Purge Configuration
&lt;/h3&gt;

&lt;p&gt;To properly understand this step, we first need to understand the problem (and one of the biggest challenges revolving around running TailwindCSS in CodeSandbox).  Come along with me on an adventure of epic (file size) proportions!&lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;package.json&lt;/code&gt; scripts block, insert the following script: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

"build:css": "postcss src/index.css -o src/build/index.css"


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

&lt;/div&gt;

&lt;p&gt;Open up another &lt;code&gt;Terminal&lt;/code&gt; instance (again, being sure your other instance is not running), and run &lt;code&gt;yarn build:css&lt;/code&gt;.  Assuming you have your config files from the previous step set up properly, you'll be greeted with this shocking message:&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596574269936%2F5iLlNFAHf.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596574269936%2F5iLlNFAHf.png" alt="Screen Shot 2020-08-04 at 2.49.05 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Essentially, we have attempted to create a file so big that it exceeds CodeSandbox's file limits, and we have therefore been blocked from creating it.  Unfortunately for us, this build step is absolutely necessary for getting Tailwind running properly, and we're now dead in the water.  While this may seem strange, Tailwind's development build is &lt;a href="https://tailwindcss.com/docs/controlling-file-size/" rel="noopener noreferrer"&gt;large by design&lt;/a&gt;.  If you scroll down that page, however, you'll notice that there is is a &lt;code&gt;purge&lt;/code&gt; option mentioned that should be run when deploying to production.  This option employs &lt;a href="https://webpack.js.org/guides/tree-shaking/" rel="noopener noreferrer"&gt;tree shaking&lt;/a&gt; to prune unused code in Tailwind's output CSS.  While normally only used in production, we're going to take advantage of &lt;code&gt;purge&lt;/code&gt; in order to optimize the output of our &lt;code&gt;build:css&lt;/code&gt; script and get past CodeSandbox's file size limit.&lt;/p&gt;

&lt;p&gt;Open your &lt;code&gt;tailwind.config.js&lt;/code&gt; file that we created earlier.  You'll notice that there is already a &lt;code&gt;purge&lt;/code&gt; option present.  Replace this line so that the contents of &lt;code&gt;tailwind.config.js&lt;/code&gt; now looks like so: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

module.exports = {
  purge: {
    enabled: true,
    content: ["./src/**/*.html"]
  },
  theme: {
    extend: {},
  },
  variants: {},
  plugins: [],
}


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

&lt;/div&gt;

&lt;p&gt;See the difference in &lt;code&gt;purge&lt;/code&gt;?  What we're doing here is explicitly enabling &lt;code&gt;purge&lt;/code&gt;, regardless of the environment.  Then, we're directing it to the files that it needs to purge, which is any HTML file under our &lt;code&gt;src&lt;/code&gt; folder. &lt;/p&gt;

&lt;p&gt;Now, for the moment of truth.  Go back to your &lt;code&gt;Terminal&lt;/code&gt;, and run &lt;code&gt;yarn build:css&lt;/code&gt;.  This time, there should be no toast notifying you of file size issues.  To verify that our script worked, look for a new &lt;code&gt;build&lt;/code&gt; folder under &lt;code&gt;src&lt;/code&gt;.  Inside this folder should be a file named &lt;code&gt;index.css&lt;/code&gt;.  &lt;/p&gt;

&lt;p&gt;Congrats!  You've successfully worked around CodeSandbox's file size limit, and have processed TailwindCSS using PostCSS.  We have just one more (!) step before we can fully incorporate Tailwind into our app!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6 - &lt;code&gt;watch&lt;/code&gt; Script Modification and Final Additions to &lt;code&gt;index.html&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This is really two steps in one, but I hope you'll cut me some slack on that.  &lt;/p&gt;

&lt;p&gt;For the final time in this guide, head back over to your &lt;code&gt;package.json&lt;/code&gt; file and modify your &lt;code&gt;watch&lt;/code&gt; script to be the following: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

"watch": "live-server src/ --no-css-inject &amp;amp; nodemon --watch 'src/**/*.html' -e html --exec 'yarn build:css'",


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

&lt;/div&gt;

&lt;p&gt;Whoa!  We added a lot here.  Let's break this down a little.&lt;/p&gt;

&lt;p&gt;First, the &lt;code&gt;&amp;amp;&lt;/code&gt; symbol (since we already know what &lt;code&gt;live-server&lt;/code&gt; does.  We have two separate commands in this line (before and after this symbol) that we want to run in parallel.  This is exactly what &lt;code&gt;&amp;amp;&lt;/code&gt; does: it tells &lt;code&gt;yarn&lt;/code&gt; to run both the &lt;code&gt;live-server&lt;/code&gt; and &lt;code&gt;nodemon&lt;/code&gt; commands at the same time.  &lt;/p&gt;

&lt;p&gt;Second, the &lt;code&gt;nodemon&lt;/code&gt; command.  &lt;code&gt;nodemon&lt;/code&gt; is a utility that watches files and will automatically restart a Node server when those files change.  However, in our implementation, we're changing that quite a bit. By default, &lt;code&gt;nodemon&lt;/code&gt; only watches for &lt;a href="https://github.com/remy/nodemon#specifying-extension-watch-list" rel="noopener noreferrer"&gt;a few file types&lt;/a&gt;. So, we're first telling &lt;code&gt;nodemon&lt;/code&gt; to watch &lt;em&gt;all&lt;/em&gt; HTML files under our &lt;code&gt;src&lt;/code&gt; directory.  Then, we're modifying the file extensions it looks for with the &lt;code&gt;-e&lt;/code&gt; command, where we tell it to watch for files with the &lt;code&gt;html&lt;/code&gt; file extension.  Finally, we're telling it to execute our &lt;code&gt;yarn build:css&lt;/code&gt; with the &lt;code&gt;--exec&lt;/code&gt; flag. In plain English, here's the entire command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nodemon, please watch for all changes to HTML files in my src directory with a .html file extension and rebuild my CSS when those files change&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Simpler than it seems at first, right? &lt;/p&gt;

&lt;p&gt;I know you're as anxious as I am to get this done and see the fruits of our labor, so head over to your &lt;code&gt;index.html&lt;/code&gt; file.  Add the following &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; element in between the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tags:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;link rel="stylesheet" href="/build/index.css" /&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;Then, in the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; we created a long time ago, add a new &lt;code&gt;class&lt;/code&gt; attribute:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;class="bg-teal-400"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Your HTML should now look like this: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;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.0" /&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="ie=edge" /&amp;gt;
    &amp;lt;link rel="stylesheet" href="/build/index.css" /&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div class="bg-teal-400"&amp;gt;Hello from the HTML!&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;We're now at the finish line, so let's cross it together.  Open your &lt;code&gt;Terminal&lt;/code&gt;, and type &lt;code&gt;yarn watch&lt;/code&gt;. You'll see output similar to the following, and be prompted to open a new Browser pane (just like before): &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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596576344603%2FuaASSmSxW.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596576344603%2FuaASSmSxW.png" alt="Screen Shot 2020-08-04 at 3.25.17 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If everything we've gone through worked properly, you should now see a beautiful teal background on our div!&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596577819305%2F9HZb-_gBS.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596577819305%2F9HZb-_gBS.png" alt="Screen Shot 2020-08-04 at 3.50.09 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: You will, typically, see the Browser reload a couple times when you change your TailwindCSS.  This is because live-server sees a change in the HTML when we change the CSS and reloads, then reloads again when our &lt;code&gt;index.css&lt;/code&gt; file is re-generated.  Fear not!  This is normal and expected with this configuration.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We have now successfully implemented TailwindCSS in our CodeSandbox project!  Though this process may seem a little daunting, it's actually pretty quick and simple when you get the hang of it and understand what's going on.  If you want to see the completed template and fork it for yourself, take a look at the completed guide project here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codesandbox.io/s/tailwindcss-template-11lff" rel="noopener noreferrer"&gt;TailwindCSS Template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As always, to continue your adventure with Tailwind, check out their &lt;a href="https://tailwindcss.com/docs" rel="noopener noreferrer"&gt;offical documentation&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>node</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Tailwind Tidbits #1: Neumorphic Profile Card</title>
      <dc:creator>Samuel Robertson</dc:creator>
      <pubDate>Thu, 06 Aug 2020 16:45:22 +0000</pubDate>
      <link>https://dev.to/srobdev/tailwind-tidbits-1-neumorphic-profile-card-5e0f</link>
      <guid>https://dev.to/srobdev/tailwind-tidbits-1-neumorphic-profile-card-5e0f</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;In this series, I'm going to pick designs from all around the web and show you how to make them with &lt;a href="https://tailwindcss.com/"&gt;TailwindCSS&lt;/a&gt;.  For the most part, I'll be finding these designs from sites like &lt;a href="https://dribbble.com/"&gt;dribble&lt;/a&gt; and &lt;a href="https://www.behance.net/"&gt;Behance&lt;/a&gt;, but I'd love to do suggestions from comments as well!&lt;/p&gt;

&lt;p&gt;For part 1, we'll be building a standard profile card with a &lt;a href="https://medium.com/@artofofiare/neumorphism-the-right-way-a-2020-design-trend-386e6a09040a"&gt;neumorphic&lt;/a&gt; style.  This is a style that is near and dear to my heart because I've always found it fascinating, and my own &lt;a href="https://srob.dev"&gt;personal site&lt;/a&gt; is built in this style.  I have also built the exact profile card we'll be building today in SCSS (and it even has a light/dark theme toggle built in), which you can find &lt;a href="https://codepen.io/sRobDevGG/pen/NWxQjGd"&gt;in this CodePen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This tidbit will assume that you have gone through the process of getting TailwindCSS up and running on your machine. If you haven't, check out my guide: &lt;a href="https://dev.to/srobdev/tailwindcss-the-very-basics-installation-intellisense-3mml"&gt;TailwindCSS: The Very Basics (Installation + IntelliSense)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With all Tailwind Tidbit guides, we'll be starting from the final result of that guide.  If you haven't gone through the guide but want to go through this Tidbit, simply clone the &lt;a href="https://github.com/srobDev/tailwind-beginner-blog"&gt;repo&lt;/a&gt;, run &lt;code&gt;yarn install&lt;/code&gt; then &lt;code&gt;yarn build&lt;/code&gt;, and you'll be ready to go! &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 - Adding Custom Colors
&lt;/h3&gt;

&lt;p&gt;While Tailwind has a great &lt;a href="https://tailwindcss.com/docs/customizing-colors#default-color-palette"&gt;default color palette&lt;/a&gt;, they just don't quite have the shade we're looking for.  Thankfully, they offer a ton of &lt;a href="https://tailwindcss.com/docs/configuration"&gt;customization&lt;/a&gt;, so we can add just the shade we need.&lt;/p&gt;

&lt;p&gt;Open up your &lt;code&gt;tailwind.config.js&lt;/code&gt; file.  Inside &lt;code&gt;extends&lt;/code&gt;, create a &lt;code&gt;colors&lt;/code&gt; object.  Then, inside the &lt;code&gt;colors&lt;/code&gt; object, add our custom background color, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//tailwind.config.js
...
theme: {
    extend: {
      colors: {
        "light-theme-gray": "#bfbfbf",
      }
    }
 },
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: Whenever we edit &lt;code&gt;tailwind.config.js&lt;/code&gt;, you'll need to re-run &lt;code&gt;yarn build&lt;/code&gt; and (likely) refresh your browser.  Otherwise, our customizations will not take effect.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This will allow us to use this color in our TailwindCSS.  To see this in action, head over to your &lt;code&gt;index.html&lt;/code&gt; file, and replace the current contents of the &lt;code&gt;class&lt;/code&gt; attribute of the &lt;code&gt;div&lt;/code&gt; there with &lt;code&gt;bg-light-theme-gray h-screen w-screen&lt;/code&gt;.  Your HTML should then look 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;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;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.0"&amp;gt;
    &amp;lt;link rel="stylesheet" href="/build/index.css"&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;div class="bg-light-theme-gray h-screen w-screen"&amp;gt;
        Hello from the HTML!
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What we're doing here is telling TailwindCSS to give our div our custom background color (&lt;code&gt;light-theme-gray&lt;/code&gt;) and make the height and width of our div fit the entire viewport (&lt;code&gt;h-screen&lt;/code&gt; and &lt;code&gt;w-screen&lt;/code&gt;).  You should now see the text with a gray background: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oIihrczE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596671758975/_92mhoc8T.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oIihrczE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596671758975/_92mhoc8T.png" alt="backgroundcolorhtml.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great!  This is the background color we'll be using throughout this Tidbit, so this is good progress.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 - More and More Customization
&lt;/h3&gt;

&lt;p&gt;Now, let's add the rest of our customization.  We'll be adding custom properties for &lt;code&gt;borderRadius&lt;/code&gt;, &lt;code&gt;boxShadow&lt;/code&gt;, &lt;code&gt;height&lt;/code&gt;, and &lt;code&gt;width&lt;/code&gt;, so declare those as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//tailwind.config.js
...
theme: {
   extend: {
      colors: {
        ... 
     },
     borderRadius: {},
     boxShadow: {},
     height: {}, 
     width: {}   
   }
}
....
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then add the following properties:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//tailwind.config.js
...
borderRadius: {
    card: "10px"
},
boxShadow: {
    "light-card":
        "12px 12px 16px 0 rgba(255, 255, 255, 0.3), -8px -8px 12px 0 rgba(0, 0, 0, .25)",
    "light-button":
        "6px 6px 8px 0 rgba(255, 255, 255, 0.3), -4px -4px 6px 0 rgba(0, 0, 0, .25)"
},
height: {
    card: "300px",
    button: "40px"
},
width: {
    card: "250px",
    button: "100px"
}
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, add the rest of the colors we need:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//tailwind.config.js
...
colors: {
    "light-theme-gray": "#bfbfbf",
    "light-button-gray": "#bfbfbf",
    "light-font": "#474747"
},
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: The box-shadows used here are from the CodePen that I linked in the introduction.  They're not special in any specific way, they just work well for the neumorphic look.  Mess around with them a bit and see how it looks!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At this point, this should be your full &lt;code&gt;tailwind.config.js&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//tailwind.config.js
module.exports = {
  purge:[],
  theme: {
    extend: {
      colors: {
        "light-theme-gray": "#bfbfbf",
        "light-button-gray": "#bfbfbf",
        "light-font": "#474747"
      },
      borderRadius: {
        card: "10px"
      },
      boxShadow: {
        "light-card":
          "12px 12px 16px 0 rgba(255, 255, 255, 0.3), -8px -8px 12px 0 rgba(0, 0, 0, .25)",
        "light-button":
          "6px 6px 8px 0 rgba(255, 255, 255, 0.3), -4px -4px 6px 0 rgba(0, 0, 0, .25)"
      },
      height: {
        card: "300px",
        button: "40px"
      },
      width: {
        card: "250px",
        button: "100px"
      }
    }
  },
  variants: {},
  plugins: []
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: Don't forget to run &lt;code&gt;yarn build&lt;/code&gt; after we edit this file!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Step 3 - Adding the HTML&lt;/p&gt;

&lt;p&gt;Now, in this section, I'm going to throw a lot of HTML and a lot of Tailwind at you very quickly.  Most of it will be pretty standard, and can be quickly found in the &lt;a href="https://tailwindcss.com/docs/"&gt;documentation&lt;/a&gt;.  Instead of walking through every step of the HTML, I'm going to show you the (almost) finished file, and highlight the specific Tailwind that I think is important for learning here.&lt;/p&gt;

&lt;p&gt;So, without further delay, here is the (almost) finished HTML:&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;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;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.0" /&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="ie=edge" /&amp;gt;
    &amp;lt;link rel="stylesheet" href="/build/index.css" /&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div
      class="bg-light-theme-gray h-screen w-screen flex items-center justify-center"
    &amp;gt;
      &amp;lt;div class="h-card w-card shadow-light-card rounded-card"&amp;gt;
        &amp;lt;div class="flex flex-col items-center"&amp;gt;
          &amp;lt;img
            src="http://placedog.net/75/75"
            class="rounded-full m-x-auto mt-10 shadow-light-button"
            id="profilePhoto"
          /&amp;gt;

          &amp;lt;span class="mt-6 font-bold text-lg text-light-font"&amp;gt;Doggo&amp;lt;/span&amp;gt;
          &amp;lt;span class="font-light text-sm text-light-font"
            &amp;gt;Frontend Engineer&amp;lt;/span
          &amp;gt;

          &amp;lt;div class="mt-6 inline-block items-center"&amp;gt;
            &amp;lt;button
              class="rounded-full h-button w-button m-2 shadow-light-button text-light-font font-extrabold text-sm"
            &amp;gt;
              Message
            &amp;lt;/button&amp;gt;
            &amp;lt;button
              class="rounded-full h-button w-button m-2 shadow-light-button text-light-font font-extrabold text-sm"
            &amp;gt;
              Follow
            &amp;lt;/button&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you save, you should now see this in your browser: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t2rIPojQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596677838961/4t7lRkm3F.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t2rIPojQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596677838961/4t7lRkm3F.png" alt="doggofirst.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before we make our final additions, let's highlight some key elements.  First, note the places where our custom properties are used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;line 14: h-card w-card rounded-card
line 18: shadow-light-button
lines 22/23: text-light-font
lines 29/34: h-button w-button shadow-light-button text-light-font
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding custom properties was quick and easy, and gave us descriptive classes for our card.  &lt;/p&gt;

&lt;p&gt;Other than the custom classes, some of my favorite Tailwind classes that we used here are &lt;code&gt;m-x-auto&lt;/code&gt;, &lt;code&gt;rounded-full&lt;/code&gt;, and &lt;code&gt;flex flex-row&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;m-x-auto&lt;/code&gt;: Applies &lt;code&gt;auto&lt;/code&gt; margin to the x-axis of the element (so the left and right sides)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rounded-full&lt;/code&gt;: Gives us the fully-rounded look (pretty self explanatory, I just like it)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;flex flex-col&lt;/code&gt;: Technically this is two classes, but they work in tandem.  &lt;code&gt;flex&lt;/code&gt; declares the element to be a &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox"&gt;flex&lt;/a&gt; container, and &lt;code&gt;flex-col&lt;/code&gt; quickly makes it into a column instead of the default row.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 - Pseudo-Classes
&lt;/h3&gt;

&lt;p&gt;At this point, we should be pretty happy with the look we've created.  Not only have we taken a pretty unique design and made it a reality with Tailwind, but we've learned how to customize Tailwind along the way!  However, if you click on the buttons, you'll quickly realize that something is missing.  That something is, well, anything.  The buttons don't move, and certainly don't emulate the style present in the CodePen.  Never fear!  There is a quick fix for this, and some more learning to be had along the way.&lt;/p&gt;

&lt;p&gt;First on our list is &lt;code&gt;focus&lt;/code&gt;. We need this pseudo-class to remove the outline that appears around the buttons when you click them: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BJlib2b4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596679660433/a6O2JPlv9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BJlib2b4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596679660433/a6O2JPlv9.png" alt="focusoutline.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To do this, go to the &lt;code&gt;class&lt;/code&gt; attributes of our buttons and add &lt;code&gt;focus:outline-none&lt;/code&gt;.  Then, click the buttons and you'll no longer see the outline!  &lt;/p&gt;

&lt;p&gt;Next, we need to remove the &lt;code&gt;box-shadow&lt;/code&gt; on the buttons when they're pressed, which requires that we use the &lt;code&gt;active&lt;/code&gt; pseudo-class. Go back to the buttons and add &lt;code&gt;active:shadow-none&lt;/code&gt;. Click the buttons again and...&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Nothing?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is weird, right?  &lt;code&gt;active&lt;/code&gt; is clearly listed as an available pseudo-class in the docs. So what gives? Well, Tailwind provides us with a &lt;em&gt;lot&lt;/em&gt; of functionality in the default build (which we got by running &lt;code&gt;yarn build&lt;/code&gt; earlier).  However, the &lt;code&gt;active&lt;/code&gt; pseudo-class is not included in this default build, so we therefore have to include specify it as an available &lt;code&gt;variant&lt;/code&gt; in our &lt;code&gt;tailwind.config.js&lt;/code&gt; file.  In that file, you'll notice a &lt;code&gt;variants&lt;/code&gt; object.  Add an entry for &lt;code&gt;boxShadow&lt;/code&gt; like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//tailwind.config.js
...
variants: {
    boxShadow: ['active']
}
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells Tailwind that we want to include the &lt;code&gt;active&lt;/code&gt; pseudo-class for &lt;code&gt;boxShadow&lt;/code&gt; only.  If we try to use &lt;code&gt;active&lt;/code&gt; on other classes, it won't work unless we specify it in the same way here.  Re-run &lt;code&gt;yarn build&lt;/code&gt; and refresh your browser.  When you click the buttons, the box-shadow now disappears and makes it look like the buttons are flush with the card!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 - Transitions
&lt;/h3&gt;

&lt;p&gt;The design is done at this point, but we can do one more thing to spice it up a bit. Go back to your buttons one last time, and add the following to your class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transition-shadow ease-in-out duration-100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your (finally) finished HTML should look 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;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;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.0" /&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="ie=edge" /&amp;gt;
    &amp;lt;link rel="stylesheet" href="/build/index.css" /&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div
      class="bg-light-theme-gray h-screen w-screen flex items-center justify-center"
    &amp;gt;
      &amp;lt;div class="h-card w-card shadow-light-card rounded-card"&amp;gt;
        &amp;lt;div class="flex flex-col items-center"&amp;gt;
          &amp;lt;img
            src="http://placedog.net/75/75"
            class="rounded-full m-x-auto mt-10 shadow-light-button"
            id="profilePhoto"
          /&amp;gt;

          &amp;lt;span class="mt-6 font-bold text-lg text-light-font"&amp;gt;Doggo&amp;lt;/span&amp;gt;
          &amp;lt;span class="font-light text-sm text-light-font"
            &amp;gt;Frontend Engineer&amp;lt;/span
          &amp;gt;

          &amp;lt;div class="mt-6 inline-block items-center"&amp;gt;
            &amp;lt;button
              class="rounded-full h-button w-button m-2 shadow-light-button text-light-font font-extrabold text-sm focus:outline-none active:shadow-none transition-shadow ease-in-out duration-100"
            &amp;gt;
              Message
            &amp;lt;/button&amp;gt;
            &amp;lt;button
              class="rounded-full h-button w-button m-2 shadow-light-button text-light-font font-extrabold text-sm focus:outline-none active:shadow-none transition-shadow ease-in-out duration-100"
            &amp;gt;
              Follow
            &amp;lt;/button&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All we've done in this step is add a transition for &lt;code&gt;box-shadow&lt;/code&gt;, set the duration to 100 milliseconds, and specified the animation (&lt;code&gt;ease-in-out&lt;/code&gt;). It's an easy addition, but makes a huge different for the feel of the card!&lt;/p&gt;

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

&lt;p&gt;In this guide, we created a unique design from scratch, learned how to set up custom properties in TailwindCSS, and even learned how to add in non-default pseudo-classes.  It's incredible how building one simple profile card can teach us so much, isn't it? You can view the completed code on the &lt;code&gt;neumorphic_card&lt;/code&gt; branch of my tailwind-beginner-blog repo, at this link: &lt;a href="https://github.com/sRobDev/tailwind-beginner-blog/tree/neumorphic_card"&gt;https://github.com/sRobDev/tailwind-beginner-blog/tree/neumorphic_card&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading, and be sure to give me a follow so you never miss out on a Tailwind Tidbit!&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>html</category>
      <category>design</category>
    </item>
    <item>
      <title>TailwindCSS: The Very Basics (Installation + IntelliSense)</title>
      <dc:creator>Samuel Robertson</dc:creator>
      <pubDate>Wed, 05 Aug 2020 01:19:29 +0000</pubDate>
      <link>https://dev.to/srobdev/tailwindcss-the-very-basics-installation-intellisense-3mml</link>
      <guid>https://dev.to/srobdev/tailwindcss-the-very-basics-installation-intellisense-3mml</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;You've finally done it.  You've sat down, created a fresh new project, and are ready to get going with that snazzy, new, &lt;a href="https://tailwindcss.com/"&gt;utility-first CSS framework called Tailwind&lt;/a&gt;.  However, you're not sure where to start, or maybe you've gotten started and you can't get IntelliSense to work in VS Code.  This post will take you from creating a completely new project to having TailwindCSS installed with IntelliSense up and running in Visual Studio Code in just a few easy steps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 (or so) - yarn initialization
&lt;/h3&gt;

&lt;p&gt;Navigate to your folder of choice to begin your project (or where you've already started it, though for this guide we will assume you have yet to start).&lt;/p&gt;

&lt;p&gt;Now, create a folder with your project name or simply type:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mkdir tailwind-beginner-blog&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;(be sure to change the name to whatever you want!)&lt;/p&gt;

&lt;p&gt;Next, we're going to initialize &lt;a href="https://classic.yarnpkg.com/en/"&gt;yarn&lt;/a&gt;, which will give us a &lt;code&gt;package.json&lt;/code&gt; file and the ability to install TailwindCSS.  You can alternatively use &lt;a href="https://www.npmjs.com/"&gt;npm&lt;/a&gt; and &lt;em&gt;most&lt;/em&gt; of the same commands will apply.&lt;/p&gt;

&lt;p&gt;Navigate to your project folder in your terminal and initialize &lt;code&gt;yarn&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd tailwind-beginner-blog
yarn init -y
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: The &lt;code&gt;-y&lt;/code&gt; flag will answer yes to the default configuration questions from yarn.  If you want more customization, simply type &lt;code&gt;yarn init&lt;/code&gt;!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Congrats!  You've now initialized &lt;code&gt;yarn&lt;/code&gt; and can install TailwindCSS.  Let's get right to it!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 - TailwindCSS Installation
&lt;/h3&gt;

&lt;p&gt;For this step, simply run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add tailwindcss
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can open your &lt;code&gt;package.json&lt;/code&gt; after running this command, and you should see &lt;code&gt;tailwindcss&lt;/code&gt; under your dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "tailwind-beginner-blog",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "tailwindcss": "^1.6.2"
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Next, we need to set up a CSS file for our project.  Create a new CSS file in your project and name it whatever you want.  Mine will be &lt;code&gt;index.css&lt;/code&gt;.  Then, in that file, include these three Tailwind directives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@tailwind base;
@tailwind components;
@tailwind utilities;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;When Tailwind is built, these directives will be swapped out with CSS that Tailwind itself generates.&lt;/p&gt;

&lt;p&gt;Congrats!  You've now installed TailwindCSS.  If you were to excitedly run over to your HTML and start throwing Tailwind classes into your &lt;code&gt;class&lt;/code&gt; attribute though, you'd be a little disappointed.  We've still got just a little more to go.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 - Adding a Tailwind Configuration File
&lt;/h3&gt;

&lt;p&gt;This step is easy (just like most of this, hopefully).  Go to your terminal in your project's root directory, and run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx tailwindcss init
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If all goes well, you'll see a new &lt;code&gt;tailwind.config.js&lt;/code&gt; file pop up in your project.  This file will contain some empty configuration exports for Tailwind:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  purge: [],
  theme: {
    extend: {},
  },
  variants: {},
  plugins: [],
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4 - Processing and Building Tailwind
&lt;/h3&gt;

&lt;p&gt;One of the requirements of such a unique framework like Tailwind is that it requires a build process where CSS files are processed and Tailwind's CSS is inserted.  For this, we're going to use &lt;a href="https://postcss.org/"&gt;PostCSS&lt;/a&gt;, which is also what Tailwind's own documentation recommends. In addition to this, we'll use &lt;a href="https://autoprefixer.github.io/"&gt;autoprefixer&lt;/a&gt;, which adds vendor-specific prefixes to your CSS.&lt;/p&gt;

&lt;p&gt;Head on over to your terminal again, and politely ask yarn to install these two plugins:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add postcss-cli autoprefixer
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: As before, you can go check your &lt;code&gt;package.json&lt;/code&gt; to see if these packages installed properly!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 5 - PostCSS Configuration (and first build!)
&lt;/h3&gt;

&lt;p&gt;We're almost there!  Shortly, you'll be able to start writing TailwindCSS to your heart's content.&lt;/p&gt;

&lt;p&gt;In your project's root directory, create a new file named &lt;code&gt;postcss.config.js&lt;/code&gt;, open it, and add this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
    plugins: [
        require('tailwindcss'),
        require('autoprefixer'),
    ]
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This is telling PostCSS that it should process the CSS in our project with Tailwind, and then use autoprefixer to apply all the necessary vendor prefixes.&lt;/p&gt;

&lt;p&gt;For the first time, we'll now be editing &lt;code&gt;package.json&lt;/code&gt; ourselves.  To make sure we're on the same page, this is what my &lt;code&gt;package.json&lt;/code&gt; looks like at this point in the guide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "tailwind-beginner-blog",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "autoprefixer": "^9.8.6",
    "postcss-cli": "^7.1.1",
    "tailwindcss": "^1.6.2"
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Under the ending brace of &lt;code&gt;"dependencies"&lt;/code&gt;, add this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
    "build": "postcss index.css -o build/index.css"
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: Be sure to substitute with the name of your CSS file!  If your file is in a subfolder, make sure to indicate that as well, such as &lt;code&gt;styles/index.css&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Finally, your &lt;code&gt;package.json&lt;/code&gt; should now look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "tailwind-beginner-blog",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "autoprefixer": "^9.8.6",
    "postcss-cli": "^7.1.1",
    "tailwindcss": "^1.6.2"
  },
  "scripts": {
    "build": "postcss index.css -o build/index.css"
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;What we've done is add a yarn script called &lt;code&gt;build&lt;/code&gt;, that tells &lt;code&gt;postcss&lt;/code&gt; to process our &lt;code&gt;index.css&lt;/code&gt; file and send the output to the &lt;code&gt;build&lt;/code&gt; subfolder in a CSS file of the same name. Now, open your terminal and run &lt;code&gt;yarn build&lt;/code&gt;.  You should see some output similar to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;➜  tailwind-beginner-blog yarn build
yarn run v1.19.1
$ postcss index.css -o build/index.css
✨  Done in 3.16s.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Congrats!  Your CSS has been processed with Tailwind.  Now, if only we had a way to see that...&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6 - index.html Creation and Viewing Our CSS!
&lt;/h3&gt;

&lt;p&gt;Almost there, I promise.  In your project, create an HTML file (which I've named &lt;code&gt;index.html&lt;/code&gt; here).  Open that file, and type &lt;code&gt;html:5&lt;/code&gt;.  You should see a dropdown come up that has an &lt;code&gt;html:5&lt;/code&gt; option, which if you select it should display a box labeled &lt;code&gt;Emmet Abbreviation&lt;/code&gt;.  Hit enter, and you'll have the skeleton of a new HTML page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;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.0"&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: If the Emmet Abbreviation didn't work for you, just copy this HTML!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Inside the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag, we need to add a link to our stylesheet (the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; in the following snippet):&lt;br&gt;
&lt;/p&gt;

&lt;div class="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.0"&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="build/index.css"&amp;gt; 
&amp;lt;/head&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, inside the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag, insert this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div&amp;gt;Hello!&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This is the div where we'll see our TailwindCSS at work. Write out your first ever TailwindCSS class by adding a class with TailwindCSS classes inside it to your HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="bg-teal-400"&amp;gt;Hello!&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now open that file in your favorite web browser, and you should see this: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AvYD2GY1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596491388206/xIAmuKaAt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AvYD2GY1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596491388206/xIAmuKaAt.png" alt="Screen Shot 2020-08-03 at 3.49.37 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you do, your TailwindCSS is in action!  If you don't, take a few steps back and see if you can figure out where things went wrong.  &lt;/p&gt;

&lt;p&gt;For the final piece, let's get some help from Visual Studio Code with writing our TailwindCSS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Step - Tailwind CSS IntelliSense!
&lt;/h3&gt;

&lt;p&gt;In VS Code, open your Extensions and search for &lt;code&gt;Tailwind CSS IntelliSense&lt;/code&gt;.  Install it, then either restart VS Code or run &lt;code&gt;&amp;gt;Developer: Reload Window&lt;/code&gt; in the VS Code command palette.  After you've done this, open your HTML file again, and start adding another Tailwind class.  You should see IntelliSense recommendations from VS Code, like this: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ULv4JJdX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596491761289/dkMvNR7UY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ULv4JJdX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1596491761289/dkMvNR7UY.png" alt="Screen Shot 2020-08-03 at 3.55.31 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You're finally done!  You're now up and running with TailwindCSS with IntelliSense.  These steps should apply to most other projects, so once you have a handle on what we've gone over here, you'll be able to quickly and easily integrate Tailwind in many other projects (such as React, Vue, and so on).  To continue learning about Tailwind, check out their &lt;a href="https://tailwindcss.com/docs"&gt;official documentation&lt;/a&gt;!  &lt;/p&gt;

&lt;p&gt;Thanks for reading, and have fun with your new CSS framework!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: You can view the completed project in this repo: &lt;a href="https://github.com/sRobDev/tailwind-beginner-blog"&gt;https://github.com/sRobDev/tailwind-beginner-blog&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

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