# How to add tailwindcss into my ghost theme? and use it globaly

**URL:** <https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076>\
**Category:** Themes\
**Created:** [April 21, 2021, 3:39am UTC](https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076 "2021-04-21T03:39:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![slimpython](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/slimpython/32/12505_2.png) [@slimpython](https://forum.ghost.org/u/slimpython)\
**Post date:** [April 21, 2021, 3:39am UTC](https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076/1 "2021-04-21T03:39:13Z")

</div>

I’m very new to theme development, I followed [this](https://dev.to/mattlehrer/how-to-setup-tailwindcss-with-a-custom-ghost-theme-5hmk) guide, but I’m stuck at here, as I don’t know where exactly I have to make this gulp.js file, how do i use tailwindcss globally in my theme?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/0/08530d6ddaddb088ea55ed2fce8460b0652e8a62.png)

---

<div class="post-metadata">

**Author:** ![thimiraonline](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/thimiraonline/32/22599_2.png) [@thimiraonline](https://forum.ghost.org/u/thimiraonline)\
**Post date:** [April 21, 2021, 8:58am UTC](https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076/2 "2021-04-21T08:58:44Z")

</div>

Just add it into the header of default.hbs file.

---

<div class="post-metadata">

**Author:** ![slimpython](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/slimpython/32/12505_2.png) [@slimpython](https://forum.ghost.org/u/slimpython)\
**Post date:** [April 21, 2021, 4:09pm UTC](https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076/3 "2021-04-21T16:09:14Z")

</div>

i tried this didn’t work can you take a look, please?  
check [here](https://github.com/slim-python/ghost-theme-dev-test/blob/main/default.hbs)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/b9ab8e64466ccbaca5cbdf6d9a865a470db273b4.png)

---

<div class="post-metadata">

**Author:** ![thimiraonline](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/thimiraonline/32/22599_2.png) [@thimiraonline](https://forum.ghost.org/u/thimiraonline)\
**Post date:** [April 21, 2021, 4:48pm UTC](https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076/4 "2021-04-21T16:48:02Z")

</div>

I have added the CSS to default.hbs. You can merge two pull requests and test.

---

<div class="post-metadata">

**Author:** ![thimiraonline](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/thimiraonline/32/22599_2.png) [@thimiraonline](https://forum.ghost.org/u/thimiraonline)\
**Post date:** [April 22, 2021, 3:30am UTC](https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076/5 "2021-04-22T03:30:00Z")

</div>

@slimpython I saw that you have merged the pull requests. Is it working?

---

<div class="post-metadata">

**Author:** ![slimpython](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/slimpython/32/12505_2.png) [@slimpython](https://forum.ghost.org/u/slimpython)\
**Post date:** [May 3, 2021, 7:36am UTC](https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076/6 "2021-05-03T07:36:35Z")

</div>

Yes it is working, forgot to say thank you, what an idiot I’m

Once again big THANKS!

---

<div class="post-metadata">

**Author:** ![djodonnell](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/djodonnell/32/15606_2.png) [@djodonnell](https://forum.ghost.org/u/djodonnell)\
**Post date:** [October 29, 2021, 2:38am UTC](https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076/7 "2021-10-29T02:38:03Z")

</div>

I’m followed the same guide as @slimpython (i.e. [How to setup TailwindCSS with a custom Ghost theme](https://dev.to/mattlehrer/how-to-setup-tailwindcss-with-a-custom-ghost-theme-5hmk).)

I have followed all of the steps and imported my theme but Tailwind styles don’t seem to do anything. If I inspect the Koenig editor my class styles are not there. If I then look at the published page outside the editor the class styles are there (inline) but they don’t appear to correspond to defined styles.

Are there any additional tricks that need to be performed?

---

<div class="post-metadata">

**Author:** ![djodonnell](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/djodonnell/32/15606_2.png) [@djodonnell](https://forum.ghost.org/u/djodonnell)\
**Post date:** [November 3, 2021, 11:52am UTC](https://forum.ghost.org/t/how-to-add-tailwindcss-into-my-ghost-theme-and-use-it-globaly/22076/8 "2021-11-03T11:52:40Z")

</div>

I started from scratch and I’ve managed to get tailwind working. Unfortunately tailwind doesn’t appear to render correctly in the Koenig editor, but once published it renders correctly.
