Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

7.3 KB
Raw Blame
@import "tailwindcss";
@import "fumadocs-ui/css/neutral.css";
@import "fumadocs-ui/css/preset.css";
@import "fumadocs-openapi/css/preset.css";

body {
  @apply m-0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family:
    source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
}

:root {
  color-scheme: light;
  --radius: 0.625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);

  --spacing-fd-container: 1000px;
  --canvas: oklch(0.985 0.002 95);
}

/* Fumadocs on the site palette: warm canvas, white cards, black primary. */
:root {
  --color-fd-background: var(--canvas);
  --color-fd-foreground: oklch(0.145 0 0);
  --color-fd-card: oklch(1 0 0);
  --color-fd-card-foreground: oklch(0.145 0 0);
  --color-fd-popover: oklch(1 0 0);
  --color-fd-popover-foreground: oklch(0.145 0 0);
  --color-fd-muted: oklch(0.96 0.003 95);
  --color-fd-muted-foreground: oklch(0.5 0.004 95);
  --color-fd-secondary: oklch(0.975 0.002 95);
  --color-fd-secondary-foreground: oklch(0.205 0 0);
  --color-fd-accent: oklch(0.94 0.004 95);
  --color-fd-accent-foreground: oklch(0.145 0 0);
  --color-fd-border: oklch(0.145 0 0 / 0.08);
  --color-fd-primary: oklch(0.205 0 0);
  --color-fd-primary-foreground: oklch(0.985 0 0);
  --color-fd-ring: oklch(0.708 0 0);
}

#nd-docs-layout,
#nd-sidebar {
  background-color: var(--canvas);
}

@utility container {
  @apply mx-auto px-4;
  @media (width >= 40rem) {
    @apply max-w-[1000px];
  }
}

@theme inline {
  /* Light mode colors */
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-canvas: var(--canvas);

  /* Fonts */
  --font-family-mono:
    var(--font-mono), ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;

  /* Scroll animations */
  --animate-scroll: scroll var(--animation-duration, 40s)
    var(--animation-direction, forwards) linear infinite;

  @keyframes scroll {
    to {
      transform: translate(calc(-50% - 0.5rem));
    }
  }

  --animate-draw-line: draw-line 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  --animate-rise: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes draw-line {
    from {
      stroke-dashoffset: 1800;
    }
    to {
      stroke-dashoffset: 0;
    }
  }
}

/* Extend a block from the container edge to the viewport edge. */
@layer components {
  @media (width >= 48rem) {
    .bleed-right {
      width: calc(100% + max(1rem, (100vw - 1000px) / 2 + 1rem));
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }
    .bleed-left {
      width: calc(100% + max(1rem, (100vw - 1000px) / 2 + 1rem));
      margin-left: calc(-1 * max(1rem, (100vw - 1000px) / 2 + 1rem));
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }
  }
}

/* Surfaces: the one card recipe every marketing page uses. */
@utility surface {
  @apply rounded-2xl bg-white ring-1 ring-black/4;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 12px 32px -16px rgba(0, 0, 0, 0.12);
}

@utility surface-hover {
  @apply transition-[transform,box-shadow] duration-300;
  &:hover {
    transform: translateY(-4px);
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.04),
      0 24px 48px -16px rgba(0, 0, 0, 0.2);
  }
}

@utility window-shadow {
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.18),
    0 8px 24px -12px rgba(0, 0, 0, 0.12);
}

/* Scroll reveal: hidden until the Reveal component sees the element. */
@layer components {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
      opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  @media (prefers-reduced-motion: reduce) {
    .reveal {
      opacity: 1;
      transform: none;
      transition: none;
    }
  }
}

@utility pulled {
  @apply -mx-2 md:-mx-6 lg:-mx-10 xl:-mx-20;
}

@utility center-center {
  @apply flex items-center justify-center text-center;
}

@utility col {
  @apply flex flex-col;
}

@utility row {
  @apply flex flex-row;
}

@utility text-text {
  @apply text-foreground;
}

@utility scrollbar-hidden {
  &::-webkit-scrollbar {
    display: none;
  }
}

@keyframes scroll-testimonials {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.line-before {
  position: relative;
  padding: 16px;
}
.line-before:before {
  content: "";
  display: block;
  position: absolute;
  top: calc(4px * -32);
  bottom: calc(4px * -32);
  left: 0;
  width: 1px;
  background: hsl(var(--foreground) / 0.1);
}
.line-after {
  position: relative;
  padding: 16px;
}
.line-after:after {
  content: "";
  display: block;
  position: absolute;
  top: calc(4px * -32);
  bottom: calc(4px * -32);
  right: 0;
  width: 1px;
  background: hsl(var(--foreground) / 0.1);
}