mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-22 21:50:42 -05:00
235 lines
9.4 KiB
CSS
235 lines
9.4 KiB
CSS
@import 'tailwindcss';
|
|
|
|
@config '../tailwind.config.js';
|
|
|
|
@theme {
|
|
--animate-cursor-pulse: cursor-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
|
|
@keyframes cursor-pulse {
|
|
50% {
|
|
opacity: 0.25;
|
|
}
|
|
}
|
|
|
|
--font-sans:
|
|
var(--app-font-family, -apple-system), BlinkMacSystemFont, 'Inter', 'Vazirmatn', ui-sans-serif,
|
|
system-ui, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif, 'Helvetica Neue',
|
|
Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
--font-primary: var(--font-sans);
|
|
--font-secondary: var(--font-sans);
|
|
|
|
--color-gray-50: oklch(0.98 0 0);
|
|
--color-gray-100: oklch(0.94 0 0);
|
|
--color-gray-200: oklch(0.92 0 0);
|
|
--color-gray-300: oklch(0.85 0 0);
|
|
--color-gray-400: oklch(0.77 0 0);
|
|
--color-gray-500: oklch(0.69 0 0);
|
|
--color-gray-600: oklch(0.51 0 0);
|
|
--color-gray-700: oklch(0.42 0 0);
|
|
--color-gray-800: oklch(0.32 0 0);
|
|
--color-gray-850: oklch(0.27 0 0);
|
|
--color-gray-900: oklch(0.2 0 0);
|
|
--color-gray-950: oklch(0.16 0 0);
|
|
}
|
|
|
|
/*
|
|
`base-*` is the UI colour scale; `gray-*` stays plain grey. `base-0` and
|
|
`base-1000` are its light and dark ends (white and black by default). Each
|
|
step reads `--app-base-*` and otherwise falls back to grey (or white/black),
|
|
so the default look and legacy custom CSS that overrides `--color-gray-*`
|
|
keep working. `inline` resolves the fallback per element.
|
|
*/
|
|
@theme inline static {
|
|
--color-base-0: var(--app-base-0, #fff);
|
|
--color-base-50: var(--app-base-50, var(--color-gray-50));
|
|
--color-base-100: var(--app-base-100, var(--color-gray-100));
|
|
--color-base-200: var(--app-base-200, var(--color-gray-200));
|
|
--color-base-300: var(--app-base-300, var(--color-gray-300));
|
|
--color-base-400: var(--app-base-400, var(--color-gray-400));
|
|
--color-base-500: var(--app-base-500, var(--color-gray-500));
|
|
--color-base-600: var(--app-base-600, var(--color-gray-600));
|
|
--color-base-700: var(--app-base-700, var(--color-gray-700));
|
|
--color-base-800: var(--app-base-800, var(--color-gray-800));
|
|
--color-base-850: var(--app-base-850, var(--color-gray-850));
|
|
--color-base-900: var(--app-base-900, var(--color-gray-900));
|
|
--color-base-950: var(--app-base-950, var(--color-gray-950));
|
|
--color-base-1000: var(--app-base-1000, #000);
|
|
}
|
|
|
|
/* Grey, white and black UI utilities moved to `base`; keep them for external HTML and custom CSS. */
|
|
@source inline('{hover:,dark:,dark:hover:,}{bg,text,border}-{gray-{50,{100..900..100},850,950},white,black}');
|
|
|
|
@layer theme {
|
|
html.oled-dark {
|
|
--color-gray-800: #101010;
|
|
--color-gray-850: #050505;
|
|
--color-gray-900: #000000;
|
|
--color-gray-950: #000000;
|
|
}
|
|
|
|
/*
|
|
Two-colour themes: set `--app-bg` (background) and `--app-fg` (strongest
|
|
text) and `--app-base-*` is mixed from them. Unset, the mixes are invalid
|
|
and `base` stays grey. With the default seeds (light: white/black, dark:
|
|
#171717/white) the mixes reproduce the greys.
|
|
*/
|
|
html:not(.dark) {
|
|
--app-base-0: color-mix(in oklab, var(--app-fg) 0%, var(--app-bg));
|
|
--app-base-50: color-mix(in oklab, var(--app-fg) 2%, var(--app-bg));
|
|
--app-base-100: color-mix(in oklab, var(--app-fg) 6%, var(--app-bg));
|
|
--app-base-200: color-mix(in oklab, var(--app-fg) 8%, var(--app-bg));
|
|
--app-base-300: color-mix(in oklab, var(--app-fg) 15%, var(--app-bg));
|
|
--app-base-400: color-mix(in oklab, var(--app-fg) 23%, var(--app-bg));
|
|
--app-base-500: color-mix(in oklab, var(--app-fg) 31%, var(--app-bg));
|
|
--app-base-600: color-mix(in oklab, var(--app-fg) 49%, var(--app-bg));
|
|
--app-base-700: color-mix(in oklab, var(--app-fg) 58%, var(--app-bg));
|
|
--app-base-800: color-mix(in oklab, var(--app-fg) 68%, var(--app-bg));
|
|
--app-base-850: color-mix(in oklab, var(--app-fg) 73%, var(--app-bg));
|
|
--app-base-900: color-mix(in oklab, var(--app-fg) 80%, var(--app-bg));
|
|
--app-base-950: color-mix(in oklab, var(--app-fg) 84%, var(--app-bg));
|
|
--app-base-1000: color-mix(in oklab, var(--app-fg) 100%, var(--app-bg));
|
|
}
|
|
|
|
html.dark {
|
|
--app-base-0: color-mix(in oklab, var(--app-fg) 100%, var(--app-bg));
|
|
--app-base-50: color-mix(in oklab, var(--app-fg) 97.5%, var(--app-bg));
|
|
--app-base-100: color-mix(in oklab, var(--app-fg) 92.5%, var(--app-bg));
|
|
--app-base-200: color-mix(in oklab, var(--app-fg) 90%, var(--app-bg));
|
|
--app-base-300: color-mix(in oklab, var(--app-fg) 81.25%, var(--app-bg));
|
|
--app-base-400: color-mix(in oklab, var(--app-fg) 71.25%, var(--app-bg));
|
|
--app-base-500: color-mix(in oklab, var(--app-fg) 61.25%, var(--app-bg));
|
|
--app-base-600: color-mix(in oklab, var(--app-fg) 38.75%, var(--app-bg));
|
|
--app-base-700: color-mix(in oklab, var(--app-fg) 27.5%, var(--app-bg));
|
|
--app-base-800: color-mix(in oklab, var(--app-fg) 15%, var(--app-bg));
|
|
--app-base-850: color-mix(in oklab, var(--app-fg) 8.75%, var(--app-bg));
|
|
--app-base-900: color-mix(in oklab, var(--app-fg) 0%, var(--app-bg));
|
|
--app-base-950: color-mix(in oklab, var(--app-bg), black 20%);
|
|
--app-base-1000: color-mix(in oklab, var(--app-bg), black 60%);
|
|
}
|
|
}
|
|
|
|
/* Markdown (`prose`) colours follow the theme too; fallbacks are the plugin's own colours. */
|
|
@layer utilities {
|
|
.prose {
|
|
--tw-prose-body: var(--app-base-700, oklch(37.3% 0.034 259.733));
|
|
--tw-prose-headings: var(--app-base-900, oklch(21% 0.034 264.665));
|
|
--tw-prose-lead: var(--app-base-600, oklch(44.6% 0.03 256.802));
|
|
--tw-prose-links: var(--app-base-900, oklch(21% 0.034 264.665));
|
|
--tw-prose-bold: var(--app-base-900, oklch(21% 0.034 264.665));
|
|
--tw-prose-counters: var(--app-base-500, oklch(55.1% 0.027 264.364));
|
|
--tw-prose-bullets: var(--app-base-300, oklch(87.2% 0.01 258.338));
|
|
--tw-prose-hr: var(--app-base-200, oklch(92.8% 0.006 264.531));
|
|
--tw-prose-quotes: var(--app-base-900, oklch(21% 0.034 264.665));
|
|
--tw-prose-quote-borders: var(--app-base-200, oklch(92.8% 0.006 264.531));
|
|
--tw-prose-captions: var(--app-base-500, oklch(55.1% 0.027 264.364));
|
|
--tw-prose-kbd: var(--app-base-900, oklch(21% 0.034 264.665));
|
|
--tw-prose-code: var(--app-base-900, oklch(21% 0.034 264.665));
|
|
--tw-prose-pre-code: var(--app-base-200, oklch(92.8% 0.006 264.531));
|
|
--tw-prose-pre-bg: var(--app-base-800, oklch(27.8% 0.033 256.848));
|
|
--tw-prose-th-borders: var(--app-base-300, oklch(87.2% 0.01 258.338));
|
|
--tw-prose-td-borders: var(--app-base-200, oklch(92.8% 0.006 264.531));
|
|
--tw-prose-invert-body: var(--app-base-300, oklch(87.2% 0.01 258.338));
|
|
--tw-prose-invert-headings: var(--app-base-0, #fff);
|
|
--tw-prose-invert-lead: var(--app-base-400, oklch(70.7% 0.022 261.325));
|
|
--tw-prose-invert-links: var(--app-base-0, #fff);
|
|
--tw-prose-invert-bold: var(--app-base-0, #fff);
|
|
--tw-prose-invert-counters: var(--app-base-400, oklch(70.7% 0.022 261.325));
|
|
--tw-prose-invert-bullets: var(--app-base-600, oklch(44.6% 0.03 256.802));
|
|
--tw-prose-invert-hr: var(--app-base-700, oklch(37.3% 0.034 259.733));
|
|
--tw-prose-invert-quotes: var(--app-base-100, oklch(96.7% 0.003 264.542));
|
|
--tw-prose-invert-quote-borders: var(--app-base-700, oklch(37.3% 0.034 259.733));
|
|
--tw-prose-invert-captions: var(--app-base-400, oklch(70.7% 0.022 261.325));
|
|
--tw-prose-invert-kbd: var(--app-base-0, #fff);
|
|
--tw-prose-invert-code: var(--app-base-0, #fff);
|
|
--tw-prose-invert-pre-code: var(--app-base-300, oklch(87.2% 0.01 258.338));
|
|
--tw-prose-invert-pre-bg: color-mix(in oklab, var(--app-base-1000, #000) 50%, transparent);
|
|
--tw-prose-invert-th-borders: var(--app-base-600, oklch(44.6% 0.03 256.802));
|
|
--tw-prose-invert-td-borders: var(--app-base-700, oklch(37.3% 0.034 259.733));
|
|
}
|
|
}
|
|
|
|
/*
|
|
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
|
so we've added these compatibility styles to make sure everything still
|
|
looks the same as it did with Tailwind CSS v3.
|
|
|
|
If we ever want to remove these styles, we need to add an explicit border
|
|
color utility to any element that depends on these defaults.
|
|
*/
|
|
@layer base {
|
|
*,
|
|
::after,
|
|
::before,
|
|
::backdrop,
|
|
::file-selector-button {
|
|
border-color: var(--color-base-200, currentColor);
|
|
}
|
|
}
|
|
|
|
@layer base {
|
|
html {
|
|
font-family: var(--font-sans);
|
|
}
|
|
|
|
pre {
|
|
font-family:
|
|
-apple-system, BlinkMacSystemFont, 'Inter', 'Vazirmatn', ui-sans-serif, system-ui, 'Segoe UI',
|
|
Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif, 'Helvetica Neue', Arial,
|
|
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
}
|
|
|
|
pre {
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
button {
|
|
@apply cursor-pointer;
|
|
}
|
|
|
|
input::placeholder,
|
|
textarea::placeholder {
|
|
color: var(--color-base-400);
|
|
}
|
|
|
|
input[type='checkbox'] {
|
|
@apply appearance-none size-3.5 align-middle bg-white border border-base-300 rounded transition cursor-pointer focus:ring-2 focus:ring-blue-500 focus:outline-none dark:bg-base-800 dark:border-base-600 self-center;
|
|
/* Center the custom mark */
|
|
display: inline-block;
|
|
position: relative;
|
|
}
|
|
|
|
input[type='checkbox']:checked {
|
|
@apply bg-blue-600 border-blue-600;
|
|
}
|
|
|
|
input[type='checkbox']:after {
|
|
content: '';
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
/* Hide by default */
|
|
opacity: 0;
|
|
transition: opacity 0.2s;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
pointer-events: none;
|
|
/* SVG checkmark as background image */
|
|
background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M4 8l3 3l5-5"/></svg>')
|
|
center/80% no-repeat;
|
|
}
|
|
|
|
input[type='checkbox']:checked:after {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@layer utilities {
|
|
.font-primary,
|
|
.font-secondary {
|
|
font-family: var(--font-sans);
|
|
}
|
|
}
|
|
|
|
@custom-variant hover (&:hover);
|