-
Notifications
You must be signed in to change notification settings - Fork 2
How to install JGC on a website (eg. WordPress) that uses a different CSS framework
Francesco Mugnai edited this page Apr 1, 2022
·
1 revision
This is a very general question, but you can try to do something like this:
-
Load the script and configure JGC.
-
Install TailwindCSS using the CDN and set it in this way:
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
prefix: 'jgc-', // choose a custom prefix to avoid conflicts with the theme
important: true, // this will mark all the Tailwind’s utilities with !important.
corePlugins: {
preflight: false, // and you probably need this option to disable the generation of base styles
}
};
</script>
-
Turn on the autoMode or tag the single scripts
-
Then you can try to avoid the script's flickering
-
If you see something is wrong, it's because your CSS is changing the appearance of JGC. Try to override the CSS rules of the theme (maybe the
<button>
style or reset some margins).
If you cache the scripts, refresh the cache.