Skip to content

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:

  1. Load the script and configure JGC.

  2. 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>
  1. Turn on the autoMode or tag the single scripts

  2. Then you can try to avoid the script's flickering

  3. 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.