Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go
5.0 KB
Raw Blame
@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";
@import "../../../packages/ui/styles/tokens.css";
@import "../../../packages/ui/styles/theme-variables.css";
@import "../../../packages/ui/styles/appearance.css";
@import "../../../packages/ui/styles/base.css";
@import "./custom.css";
@import "./landing.css";

/* The marketing site is light-only: `.landing-light` re-declares the tokens
   (custom.css), and `dark:` utilities inside it must not fire either. The
   exclusion sits in `:where()` so `dark:` keeps its (0,2,0) specificity. */
@custom-variant dark (&:is(.dark *):where(:not(.landing-light, .landing-light *)));

@source "../../../packages/ui/**/*.{ts,tsx}";
@source "../../../packages/core/**/*.{ts,tsx}";
@source "../../../packages/views/**/*.{ts,tsx}";
@source "../../../packages/ee/**/*.{ts,tsx}";

/* Font stack. `--font-inter` is the next/font Inter family (+ its synthetic
   size-adjusted fallback), set on <html> by inter.variable in app/layout.tsx.
   We compose `--font-sans` here in static CSS — rather than baking the CJK tail
   into next/font's `fallback` — so it can be overridden per `<html lang>` and
   stays CSP-safe (no inline <style>). Tailwind's `font-sans` utility resolves
   `var(--font-sans)` (see packages/ui/styles/tokens.css `@theme inline`).

   Default (en / zh / ko): Latin chars render with Inter; CJK chars fall through
   to the platform Chinese fonts, then Korean. Chinese MUST stay before Korean so
   zh users never get Korean Hanja glyph shapes (Hangul is a separate Unicode
   block, so ko users still get Korean fonts for Hangul). Kept in sync with
   apps/desktop/src/renderer/src/globals.css. */
:root {
  /* --font-ui and --font-cjk are set by the Appearance settings
     (packages/core/appearance); unset, the stack is Inter + the CJK chain. */
  --font-sans: var(--font-ui, var(--font-inter)), var(--font-cjk, var(--font-cjk-sans));
  --font-cjk-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Noto Sans CJK SC", "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans CJK KR", sans-serif;
  --font-mono: var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
  --font-serif: var(--font-source-serif), ui-serif, "Iowan Old Style", "Apple Garamond",
    Baskerville, "Times New Roman", serif;
  /* Latin-only faces the Appearance settings can pick, over the next/font
     families from app/layout.tsx. Desktop defines the same names. The CJK
     font follows them, so they name families only: a generic family would
     match Han first. */
  --font-ui-inter: var(--font-inter);
  --font-ui-serif: var(--font-source-serif), "Iowan Old Style", "Apple Garamond",
    Baskerville, "Times New Roman";
  --font-ui-mono: var(--font-geist-mono);
  --font-code-jetbrains: var(--font-jetbrains-mono);
}

/* Japanese: Kanji are Han ideographs sharing the same Unicode block as Chinese,
   and CSS font-fallback order is NOT affected by `<html lang>` — so the
   Chinese-first default above would hand Japanese users Chinese glyph shapes
   for shared ideographs. Promote a Japanese-first CJK chain only for Japanese.
   `[lang|="ja"]` is the BCP-47 language-range selector: it matches exactly `ja`
   or `ja-<region>` (layout.tsx emits `ja-JP`), never unrelated 3-letter subtags
   such as `jam`. Inter still leads for Latin; zh/ko remain as a deep fallback. */
html[lang|="ja"] {
  --font-cjk-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP",
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Noto Sans CJK SC", "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans CJK KR", sans-serif;
}

/* Traditional Chinese: the default stack is Simplified-first, which hands zh-TW
   users Simplified glyph shapes for every ideograph the two share a code point
   for. Promote the Traditional families for that locale only (layout.tsx emits
   `zh-TW` for zh-Hant). Kept in sync with the desktop stack. */
html[lang="zh-TW"] {
  --font-cjk-sans: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", "PingFang SC",
    "Microsoft YaHei", "Noto Sans CJK SC", "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans CJK KR", sans-serif;
}

/* Safe area. viewport-fit=cover (app/layout.tsx) lets the page reach under
   the camera and rounded corners, so every page keeps its content clear of
   the left and right insets here. Top and bottom are left to whatever is
   pinned to those edges: centred pages never reach them, and shrinking the
   body would clip the `h-svh` layouts inside it. The app shell insets all
   four sides itself, painting the strips in its own colours. Each side reads
   its own inset: on iPhone Duo the camera reserves only one of them. */
@layer base {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  body:has([data-app-shell]) {
    padding-left: 0;
    padding-right: 0;
  }
}