# Tailwind - not all classes functioning

**URL:** <https://forums.creativeclouddeveloper.com/t/tailwind-not-all-classes-functioning/6153>\
**Category:** UXP Plugin API\
**Tags:** uxp, javascript, vue, tailwind\
**Created:** [April 5, 2023, 9:15pm UTC](https://forums.creativeclouddeveloper.com/t/tailwind-not-all-classes-functioning/6153 "2023-04-05T21:15:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [April 5, 2023, 9:15pm UTC](https://forums.creativeclouddeveloper.com/t/tailwind-not-all-classes-functioning/6153/1 "2023-04-05T21:15:03Z")

</div>

Anyone had any success with Tailwind in UXP?

I’ve got it partially working within a Vue 3 instance but not all the classes appear to be functioning. So far I’ve got flexbox classes working, but not `gap`. I’ve had `bg-[color]` working (albeit _very_ inconsistently), but not `text-[color]`, `text-[size]` doesn’t appear to work either. I’ve tried these classes on both Spectrum Typographic elements and vanilla HTML.

I’m also finding that I have to do multiple reloads for some Tailwind classes to apply, but others happen instantly, and with no consistency.

I will stress that I’m running this in a Vue 3 instance and with Webpack.  
Am I right in thinking that UXP and CSS are a bit funky?

I fully appreciate that neither Vue or Tailwind are expressly supported in UXP; this is mostly a purely experimental exercise on my part (although I plan to release the Vue stuff as a starter plugin soon). - I’d just like to know _why_ it’s not working!

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [April 6, 2023, 5:39am UTC](https://forums.creativeclouddeveloper.com/t/tailwind-not-all-classes-functioning/6153/2 "2023-04-06T05:39:20Z")

</div>

I’ve [complained about `gap` (and not only) 2 years ago](http://forums.creativeclouddeveloper.com/t/plugin-ui-submission-checklist-is-nearly-impossible-to-achieve/3405). Ended up using negative margins 🤷‍♂️  
I believe text color works not on all elements (IIRC on `sp-button` it doesn’t work, but I might be wrong now). Could be same with size maybe(?)

---

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [April 6, 2023, 10:20am UTC](https://forums.creativeclouddeveloper.com/t/tailwind-not-all-classes-functioning/6153/3 "2023-04-06T10:20:16Z")

</div>

Ah! I think that post was why I had it in the back of my head that UXP doesn’t implement a full CSS engine.  
I’ve found that at least in terms of text classes a full restart of the plugin (including Webpack) seems to solve the issue; well, at least in terms of vanilla HTML, I’m yet to fully test it with Spectrum components.

@Erin_Finnegan would it be possible to get a list of available CSS added to the docs? It would save a lot of headbanging!

---

<div class="post-metadata">

**Author:** ![Erin\_Finnegan](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/erin_finnegan/32/100_2.png) [@Erin\_Finnegan](https://forums.creativeclouddeveloper.com/u/Erin_Finnegan)\
**Post date:** [April 6, 2023, 1:21pm UTC](https://forums.creativeclouddeveloper.com/t/tailwind-not-all-classes-functioning/6153/4 "2023-04-06T13:21:12Z")

</div>

Absolutely - this is a good one for @pkrishna

---

<div class="post-metadata">

**Author:** ![bbogdan](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/bbogdan/32/2272_2.png) [@bbogdan](https://forums.creativeclouddeveloper.com/u/bbogdan)\
**Post date:** [December 23, 2023, 11:48am UTC](https://forums.creativeclouddeveloper.com/t/tailwind-not-all-classes-functioning/6153/5 "2023-12-23T11:48:47Z")

</div>

I had the same problem when developing a web application that should run on Zebra scanner devices (Android). As I remember, I also had a problem with the `bg-` class, specifically when I tried to use transparency, for example, `bg-white/50`. As I saw the Tailwind sets it by using the `rgb(255 255 255 / 50%)`, but I found a solution by using an inline style with `rgba(255, 255, 255, 0.5)`. This worked on that Zebra scanner device just right 🙂 Is there a list of available classes?

---

<div class="post-metadata">

**Author:** ![Maher](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/maher/32/1432_2.png) [@Maher](https://forums.creativeclouddeveloper.com/u/Maher)\
**Post date:** [December 24, 2023, 11:04am UTC](https://forums.creativeclouddeveloper.com/t/tailwind-not-all-classes-functioning/6153/6 "2023-12-24T11:04:33Z")

</div>

to new devs reading this : the root issue is CSS support in UXP… not all props are supported and some may never be, using a superset of css (library/framework) will add a layer of obfuscation but under the hood these properties are still needed therefore some classes will not work entirely or partly.  
there’s a discussion about CSS support in the forums and I encourage you to name properties that you think should be supported. I believe the UXP team is likely to add it if it makes sense.

---

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [December 24, 2023, 12:26pm UTC](https://forums.creativeclouddeveloper.com/t/tailwind-not-all-classes-functioning/6153/7 "2023-12-24T12:26:06Z")

</div>

Yeah, basically what @Maher said.  
Even so, I also found Tailwind to be quite janky even with CSS that UXP supports.  
I’ve found [Uno](https://unocss.dev/) to be a much better alternative.
