# Tailwind page losing styles

**URL:** <https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587>\
**Category:** Pinegrow WordPress Plugin\
**Tags:** bug, tailwind\
**Created:** [January 6, 2023, 11:54am UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587 "2023-01-06T11:54:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adryan](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Adryan](https://forum.pinegrow.com/u/Adryan)\
**Post date:** [January 6, 2023, 11:54am UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/1 "2023-01-06T11:54:12Z")

</div>

I was working on some pages yesterday, they were all looking fine. Today, when I wanted to edit the page, I noticed that it lost most styles. All other pages lost the styles too.

Clicking on my saved design in the Design panel fixed it immediately.

Video: [https://www.berrycast.com/conversations/bb26cbb4-0707-5915-823d-ff67634ed20a](https://www.berrycast.com/conversations/bb26cbb4-0707-5915-823d-ff67634ed20a)

---

<div class="post-metadata">

**Author:** ![Adryan](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Adryan](https://forum.pinegrow.com/u/Adryan)\
**Post date:** [January 8, 2023, 6:38am UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/2 "2023-01-08T06:38:16Z")

</div>

It’s happening pretty often. At least once a day, at the very first launch of Pinegrow WP editor. I have to click on my style in the Design panel on every page to fix it.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [January 8, 2023, 1:34pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/3 "2023-01-08T13:34:47Z")

</div>

@Adryan it almost looks like your style sheet isn’t loading for some reason. Can you use the code editor in Pinegrow to check the header and see if it’s loaded? Is there anything unusual about this one page, or is it happening to all of them?

---

<div class="post-metadata">

**Author:** ![Adryan](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Adryan](https://forum.pinegrow.com/u/Adryan)\
**Post date:** [January 8, 2023, 7:44pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/4 "2023-01-08T19:44:08Z")

</div>

I think I found the culprit - it was a 3rd party Tailwind components library (its .css file). Nothing wrong with Tailwind in Pinegrow. Or at least didn’t encounter this issue lately.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [January 8, 2023, 7:46pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/5 "2023-01-08T19:46:25Z")

</div>

@Adryan Was it Winden? If so, I’d love to hear more. They are trying hard to support Pinegrow and have been very responsive whenever I’ve reached out to them.

---

<div class="post-metadata">

**Author:** ![Adryan](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Adryan](https://forum.pinegrow.com/u/Adryan)\
**Post date:** [January 8, 2023, 7:58pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/6 "2023-01-08T19:58:37Z")

</div>

No, it was Flowbite. But nothing wrong with it, too. Had to simply change their css file order. Heard good things about Winden. Thinking about buying it, but waiting for their native integration with Pinegrow and your tutorial video 🙂

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [January 8, 2023, 8:01pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/7 "2023-01-08T20:01:54Z")

</div>

I’ll have to double-check, but I think Winden now has native Pinegrow support. It’s just a checkbox inside their settings panel.

A video might take a few weeks since I’m struggling with some tight project deadlines, then need to create an hour-long presentation for the upcoming [Page Builder Summit](https://pagebuildersummit.com/).

---

<div class="post-metadata">

**Author:** ![Adryan](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Adryan](https://forum.pinegrow.com/u/Adryan)\
**Post date:** [January 10, 2023, 12:02pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/8 "2023-01-10T12:02:16Z")

</div>

Ok, the problem still occurs. No idea what causes it. I have to apply the design (even though there is only one) from the Design panel to every page to fix the css styling issue ☹

I can share website’s login details if someone from the support team is willing to check it out.

---

<div class="post-metadata">

**Author:** ![Adryan](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Adryan](https://forum.pinegrow.com/u/Adryan)\
**Post date:** [January 10, 2023, 8:27pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/9 "2023-01-10T20:27:23Z")

</div>

There’s an error in the console that I think connects to this problem @matjaz  
 ![obraz](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/5/5c4da35be4c5f6103dc4c33e8d38df0f229a5a36.png)

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [January 10, 2023, 8:33pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/10 "2023-01-10T20:33:52Z")

</div>

Thanks @Adryan! The last error is just cosmetic, I’ll remove the message. It should not affect how the plugin functions.

---

<div class="post-metadata">

**Author:** ![Adryan](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Adryan](https://forum.pinegrow.com/u/Adryan)\
**Post date:** [January 11, 2023, 6:03am UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/11 "2023-01-11T06:03:55Z")

</div>

Damn, thought it was maybe connected somehow… Do you have any idea about what could cause the issue?

---

<div class="post-metadata">

**Author:** ![TechAkayy](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@TechAkayy](https://forum.pinegrow.com/u/TechAkayy)\
**Post date:** [January 11, 2023, 10:19am UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/12 "2023-01-11T10:19:21Z")

</div>

Are you able to share your page’s head tag?

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [January 11, 2023, 4:23pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/13 "2023-01-11T16:23:14Z")

</div>

@Adryan please download the source project ZIP and send it to [support@pinegrow.com](mailto:support@pinegrow.com).

---

<div class="post-metadata">

**Author:** ![Adryan](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Adryan](https://forum.pinegrow.com/u/Adryan)\
**Post date:** [February 4, 2023, 8:30pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/14 "2023-02-04T20:30:34Z")

</div>

Any news on this? Did you have time to check out the project I sent you?

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [February 7, 2023, 1:25am UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/15 "2023-02-07T01:25:16Z")

</div>

@Adryan replying here as well as it might be useful for others.

I think I found and fixed the issue. The list of used classes was only sent when the project was closed by going to the dashboard. Now it gets saved whenever the project is saved (if it has changes). You will have to open every page and activate the design if needed, after that it should work ok.

The update will be out soon.

---

<div class="post-metadata">

**Author:** ![Bryn](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/bryn/32/5487_2.png) [@Bryn](https://forum.pinegrow.com/u/Bryn)\
**Post date:** [October 4, 2023, 11:44am UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/16 "2023-10-04T11:44:00Z")

</div>

Hi @matjaz

The issue doesn’t seem to be fixed as far as I can see. Tailwind styles are half-broken for me unless Pinegrow’s Tailwind stylesheet is loaded dead last in the head. Flowbite exacerbates the issue, but yesterday I had the exact same issue with a theme export and that project doesn’t involve Flowbite. Currently I’m working on a plugin.

Is it possible to ensure that the Tailwind stylesheet has the highest possible order number when enqueued? It was very easy to fix in the theme yesterday, but not so much with the plugin… Basically I’m loading the Tailwind styles twice, with the second instance being last in the order, which will suffice for client meetings for the time being.

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [October 4, 2023, 1:02pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/17 "2023-10-04T13:02:03Z")

</div>

@Bryn in ideal world plugins should not load Tailwind stylesheets - a theme should load site-wide styles.

With Tailwind, the situation is more complex because Tailwind classes that are used by plugin blocks might not be included in the theme version of the Tailwind build. That’s beyond Pinegrow to solve though 🙂

> [@Bryn](#):
>
> Is it possible to ensure that the Tailwind stylesheet has the highest possible order number when enqueued?

wp\_enqueue\_style function does not have a priority parameter. The only way would be to use Do not enqueue action and then add custom code into inc/custom.php or in plugin file that hooks into the wp\_enqueue\_styles with an appropriate hook priority.

---

<div class="post-metadata">

**Author:** ![Bryn](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/bryn/32/5487_2.png) [@Bryn](https://forum.pinegrow.com/u/Bryn)\
**Post date:** [October 4, 2023, 2:05pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/18 "2023-10-04T14:05:14Z")

</div>

Thanks for the reply @matjaz!

How can I not enqueue Tailwind with Pinegrow, so that I can only manually enqueue the stylesheet?

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [October 4, 2023, 3:38pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/19 "2023-10-04T15:38:01Z")

</div>

@Bryn add **Do not enqueue** action to the link element that includes the stylesheet. This should be done on the master page.

 ![dneq](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/5/56e36b5d3c852900ec03aae598f56fd40ef7bb8e.jpeg)

---

<div class="post-metadata">

**Author:** ![Bryn](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/bryn/32/5487_2.png) [@Bryn](https://forum.pinegrow.com/u/Bryn)\
**Post date:** [October 5, 2023, 5:20pm UTC](https://forum.pinegrow.com/t/tailwind-page-losing-styles/7587/20 "2023-10-05T17:20:04Z")

</div>

So obvious in hindsight. Thanks @matjaz!
