Developer SDK

Tauri examples

Install the SDK · View source on GitHub ↗

embed/ui/style.css

Text
/* The embed window's layout, in the system's light or dark appearance. */

:root {
  color-scheme: light dark;
  --text: #1f2328;
  --muted: #59636e;
  --surface: #ffffff;
  --panel: #f6f8fa;
  --border: #d1d9e0;
  --accent: #2563eb;
  --warning: #9a3412;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6edf3;
    --muted: #9198a1;
    --surface: #0d1117;
    --panel: #151b23;
    --border: #3d444d;
    --accent: #4c8dff;
    --warning: #f0883e;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  font-size: 20px;
  margin: 0 0 8px;
}

.intro {
  color: var(--muted);
  margin: 0 0 12px;
}

.sign-in {
  display: grid;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.sign-in label {
  color: var(--muted);
  font-size: 13px;
}

input {
  font: inherit;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 6px;
}

.controls {
  display: flex;
  gap: 8px;
}

button {
  font: inherit;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

button#start:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

button:disabled,
input:disabled {
  opacity: 0.5;
}

.fields {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 16px 0;
}

.fields dt {
  color: var(--muted);
}

.fields dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.fields dd.id {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

.message {
  color: var(--warning);
}

.state-dir,
.note {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

details {
  margin: 12px 0;
}

details pre {
  max-height: 240px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  white-space: pre-wrap;
}