# Purge plugin for PG available! Fixed, I think!

**URL:** <https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050>\
**Category:** Third Party Plugins\
**Created:** [May 1, 2020, 7:43pm UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050 "2020-05-01T19:43:42Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![mhigaki](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/mhigaki/32/2788_2.png) [@mhigaki](https://forum.pinegrow.com/u/mhigaki)\
**Post date:** [August 2, 2020, 6:04pm UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/21 "2020-08-02T18:04:57Z")

</div>

RobM,

It’s working!

Tks.

---

<div class="post-metadata">

**Author:** ![MrPaulDriver](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@MrPaulDriver](https://forum.pinegrow.com/u/MrPaulDriver)\
**Post date:** [November 20, 2020, 2:55pm UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/22 "2020-11-20T14:55:55Z")

</div>

I have installed the purge plugin for the first time today and find there are problems with Tailwind UI.

The problems appear to be connected with missing media queries, but there may be other things too,

Tailwind UI has undergone a great deal of development recently and it is my understanding they are sponsoring Purge CCS. Presumably to maintain compatibility.

I am not an expert, but I am wondering if the node modules in the plugin are out of date ??

STEPS TO REPRODUCE.

1. Open Pinegrow and create a new page based on Tailwind UI. Name it index.html

2. Create a local css file based on the CDN version. This is the file that will be purged. The source be found at [https://cdn.jsdelivr.net/npm/@tailwindcss/ui@latest/dist/tailwind-ui.min.css](https://cdn.jsdelivr.net/npm/@tailwindcss/ui@latest/dist/tailwind-ui.min.css)

3. Via the Pinegrow stylesheet UI or in code remove the CDN link change to the local css file.

4. Via the Pinegrow UI insert a Tailwaind UI Hero section, or get the code directly from [https://tailwindui.com/components/marketing/sections/heroes](https://tailwindui.com/components/marketing/sections/heroes)

5. Page will now feature a fully formed hero banner. Save index.html

6. Perform the routine for purging the local css file and edit index.html to use the purged css file.

Hero section, including navbar links are now broken.

An inspection of the navbar region, before and after will reveal major differences relating to missing media queries and perhaps other things too.

The plugin does not ship with a package.json file, so I unable to test my hunch that the node modules are in need of an update.

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [November 20, 2020, 3:17pm UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/23 "2020-11-20T15:17:55Z")

</div>

Edit:  
Put this up on the forum before looking back through files. I’m not sure this plugin will be able to be brought up to speed with the new Tailwind. I’ll keep everyone posted.

Thanks for this - I haven’t been keeping up with Tailwind updates like I should. I think your diagnosis is likely spot on. I’ll try get an update/bug fix pushed out this weekend.  
Bob

---

<div class="post-metadata">

**Author:** ![MrPaulDriver](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@MrPaulDriver](https://forum.pinegrow.com/u/MrPaulDriver)\
**Post date:** [November 20, 2020, 3:47pm UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/24 "2020-11-20T15:47:09Z")

</div>

Thank you for the super quick reply Rob.

Maybe you could package the json and lock files too?

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [November 20, 2020, 9:07pm UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/25 "2020-11-20T21:07:30Z")

</div>

Strange - On the Tailwind site it says that Purge uses a regex of:

```auto
/[^<>"'`\s]*[^<>"'`\s:]/g

```

But when I use that it still prunes back some rules for smaller screen sizes like switching to hamburger. Have to dig a little more through their code to figure out the right regex and/or figure out what rules are being eliminated incorrectly and modify the regex myself. Have I mentioned I hate regex? 😜

---

<div class="post-metadata">

**Author:** ![MrPaulDriver](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@MrPaulDriver](https://forum.pinegrow.com/u/MrPaulDriver)\
**Post date:** [November 21, 2020, 9:35am UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/26 "2020-11-21T09:35:13Z")

</div>

Posting up some info about updates to Tailwind UI and Tailwindcss 2.0. Perhaps not relevant, but just in case.

> **[Tailwind UI](https://tailwindui.com/changes-for-v2)**
>
> Beautiful UI components by the creators of Tailwind CSS.

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [November 21, 2020, 10:30am UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/27 "2020-11-21T10:30:17Z")

</div>

So the plugin has been updated and seems to play nice with Tailwind 2.0. However, I’m not sure it plays nicely with Tailwind-UI components. I don’t have a subscription to test it. @MrPaulDriver - the example above is a Tailwind-UI component that requiress JS for the menu to work on mobile. The Purge plugin works to eliminate the excess CSS rules, but the element still doesn’t quite behave as expected. However, it also doesn’t work as expected pre-purge.  
Hope this helps people out!  
Bob

---

<div class="post-metadata">

**Author:** ![MrPaulDriver](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@MrPaulDriver](https://forum.pinegrow.com/u/MrPaulDriver)\
**Post date:** [November 21, 2020, 1:07pm UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/28 "2020-11-21T13:07:13Z")

</div>

Thank you for working on this Bob. I’ll do some testing and report back.

BTW there are some free demo components for Tailwind UI, so testing is possible without the need for an account. See [https://tailwindui.com/preview](https://tailwindui.com/preview)

The tailwind ui components are not bundled with any javascript, leaving this to the site builder to roll their own or leverage something like React or Vue.

The Tailwind team are making some scripts available, but this is still a work in progress. They are already looking pretty good though. See [https://headlessui.dev](https://headlessui.dev)

---

<div class="post-metadata">

**Author:** ![MrPaulDriver](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@MrPaulDriver](https://forum.pinegrow.com/u/MrPaulDriver)\
**Post date:** [November 21, 2020, 1:21pm UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/29 "2020-11-21T13:21:52Z")

</div>

This is working great Bob. Big thanks.

Does a route exist for buying you a beer?

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [November 21, 2020, 3:04pm UTC](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050/30 "2020-11-21T15:04:16Z")

</div>

Thanks for the feedback!  
I never set-up one of those “Buy me a beer/coffee” buttons. If you find you are getting enough use out of the plugin you can think of purchasing the Purify plugin. It uses a different Node package, but allows for output of logs, green-listing items, minification, combining media queries, and auto-prefixing. It seems to be equal to Purge when it comes to Tailwind purification. All for just under 5 U.S.D - the price of a good craft brew.  
Bob

[Previous page](https://forum.pinegrow.com/t/purge-plugin-for-pg-available-fixed-i-think/4050.md?page=1)
