7.1 KiB · text History e4557c2
// https://tailwindcss.com/docs/configuration
module.exports = {
  content: [
    './f/js/**/*.js',
    '../templates/**/*.html',
  ],
  // Default letter avatars pick a daisyUI semantic color at render time
  // (`avatar_color()` in src/avatar.rs -> `bg-{c} text-{c}-content` in
  // templates/_avatar.html), so the scanner never sees the full class names.
  // Being theme variables, they follow whichever theme is active.
  safelist: [
    ...["primary", "secondary", "accent", "neutral", "info", "success", "warning", "error"]
      .flatMap((c) => [`bg-${c}`, `text-${c}-content`]),
  ],
  daisyui: {
    themes: [
      {
        her: {
          "primary": "#b57979", "secondary": "#d5abab", "accent": "#fef3c7",
          "neutral": "#7f3535", "base-100": "#651d1d",
          "info": "#7dd3fc", "success": "#a7f3d0", "warning": "#fef08a", "error": "#fca5a5",
        },
        afterdark: {
          "primary": "#7B79B5", "secondary": "#ACABD5", "accent": "#fef3c7",
          "neutral": "#38357F", "base-100": "#201D65",
          "info": "#7dd3fc", "success": "#a7f3d0", "warning": "#fef08a", "error": "#fca5a5",
        },
        forest: {
          "primary": "#4ade80", "secondary": "#86efac", "accent": "#fef3c7",
          "neutral": "#166534", "base-100": "#052e16",
          "info": "#7dd3fc", "success": "#a7f3d0", "warning": "#fef08a", "error": "#fca5a5",
        },
        sky: {
          "primary": "#38bdf8", "secondary": "#7dd3fc", "accent": "#fef3c7",
          "neutral": "#0c4a6e", "base-100": "#082f49",
          "info": "#7dd3fc", "success": "#a7f3d0", "warning": "#fef08a", "error": "#fca5a5",
        },
        clays: {
          "primary": "#d97706", "secondary": "#f59e0b", "accent": "#fef3c7",
          "neutral": "#92400e", "base-100": "#451a03",
          "info": "#7dd3fc", "success": "#a7f3d0", "warning": "#fef08a", "error": "#fca5a5",
        },
        stones: {
          "primary": "#6b7280", "secondary": "#9ca3af", "accent": "#fef3c7",
          "neutral": "#57534e", "base-100": "#292524",
          "info": "#7dd3fc", "success": "#a7f3d0", "warning": "#fef08a", "error": "#fca5a5",
        },
        // "blueprint": navy and cyan -- the same definition gitgud, waxx and
        // movie_monster carry (party-slut has the hex form of it, which is
        // this clipped to sRGB). The accent is the yellow the neiam themes
        // share, so callouts stand out against the deep paper-blue the way
        // annotations do on a real blueprint. Written in oklch, with every
        // -content colour spelled out, so it renders the same as the v5
        // definition rather than daisyUI's generated contents.
        blueprint: {
          "color-scheme": "dark",
          "primary": "oklch(68% 0.18 248)",
          "primary-content": "oklch(15% 0.05 248)",
          "secondary": "oklch(82% 0.10 240)",
          "secondary-content": "oklch(15% 0.05 240)",
          "accent": "oklch(96% 0.058 96)",
          "accent-content": "oklch(10% 0.010 96)",
          "neutral": "oklch(40% 0.16 253)",
          "neutral-content": "oklch(91% 0.05 235)",
          "base-100": "oklch(28% 0.12 252)",
          "base-200": "oklch(24% 0.11 252)",
          "base-300": "oklch(20% 0.10 252)",
          "base-content": "oklch(91% 0.05 235)",
          "info": "oklch(83% 0.101 230)",
          "info-content": "oklch(15% 0.05 230)",
          "success": "oklch(90% 0.089 164)",
          "success-content": "oklch(15% 0.05 164)",
          "warning": "oklch(95% 0.124 102)",
          "warning-content": "oklch(15% 0.05 102)",
          "error": "oklch(81% 0.103 20)",
          "error-content": "oklch(15% 0.05 20)",
          // v5's --radius-box / -field / -selector and --border. Its
          // --size-*, --depth and --noise have no v4 counterpart.
          "--rounded-box": "0.5rem",
          "--rounded-btn": "0.25rem",
          "--rounded-badge": "1rem",
          "--border-btn": "1px",
        },
        // The light/dark pair, shared with bigtrippr and dms so the family
        // looks the same across apps. These two are what "system" resolves
        // to, and (with blueprint) the ones declaring a `color-scheme`, so the
        // browser renders form controls and scrollbars to match. Kept after the
        // custom themes so the array's first entry -- the one daisyUI puts on
        // :root -- is unchanged.
        light: {
          "color-scheme": "light",
          "primary": "oklch(64% 0.076 19)",
          "primary-content": "oklch(98% 0.010 19)",
          "secondary": "oklch(55% 0.060 19)",
          "secondary-content": "oklch(98% 0.010 19)",
          "accent": "oklch(0% 0 0)",
          "accent-content": "oklch(100% 0 0)",
          "neutral": "oklch(44% 0.017 285.786)",
          "neutral-content": "oklch(98% 0 0)",
          "base-100": "oklch(98% 0.008 24)",
          "base-200": "oklch(96% 0.014 24)",
          "base-300": "oklch(92% 0.022 24)",
          "base-content": "oklch(25% 0.050 24)",
          "info": "oklch(62% 0.214 259.815)",
          "info-content": "oklch(97% 0.014 254.604)",
          "success": "oklch(70% 0.14 182.503)",
          "success-content": "oklch(98% 0.014 180.72)",
          "warning": "oklch(66% 0.179 58.318)",
          "warning-content": "oklch(98% 0.022 95.277)",
          "error": "oklch(58% 0.253 17.585)",
          "error-content": "oklch(96% 0.015 12.422)",
          "--rounded-box": "0.5rem",
          "--rounded-btn": "0.25rem",
          "--rounded-badge": "0.25rem",
          "--border-btn": "1.5px",
        },
        dark: {
          "color-scheme": "dark",
          "primary": "oklch(64% 0.076 19)",
          "primary-content": "oklch(10% 0.010 19)",
          "secondary": "oklch(58% 0.090 19)",
          "secondary-content": "oklch(98% 0.010 19)",
          // A rose in primary's hue family rather than daisyUI's violet, held
          // light enough to read on a base-100 at 30% lightness -- the depth
          // comes from hue and chroma, not from going literally dark.
          "accent": "oklch(64% 0.135 15)",
          "accent-content": "oklch(10% 0.012 15)",
          "neutral": "oklch(37% 0.044 257.287)",
          "neutral-content": "oklch(98% 0.003 247.858)",
          "base-100": "oklch(30.33% 0.016 252.42)",
          "base-200": "oklch(25.26% 0.014 253.1)",
          "base-300": "oklch(20.15% 0.012 254.09)",
          "base-content": "oklch(97.807% 0.029 256.847)",
          "info": "oklch(58% 0.158 241.966)",
          "info-content": "oklch(97% 0.013 236.62)",
          "success": "oklch(60% 0.118 184.704)",
          "success-content": "oklch(98% 0.014 180.72)",
          "warning": "oklch(66% 0.179 58.318)",
          "warning-content": "oklch(98% 0.022 95.277)",
          "error": "oklch(58% 0.253 17.585)",
          "error-content": "oklch(96% 0.015 12.422)",
          "--rounded-box": "0.5rem",
          "--rounded-btn": "0.25rem",
          "--rounded-badge": "0.25rem",
          "--border-btn": "1.5px",
        },
      },
      "lofi",
      "black",
    ],
  },
  plugins: [
    require("daisyui"),
    require("@tailwindcss/forms"),
    // `prose` for rendered markdown post bodies.
    require("@tailwindcss/typography"),
  ],
}