Jump to content

Switching between CSS Frameworks


Peter Knight
 Share

Recommended Posts

Hey 👋
I'm running a PW site on UIKIT (v3) for many years and I want to migrate to TailWind V4.

Sounds fairly simple. I normally just locally update my templates and CSS.

This time, I want to do add in TW templates concurrently. The idea is I can add/remove content as normal and I thought a good approach might be

1. I have a template switcher in my config

$config->twPreview = true; // Enable Tailwind templates

2. I have a template switcher hook in  site/init.php which updates my css paths etc with a _tw (Tailwind) path

3. All my templates have a duplicate called [template-name]_tw.php

Same for all my includes

It's not going too bad but I didn't factor in for the following
1. I have Matrix field templates and een though I can duplicate with a _tw, the actual field files are hard coded into the PW manager when editing a page

Aside from this, it's not going too bad but am I overlooking a simpler method?

Cheers

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...