Utopia and TailwindCSS

up:: TailwindCSS tailwind.config.js

module.exports = {
  theme: {
    fontSize: {
      xs: "var(--step--2)",
      sm: "var(--step--1)",
      base: "var(--step-0)",
      lg: "var(--step-1)",
      xl: "var(--step-2)",
      "2xl": "var(--step-3)",
      "3xl": "var(--step-4)",
      "4xl": "var(--step-5)",
    },
    extend: {
      spacing: {
        "3xs": "var(--space-3xs)",
        "2xs": "var(--space-2xs)",
        xs: "var(--space-xs)",
        sm: "var(--space-s)",
        md: "var(--space-m)",
        lg: "var(--space-l)",
        xl: "var(--space-xl)",
        "2xl": "var(--space-2xl)",
        "3xl": "var(--space-3xl)",
      },
    },
  },
};
 

tailwind.css

@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
 
/* Components */
@import "./components/utopia.css";

components/utopia.css (copy and paste your stylesheet from Utopia Type and Space Callculators)

@layer components {
  /* @link https://utopia.fyi/type/calculator?c=320,18,1.2,1240,20,1.333,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */
 
  :root {
    --step--2: clamp(0.7rem, calc(0.81rem + -0.13vw), 0.78rem);
    --step--1: clamp(0.94rem, calc(0.94rem + 0vw), 0.94rem);
    --step-0: clamp(1.13rem, calc(1.08rem + 0.22vw), 1.25rem);
    --step-1: clamp(1.35rem, calc(1.24rem + 0.55vw), 1.67rem);
    --step-2: clamp(1.62rem, calc(1.41rem + 1.05vw), 2.22rem);
    --step-3: clamp(1.94rem, calc(1.59rem + 1.77vw), 2.96rem);
    --step-4: clamp(2.33rem, calc(1.77rem + 2.81vw), 3.95rem);
    --step-5: clamp(2.8rem, calc(1.94rem + 4.28vw), 5.26rem);
 
    --space-3xs: clamp(0.31rem, calc(0.31rem + 0vw), 0.31rem);
    --space-2xs: clamp(0.56rem, calc(0.54rem + 0.11vw), 0.63rem);
    --space-xs: clamp(0.88rem, calc(0.85rem + 0.11vw), 0.94rem);
    --space-s: clamp(1.13rem, calc(1.08rem + 0.22vw), 1.25rem);
    --space-m: clamp(1.69rem, calc(1.62rem + 0.33vw), 1.88rem);
    --space-l: clamp(2.25rem, calc(2.16rem + 0.43vw), 2.5rem);
    --space-xl: clamp(3.38rem, calc(3.24rem + 0.65vw), 3.75rem);
    --space-2xl: clamp(4.5rem, calc(4.33rem + 0.87vw), 5rem);
    --space-3xl: clamp(6.75rem, calc(6.49rem + 1.3vw), 7.5rem);
  }
}