Skip to content

📧✨ Beautiful email. For everyone.

5.6 KB
Raw Blame
@import 'tailwindcss' source(none);
@custom-variant light (&:where([data-theme='light'], [data-theme='light'] *));
@source "./";
@source "../../../apps/desktop/src/renderer/src";
/* Bundle the font locally so the desktop never needs a remote font request. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/InterVariable.woff2') format('woff2');
}

@theme inline {
  --color-background: var(--bg);
  --color-foreground: var(--text);
  --color-sidebar: var(--sidebar);
  --color-surface: var(--surface);
  --color-raised: var(--raised);
  --color-field: var(--field);
  --color-field-hover: var(--field-hover);
  --color-hover: var(--hover);
  --color-selected: var(--selected);
  --color-strong: var(--text-strong);
  --color-secondary: var(--secondary);
  --color-muted: var(--muted);
  --color-faint: var(--faint);
  --color-border: var(--border);
  --color-border-strong: var(--border-strong);
  --color-primary: var(--accent);
  --color-primary-solid: var(--accent-solid);
  --color-primary-tint: var(--accent-tint);
  --color-success: var(--green);
  --color-danger: var(--red);
  --color-star: var(--star);
  --color-draft: var(--draft);
  --color-skeleton: var(--skeleton);
  --shadow-popup: var(--shadow);
}

@theme {
  /* Keep spacing independent of the desktop's 14px root font size. */
  --spacing: 4px;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  --radius-xs: 4px;
  --radius-sm: 5px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --radius-2xl: 12px;
  --radius-3xl: 20px;
}

@layer base {
  :root {
    color-scheme: dark;
    --bg: #171718;
    --sidebar: #111112;
    --surface: #1e1e20;
    --raised: #252527;
    /* Form fields sit slightly above the surface they're on, so they read as places to type. */
    --field: #ffffff08;
    --field-hover: #ffffff0d;
    --hover: #242426;
    --selected: #2a2a2c;
    --accent: #aaa6ec;
    --accent-solid: #6d67cb;
    --accent-tint: #aaa6ec12;
    --text: #dedee1;
    --text-strong: #f2f2f3;
    --secondary: #b7b7bd;
    --muted: #96969e;
    --faint: #77777f;
    --border: #ffffff0b;
    --border-strong: #ffffff1a;
    --green: #76bc9a;
    --red: #ea9198;
    --star: #d4b36e;
    /* The label on unsent drafts, so they never pass for sent mail. */
    --draft: #d4b36e;
    --skeleton: #ffffff0d;
    --shadow: 0 24px 80px #0005, 0 4px 16px #0003;
    font-family:
      Inter,
      -apple-system,
      BlinkMacSystemFont,
      'Segoe UI',
      sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
  }
  :root[data-theme='light'] {
    color-scheme: light;
    --bg: #fcfcfd;
    --sidebar: #f7f8fa;
    --surface: #ffffff;
    --raised: #ffffff;
    --field: #ffffff;
    --field-hover: #fbfbfc;
    --hover: #eff0f2;
    --selected: #e8e9ec;
    --accent: #635db5;
    --accent-solid: #6962c1;
    --accent-tint: #6962c10c;
    --text: #383a40;
    --text-strong: #202127;
    --secondary: #5d6068;
    --muted: #70737d;
    --faint: #838691;
    --border: #17191f0b;
    --border-strong: #17191f1d;
    --green: #3d9066;
    --red: #b94d55;
    --star: #b8892c;
    --draft: #8f661a;
    --skeleton: #17191f0e;
    --shadow: 0 18px 70px #10121a1a;
  }
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
  }
  button,
  input,
  textarea {
    font: inherit;
  }
  button {
    cursor: pointer;
    color: inherit;
  }
  button:disabled {
    cursor: default;
    opacity: 0.4;
  }
  button,
  a,
  input,
  textarea,
  [tabindex] {
    outline: none;
  }
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 5px;
  }
  ::selection {
    background: color-mix(in srgb, var(--accent) 28%, transparent);
  }
  input,
  textarea {
    color: var(--text);
    background: var(--field);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 9px 11px;
    width: 100%;
  }
  input::placeholder,
  textarea::placeholder {
    color: var(--muted);
  }
  input:focus,
  textarea:focus {
    border-color: var(--accent-solid);
  }
  label {
    display: block;
    font-size: 12px;
    color: var(--secondary);
  }
  a {
    color: var(--accent);
    text-decoration: none;
  }
  button svg {
    flex-shrink: 0;
  }
  svg {
    vertical-align: middle;
  }
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    background-clip: padding-box;
    border: 1px solid transparent;
    border-radius: 20px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background-color: var(--faint);
  }
  ::-webkit-scrollbar-thumb:active {
    background-color: var(--muted);
  }
  ::-webkit-scrollbar-corner {
    background: transparent;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 18px;
    padding: 0 4px;
    font-family: inherit;
    font-size: 10px;
    line-height: 1;
    color: var(--muted);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
  }
  button:active:not(:disabled) {
    transition-duration: 60ms;
  }
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}