# A Guide for Developing Ghost Themes with TailwindCSS

**URL:** <https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680>\
**Category:** Share & showcase\
**Created:** [January 20, 2023, 1:04am UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680 "2023-01-20T01:04:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericalli](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ericalli/32/3806_2.png) [@ericalli](https://forum.ghost.org/u/ericalli)\
**Post date:** [January 20, 2023, 1:04am UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/1 "2023-01-20T01:04:58Z")

</div>

I recently switched to using [TailwindCSS](https://tailwindcss.com/) for all my projects in Ghost and it has been an excellent experience.

Although the initial setup required a bit of effort to resolve some minor issues, it was well worth it. I’ve created a guide that covers the basics of getting started and also includes tips on how to avoid the additional research that I had to do to make everything run smoothly. Check it out below:

> **[The Complete Guide for Developing Ghost Themes with TailwindCSS](https://layeredcraft.com/blog/the-complete-guide-for-developing-ghost-themes-with-tailwindcss/)**
>
> In this guide, we’ll take an in-depth look at TailwindCSS, a powerful utility-first CSS framework that allows developers to quickly create custom, extensible, and beautiful Ghost themes without writing a line of CSS.

Hope this helps someone out there!

---

<div class="post-metadata">

**Author:** ![RyanF](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ryanf/32/17448_2.png) [@RyanF](https://forum.ghost.org/u/RyanF)\
**Post date:** [January 20, 2023, 4:38pm UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/2 "2023-01-20T16:38:04Z")

</div>

Very cool! Thanks for creating this. 🎨

---

<div class="post-metadata">

**Author:** ![adrelliott](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/adrelliott/32/22888_2.png) [@adrelliott](https://forum.ghost.org/u/adrelliott)\
**Post date:** [February 3, 2023, 3:14pm UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/3 "2023-02-03T15:14:23Z")

</div>

This guide is amazing! Thank you for doing it I would never have got it up and running without this.

Once gotcha was that the `screen.css` uses imports, which isn’t compatible with the `@tailwind` directive.

Instead, you need to use the bundled `@import` that comes with the latest Tailwind.

The section in your article: [The Complete Guide for Developing Ghost Themes with TailwindCSS | LayeredCraft](https://layeredcraft.com/blog/the-complete-guide-for-developing-ghost-themes-with-tailwindcss/#installing-tailwind)  
Tailwind docs: [Using with Preprocessors - Tailwind CSS](https://tailwindcss.com/docs/using-with-preprocessors#build-time-imports)

Hope this saves someone a few mins of head-scratching

---

<div class="post-metadata">

**Author:** ![holybean](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/holybean/32/10460_2.png) [@holybean](https://forum.ghost.org/u/holybean)\
**Post date:** [April 28, 2023, 10:35pm UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/4 "2023-04-28T22:35:55Z")

</div>

@ericalli Thanks for sharing, but… since **Ghost 5** this guide is not working anymore. Can you please look into it and perhaps share an updated guide…? 🙏

---

<div class="post-metadata">

**Author:** ![RyanF](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ryanf/32/17448_2.png) [@RyanF](https://forum.ghost.org/u/RyanF)\
**Post date:** [May 1, 2023, 8:25pm UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/5 "2023-05-01T20:25:02Z")

</div>

This is related to the update to the Starter theme, most likely. Check out this thread for a way to use Tailwind: [How to add Tailwindcss to the Starter theme · Issue #61 · TryGhost/Starter · GitHub](https://github.com/TryGhost/Starter/issues/61)

---

<div class="post-metadata">

**Author:** ![ericalli](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ericalli/32/3806_2.png) [@ericalli](https://forum.ghost.org/u/ericalli)\
**Post date:** [May 3, 2023, 10:09pm UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/6 "2023-05-03T22:09:56Z")

</div>

Thanks @RyanF!

I just updated the guide with your solution to getting Tailwind working with the updated Starter theme.

---

<div class="post-metadata">

**Author:** ![RyanF](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ryanf/32/17448_2.png) [@RyanF](https://forum.ghost.org/u/RyanF)\
**Post date:** [May 4, 2023, 2:38pm UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/7 "2023-05-04T14:38:26Z")

</div>

That’s great. Thanks! I haven’t used the `@apply` directive that much. How does it work for styling cards?

---

<div class="post-metadata">

**Author:** ![Rohitlakh](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/rohitlakh/32/24332_2.png) [@Rohitlakh](https://forum.ghost.org/u/Rohitlakh)\
**Post date:** [May 9, 2023, 7:58am UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/8 "2023-05-09T07:58:05Z")

</div>

I just completed my first theme using tailwind and it was just seemless

---

<div class="post-metadata">

**Author:** ![ericalli](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ericalli/32/3806_2.png) [@ericalli](https://forum.ghost.org/u/ericalli)\
**Post date:** [May 23, 2023, 3:42am UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/9 "2023-05-23T03:42:08Z")

</div>

It’s actually really simple and I find it particularly useful for times when you can’t access the HTML for a specific element to add Tailwind classes too. For example:

```auto
.kg-card.kg-button-card a.kg-btn {
  @apply rounded-full bg-sky-500;
}

```

You can also use any custom Tailwind configs you have defined for custom colors, fonts, etc.

---

<div class="post-metadata">

**Author:** ![diomed](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/diomed/32/1678_2.png) [@diomed](https://forum.ghost.org/u/diomed)\
**Post date:** [June 4, 2023, 4:37pm UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/12 "2023-06-04T16:37:11Z")

</div>

what do you think about recreating ghost’s default casper theme in tailwind?

---

<div class="post-metadata">

**Author:** ![shakerdesigns](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/shakerdesigns/32/31277_2.png) [@shakerdesigns](https://forum.ghost.org/u/shakerdesigns)\
**Post date:** [July 17, 2024, 2:31pm UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/13 "2024-07-17T14:31:30Z")

</div>

Just jumping in to say thanks! I followed the guide this morning and it worked perfectly. Appreciate you putting it together!

---

<div class="post-metadata">

**Author:** ![SpookySunshine](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@SpookySunshine](https://forum.ghost.org/u/SpookySunshine)\
**Post date:** [March 20, 2025, 8:32pm UTC](https://forum.ghost.org/t/a-guide-for-developing-ghost-themes-with-tailwindcss/35680/14 "2025-03-20T20:32:32Z")

</div>

i am having issues… did something break in this? i’ve struggled since 7am over this now, eek
