Skip to content

Added TailwindCSS library#525

Closed
Klakurka wants to merge 10 commits intomasterfrom
chore/introduce-tailwindcss-lib
Closed

Added TailwindCSS library#525
Klakurka wants to merge 10 commits intomasterfrom
chore/introduce-tailwindcss-lib

Conversation

@Klakurka
Copy link
Member

@Klakurka Klakurka commented Jul 29, 2025

Related to #524

Description

Introduces TailwindCSS, including 1 migration (Button.tsx) - with the eventual goal of completely migrating away from Material UI.

Test plan

Make sure nothing major is broken - pay close attention to the Button.tsx changes as there are definitely some things that need to be fixed up. Have a look at the demo/index.html page to see some styling regressions (eg. when the text has to go to 2 lines due to being too long).

Remarks

v3.4 was chosen because v4.x apparently doesn't work as well with microbundle and might be better at least until we've completely migrated away from Material UI.

@Klakurka Klakurka added this to the Phase 3 milestone Jul 29, 2025
@Klakurka Klakurka requested a review from chedieck July 29, 2025 16:19
@Klakurka Klakurka self-assigned this Jul 29, 2025
@Klakurka Klakurka added enhancement (behind the scenes) Stuff that users won't see enhancement (development) Improvement to the development situation labels Jul 29, 2025
@Klakurka Klakurka changed the title Added TailwindCSS library (no styles applied). Added TailwindCSS library (no styles applied) Jul 29, 2025
@Klakurka Klakurka requested a review from johnkuney July 29, 2025 16:20
Copy link
Collaborator

@johnkuney johnkuney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried adding a test div with some tailwind classes and the styles did not come through.
Just added it in the widget component and did yarn build (in react dir) and then yarn dev (in paybutton dir)

Messed with it for a bit to try to get it to work but was not able to get any tailwind styles to come through

@Klakurka Klakurka requested a review from johnkuney July 30, 2025 00:02
@johnkuney
Copy link
Collaborator

I was only able to get the tailwind styles (of a test div) to work in the demo if I add an import tailwinds.css in the index.html. Is that the expected behavior?

I dont quite follow the tailwind.md....or the commands arent working for me. Should npm run build (in react) and then npm run dev (in paybutton) make any tailwinds styles added to components work in the demo? or does it need the npm run watch:tailwind also? I tried them all I believe

@Klakurka Klakurka changed the title Added TailwindCSS library (no styles applied) Added TailwindCSS library Jul 30, 2025
@Klakurka
Copy link
Member Author

OK - ready again for testing.

Button.tsx was mostly migrated over which you can use as an example.

@johnkuney
Copy link
Collaborator

I still don't think the tailwind styles are actually coming through. It looks like only the inline styles are getting applied, probably because they are not defined by tailwind utility classes. Those values are actual hard coded css string properties.

If you inspect a button you can see the baseClasses classnames are on the element, but the actual css is not there. For example it does not have display: inline-flex applied.

I also tried adding some more tailwind styles to the button container div and they did not come through.

I'm also seeing some weirdness with the button height / text. If the text is too long its overflowing the button.

Sorry to say we may want to step back from this one and consider if its worth it. My initial reaction was its better because I like tailwinds, but really a lot of the styles are applied outside the markup anyway (through functions and makeStyles) and not sure we gain much from using utility classes for the values vs just the actual string values we want.

We can still migrate away MUI, would just need to replicate any of the elements with regular html and css...

Screenshot 2025-07-30 at 10 53 55 AM Screenshot 2025-07-30 at 11 00 30 AM

@Klakurka
Copy link
Member Author

Klakurka commented Aug 6, 2025

We do have higher prio things to worry about - will come back to this another time.

@Klakurka Klakurka closed this Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement (behind the scenes) Stuff that users won't see enhancement (development) Improvement to the development situation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants