<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Holmes on Medium]]></title>
        <description><![CDATA[Stories by Holmes on Medium]]></description>
        <link>https://medium.com/@haodev007?source=rss-7b68233375a1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nnSASyLh8KEG3jf-66Lsnw.png</url>
            <title>Stories by Holmes on Medium</title>
            <link>https://medium.com/@haodev007?source=rss-7b68233375a1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 03 Jun 2026 06:56:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@haodev007/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[How to use SCSS with TNT stack]]></title>
            <link>https://haodev007.medium.com/how-to-use-scss-with-tnt-stack-ce1abbbedb40?source=rss-7b68233375a1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce1abbbedb40</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[sass]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <dc:creator><![CDATA[Holmes]]></dc:creator>
            <pubDate>Tue, 11 Oct 2022 04:04:46 GMT</pubDate>
            <atom:updated>2022-10-21T12:09:41.979Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I-O1rjpH34b_TPj2l8f7vw.png" /></figure><h3>Overview</h3><p>You already learned how to integrate Tailwind CSS and Next.js with Typescript in the <a href="https://medium.com/@haodev007/using-tailwind-css-next-js-typescript-like-a-pro-integration-40ad8fed0c75">previous article</a>. If not, check first.</p><p>Actually, there is another way to create TNT project.</p><p>As you can see <a href="https://nextjs.org/examples">here</a>, there are lots of template starter with nextjs and other stack you want.</p><p>i.e. You can create TNT project with follwing command. More info, <a href="https://github.com/vercel/next.js/tree/canary/examples/with-tailwindcss">here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T_B5GNJLP_upEce1T357Hg.png" /></figure><p>Look, how simple is this! right?</p><p>If yes, let us see how to add SASS in TNT project which already created last article. What I want to say before getting started, it is very easy. Good luck!</p><h3>What is SASS?</h3><p>SASS (Syntactically Awesome Stylesheets) is a CSS pre-processor that lets you use variables, mathematical operations, mixins, loops, functions, imports, and other interesting functionalities that make writing CSS much more powerful. In some ways, you may think of SASS as a style sheet extension language because it extends the standard CSS characteristics by introducing the benefits of a basic programming language. So SASS will compile your code and generate the CSS output a browser can understand.</p><h3>Install SASS</h3><p>You need to install SASS and you can do it with this command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*pfpmdEtKFHItYw41WAf8ag.png" /></figure><p>Nice, now we need to refactor some stuffs to use SASS.</p><h3>Refactoring</h3><ul><li>Rename global.css to global.scss</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*7ilRHMIF-B0ousfiz1ElXA.png" /></figure><ul><li>Refactor _app.tsx like this</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZWsuPD8TzDWAzjOJNHpSg.png" /></figure><p>Yes, that is all. You can now use SASS in TNT project.</p><p>Ah, you already set but maybe you will get warning Unknown at rule @tailwindscss (unknownAtRules) in VS Code?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*J-qH-CqPoR8L2dztM99Rqw.png" /></figure><p>You have already set to ignore it in the previous article but it was ignore for css. So you can also ignore it for sass.</p><p>Press ctrl+, and search unknow... and set like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*ADN-pqUfLSD4LsdwR1jixg.png" /></figure><h3>Conclusion</h3><p>We learned how to add SASS in TNT project, this time. I believe, using SASS in TNT project is also good to apply tailwind css and customize styles easily.</p><p>Actually, this is what I missed in previous article. Thanks for your reading!</p><p>I have pushed <a href="https://github.com/haodev007/Tailwind-Next.js-TypeScript/commit/126a4e437c1697e06d87b558cf5b5d63592b986e"><strong><em>updates</em></strong></a><strong><em> </em></strong>on the <a href="https://github.com/haodev007/Tailwind-Next.js-TypeScript-Like-a-Pro"><strong>previous repo</strong></a><strong>. </strong>Feel free to clone this repo to use as a starter <strong><em>template</em></strong> for <strong><em>TNT</em> stack</strong> and follow me on <a href="https://github.com/haodev007"><strong>Github</strong></a>.</p><p>plz don’t be stingy with the stars on your hand. It will push me to success.</p><blockquote><em>If you liked this article, clap your applause enthusiastically and plz don’t forget to click </em><strong><em>Follow button</em></strong><em>. :D</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce1abbbedb40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Tailwind CSS + Next.js + TypeScript Like a Pro — Integration?]]></title>
            <link>https://haodev007.medium.com/using-tailwind-css-next-js-typescript-like-a-pro-integration-40ad8fed0c75?source=rss-7b68233375a1------2</link>
            <guid isPermaLink="false">https://medium.com/p/40ad8fed0c75</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[tech-guide]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Holmes]]></dc:creator>
            <pubDate>Wed, 05 Oct 2022 00:36:20 GMT</pubDate>
            <atom:updated>2022-10-25T23:17:20.797Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using Tailwind CSS + Next.js + TypeScript Like a Pro — Integration?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-bG_xAqurVd0T35ulOYu0Q.jpeg" /></figure><p><strong>TNT : Tailwind CSS + Next.js + TypeScript</strong>, Let us call it TNT stack, here.</p><p>If you are already a Pro to integrate Tailwind CSS in Next.js with TypeScript, you can skip it and plz read <a href="https://haodev007.medium.com/how-to-use-scss-with-tnt-stack-ce1abbbedb40"><strong>this blog</strong></a>.</p><h3>Why Next.js?</h3><p>Next.js gives you the best developer experience with all the features you need for production: hybrid static &amp; server rendering, TypeScript support, smart bundling, route pre-fetching, and more. No config is needed.</p><p>You can use React to build user interface, then incrementally adopt Next.js features to solve common application requirements such as routing, data fetching, and integrations — all while improving the developer and end-user experience.</p><p>Whether you are an individual developer or part of a larger team, you can leverage React and Next.js to build fully interactive, highly dynamic, and performant web applications.</p><h3>Why Tailwind CSS?</h3><p>Tailwind is a utility-first CSS framework for rapidly building custom user interfaces.</p><p>Tailwind CSS is<strong> </strong>incredibly performance focused and aims to produce the smallest CSS file possible by only generating the CSS you are actually using in your project. Combined with minification and network compression, this usually leads to CSS files that are less than 10kB, even for large projects.</p><p>It fits well with Next.js, React Framework for production.</p><h3>Why TypeScript?</h3><p>TypeScript is very useful and efficient when the day comes for code redesigns or factorizations.</p><p>If a code module changes its behavior, the development team will be automatically alerted wherever this module is used and implemented. Therefore, the team will be more serene and secure in the redesign, thus improving the maintainability of a project over time.</p><p>In addition, it improves developer productivity by clearly displaying syntax errors during compilation as if it were a native language.</p><blockquote>Do you want to build application with bug-free, well-optimized and good SEO, easily and rapidly? Start <strong>TNT stack</strong>, now.</blockquote><h3>1. Create a New Next.js Project with TypeScript</h3><p>I like to use <strong><em>Yarn</em> <em>CLI</em></strong> for fast, reliable, and secure dependency management. Create Next.js project with the following command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJR0xuDDigxtRqd3jJUWJg.png" /></figure><p>More info: plz refer <a href="https://nextjs.org/docs/api-reference/create-next-app"><strong>this</strong></a><strong> </strong>to use create-next-app</p><h3>Set src Directory and Change Project Structure.</h3><p>The <strong>src</strong> directory is very common in many apps and Next.js supports it by default.</p><p><a href="https://nextjs.org/docs/advanced-features/src-directory"><strong>The feature</strong></a> is one of my favorite advanced features in Next.js and I always have this process when start Next.js project.</p><p>The <strong>baseUrl</strong> configuration option allows you to import directly from the root of the project. So let us add <strong>baseUrl </strong>to <strong><em>tsconfig.json</em></strong> and set value to “src”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*V0fmZEY_r3it8swrT0mLXQ.png" /></figure><p>Ok, nice! Let us refactor project app, now.</p><ul><li>First of all, delete Home.module.css of styles. We don’t need it.</li><li>Move pages and styles directories to src root directory.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*vlACa_ns4E67Uo_PTMC5Vg.png" /></figure><ul><li>Refactor src/pages/index.tsx like this.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ZwQB0oiiA_LHYLA4zH3RQ.png" /></figure><ul><li>Refactor src/pages/index.tsx as it is now.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tc89kkWuHA6RkxgTRjVnFg.png" /></figure><h3>2. Install Tailwind CSS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*TEV1YW2ACE87iPOMXs4imA.png" /></figure><p>Great! We have installed tailwind and its dependencies.</p><p>Now you need to createpostcss.config.js and tailwind.config.js to configure some stuffs. This command will generate both postcss.config.js and tailwind.config.js at the same time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bScHazT_DU8S1CQMVrugGg.png" /></figure><ul><li>Configure tailwind.config.js.</li></ul><p>To configure your template paths, add the paths in tailwind.config.js.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*guJ9HPpDbakQ6oXOHxHiEw.png" /></figure><p>It means tailwind applies its utility classes to all JavaScript and TypeScript files of src directory.</p><ul><li>Configure postcss.config.js</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*F0Mbkx2d99rLNCw3Lnmvlg.png" /></figure><p>Let us skip it as is, because tailwindcss and autoprefixer are added to postcss.config.js by default.</p><ul><li>Add the Tailwind directives to Global CSS (styles/global.css) and import it in _app.tsx (We have already imported it, there)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*bPqwRPxfW4x3Pi4ovyjN6A.png" /></figure><p>Yes, you should be able to use tailwind utility classes, right now.</p><p>Ah, do you get the warning Unknown at rule @tailwindcss(unknownAtRules) in VS Code? You can read <a href="https://flaviocopes.com/fix-unknown-at-rule-tailwind/"><strong>this</strong></a> and fix it easily. I just hope you do fix it. ;)</p><h3>Final Tip</h3><ul><li>Use <a href="https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss"><strong>Tailwind CSS IntelliSense extension</strong></a> in your VS Code.</li><li>Use <a href="https://tailwindcss.com/blog/automatic-class-sorting-with-prettier"><strong>Automatic Class Sorting with Prettier</strong></a> but it is optional. :)</li></ul><p>Those will make our life easier.</p><h3>Conclusion</h3><p>We learned how to integrate Tailwind in Next.js with TypeScript, this time. Hope you find it helpful and useful!</p><p>I have pushed updates for this article on <a href="https://github.com/haodev007/Tailwind-Next.js-TypeScript-Like-a-Pro"><strong>this repo</strong></a><strong>. </strong>Feel free to clone this repo to use as a starter <strong><em>template</em></strong> for <strong><em>TNT</em> stack</strong> and follow me on <a href="https://github.com/haodev007"><strong>Github</strong></a>.</p><p>plz don’t be stingy with the stars on your hand. It will push me to success.</p><blockquote>If you liked this article, clap your applause enthusiastically and plz don’t forget to click <strong>Follow button</strong>. :D</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40ad8fed0c75" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>