Files
computer/cptr/frontend/src/app.css
T
2026-07-06 18:04:52 -05:00

383 lines
8.1 KiB
CSS

@import 'tailwindcss';
@plugin "@tailwindcss/typography";
@custom-variant dark (&:where(.dark, .dark *));
@custom-variant hover (&:hover);
@theme {
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, ui-sans-serif, system-ui, sans-serif;
--font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
/* Exact Open WebUI gray scale - pure neutral, zero chroma */
--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);
}
:root {
--app-text-scale: 1;
--app-bg: #ffffff;
--app-fg: #525252;
--app-fg-muted: color-mix(in oklab, var(--app-fg) 62%, var(--app-bg));
--app-fg-subtle: color-mix(in oklab, var(--app-fg) 48%, var(--app-bg));
--app-border: color-mix(in oklab, var(--app-fg) 10%, transparent);
--app-divider: color-mix(in oklab, var(--app-fg) 8%, transparent);
--app-hover: color-mix(in oklab, var(--app-fg) 6%, transparent);
--app-active: color-mix(in oklab, var(--app-fg) 7%, transparent);
--app-ui-font: var(--font-sans);
}
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--app-border, var(--color-gray-200, currentColor));
}
html,
body {
height: 100dvh;
margin: 0;
overflow: hidden;
overscroll-behavior: none;
scrollbar-width: none;
-ms-overflow-style: none;
background: var(--app-bg);
color: var(--app-fg);
font-family: var(--app-ui-font);
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
display: none;
}
html {
color-scheme: dark light;
touch-action: manipulation;
font-size: calc(1rem * var(--app-text-scale, 1));
}
button {
@apply cursor-pointer;
}
}
/* Scrollbar - Open WebUI style */
::-webkit-scrollbar-thumb {
--tw-border-opacity: 1;
background-color: rgba(215, 215, 215, 0.6);
border-color: rgba(255, 255, 255, var(--tw-border-opacity));
border-radius: 624.9375rem;
border-width: 1px;
}
/* Dark theme scrollbar styles */
.dark ::-webkit-scrollbar-thumb {
background-color: rgba(67, 67, 67, 0.6);
border-color: rgba(0, 0, 0, var(--tw-border-opacity));
}
::-webkit-scrollbar {
height: 0.45rem;
width: 0.45rem;
}
::-webkit-scrollbar-track {
background-color: transparent;
border-radius: 624.9375rem;
}
.scrollbar-hidden,
.scrollbar-none {
scrollbar-width: none;
-ms-overflow-style: none;
}
.scrollbar-hidden::-webkit-scrollbar,
.scrollbar-none::-webkit-scrollbar {
display: none;
}
.scrollbar-hover::-webkit-scrollbar-thumb {
visibility: hidden;
}
.scrollbar-hover:hover::-webkit-scrollbar-thumb {
visibility: visible;
}
.app-theme {
background: var(--app-bg);
color: var(--app-fg);
}
.app-surface {
background: var(--app-bg);
color: var(--app-fg);
border-color: var(--app-border);
}
.app-subtle-surface {
background: var(--app-bg);
color: var(--app-fg);
border-color: var(--app-border);
}
.app-divider {
background: var(--app-divider);
}
.app-muted {
color: var(--app-fg-muted);
}
.app-icon-muted {
color: var(--app-fg-subtle);
}
.app-interactive:hover {
background: var(--app-hover);
color: var(--app-fg);
}
.app-interactive-active {
background: var(--app-active);
color: var(--app-fg);
}
.app-theme :where(option) {
background: var(--app-bg);
color: var(--app-fg);
}
.app-theme:where([class*='border-gray-'], [class*='border-black/'], [class*='border-white/']),
.app-theme :where([class*='border-gray-'], [class*='border-black/'], [class*='border-white/']) {
border-color: var(--app-border);
}
.dark .app-theme:where([class*='dark:border-gray-'], [class*='dark:border-white/']),
.dark .app-theme :where([class*='dark:border-gray-'], [class*='dark:border-white/']) {
border-color: var(--app-border);
}
.app-theme
:where(
[class*='divide-gray-'] > :not(:last-child),
[class*='divide-black/'] > :not(:last-child),
[class*='divide-white/'] > :not(:last-child)
) {
border-color: var(--app-border);
}
.dark .app-theme :where([class*='dark:divide-gray-'] > :not(:last-child)),
.dark .app-theme :where([class*='dark:divide-white/'] > :not(:last-child)) {
border-color: var(--app-border);
}
.app-theme :where([class~='h-px'][class*='bg-gray-'], [class~='h-px'][class*='bg-black/']) {
background: var(--app-divider);
}
.dark .app-theme :where([class~='h-px'][class*='dark:bg-white/']) {
background: var(--app-divider);
}
.app-theme
:where(
[class~='bg-gray-50'],
[class~='bg-gray-50/50'],
[class~='bg-gray-100'],
[class~='bg-gray-200/50']
) {
background: var(--app-hover);
}
.dark
.app-theme
:where(
[class~='dark:bg-white/3'],
[class~='dark:bg-white/4'],
[class~='dark:bg-white/5'],
[class~='dark:bg-white/6'],
[class~='dark:bg-white/8'],
[class~='dark:bg-white/10']
) {
background: var(--app-hover);
}
.app-theme
:where(
[class~='hover:bg-gray-50']:hover,
[class~='hover:bg-gray-100']:hover,
[class~='hover:bg-gray-200']:hover,
[class~='hover:bg-gray-200/60']:hover,
[class~='hover:bg-gray-200/70']:hover
) {
background: var(--app-active);
}
.dark
.app-theme
:where(
[class~='dark:hover:bg-white/3']:hover,
[class~='dark:hover:bg-white/4']:hover,
[class~='dark:hover:bg-white/5']:hover,
[class~='dark:hover:bg-white/6']:hover,
[class~='dark:hover:bg-white/8']:hover,
[class~='dark:hover:bg-white/10']:hover,
[class~='dark:hover:bg-white/12']:hover
) {
background: var(--app-active);
}
.app-theme
:where(
[class~='text-gray-950'],
[class~='text-gray-900'],
[class~='text-gray-800'],
[class~='text-gray-700']
) {
color: var(--app-fg);
}
.dark
.app-theme
:where(
[class~='dark:text-white'],
[class~='dark:text-gray-100'],
[class~='dark:text-gray-200'],
[class~='dark:text-gray-300']
) {
color: var(--app-fg);
}
.app-theme
:where(
[class~='text-gray-600'],
[class~='text-gray-500'],
[class~='text-gray-400'],
[class~='text-gray-300']
) {
color: var(--app-fg-muted);
}
.dark
.app-theme
:where(
[class~='dark:text-gray-400'],
[class~='dark:text-gray-500'],
[class~='dark:text-gray-600'],
[class~='dark:text-gray-700']
) {
color: var(--app-fg-muted);
}
/* CodeMirror - match Open WebUI */
.cm-editor {
height: 100%;
width: 100%;
}
.cm-editor.cm-focused {
outline: none;
}
.dark .cm-editor {
background-color: #000 !important;
}
.dark .cm-gutters {
background-color: #000 !important;
border: none !important;
}
.dark .cm-activeLine {
background-color: rgba(255, 255, 255, 0.04) !important;
}
.dark .cm-activeLineGutter {
background-color: rgba(255, 255, 255, 0.04) !important;
}
:not(.dark) .cm-gutters {
border: none !important;
}
.cm-scroller:active::-webkit-scrollbar-thumb,
.cm-scroller:focus::-webkit-scrollbar-thumb,
.cm-scroller:hover::-webkit-scrollbar-thumb {
visibility: visible;
}
.cm-scroller::-webkit-scrollbar-thumb {
visibility: hidden;
}
.cm-scroller::-webkit-scrollbar-corner {
display: none;
}
/* Shimmer animation, Open WebUI style */
@keyframes shimmer {
0% {
background-position: 100% 0;
}
100% {
background-position: -100% 0;
}
}
.shimmer {
background: linear-gradient(
110deg,
#b4b4b4 0%,
#b4b4b4 43%,
#e8e8e8 50%,
#b4b4b4 57%,
#b4b4b4 100%
);
background-size: 200% 100%;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: shimmer 1.5s cubic-bezier(0.7, 0, 1, 0.4) infinite;
color: #b4b4b4;
}
.dark .shimmer {
background: linear-gradient(
110deg,
#9a9a9a 0%,
#9a9a9a 43%,
#5e5e5e 50%,
#9a9a9a 57%,
#9a9a9a 100%
);
background-size: 200% 100%;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: shimmer 1.5s cubic-bezier(0.7, 0, 1, 0.4) infinite;
color: #9a9a9a;
}
/* Inline code (codespan), Open WebUI style */
.codespan {
padding: 0.15rem 0.3rem;
font-size: 0.85em;
@apply font-mono rounded-md text-gray-800 bg-gray-100 dark:text-gray-200 dark:bg-gray-800 mx-0.5;
}
/* Tippy tooltip theme */
.tippy-box[data-theme~='cptr'] {
@apply rounded-lg bg-gray-950 text-xs border border-gray-900 shadow-xl;
}