open-webui/src/app.css

619 lines
13 KiB
CSS
Raw Normal View History

2025-02-16 11:27:25 +08:00
@reference "./tailwind.css";
2023-10-09 06:38:42 +08:00
@font-face {
font-family: 'Inter';
src: url('/assets/fonts/Inter-Variable.ttf');
2023-10-09 06:38:42 +08:00
font-display: swap;
}
2024-07-09 05:20:11 +08:00
@font-face {
font-family: 'Archivo';
src: url('/assets/fonts/Archivo-Variable.ttf');
font-display: swap;
}
2023-11-19 08:47:12 +08:00
@font-face {
font-family: 'Mona Sans';
src: url('/assets/fonts/Mona-Sans.woff2');
font-display: swap;
}
2024-11-03 18:31:12 +08:00
@font-face {
font-family: 'InstrumentSerif';
src: url('/assets/fonts/InstrumentSerif-Regular.ttf');
font-display: swap;
}
@font-face {
font-family: 'Vazirmatn';
src: url('/assets/fonts/Vazirmatn-Variable.ttf');
font-display: swap;
}
2023-10-09 06:38:42 +08:00
html {
2023-10-23 08:15:26 +08:00
word-break: break-word;
2023-10-09 06:38:42 +08:00
}
2023-12-09 09:48:31 +08:00
code {
2023-12-11 07:14:47 +08:00
/* white-space-collapse: preserve !important; */
2024-01-02 02:35:46 +08:00
overflow-x: auto;
2023-12-09 09:48:31 +08:00
width: auto;
}
2025-07-19 20:35:03 +08:00
.editor-selection {
background: rgba(180, 213, 255, 0.5);
border-radius: 2px;
}
2024-11-03 18:31:12 +08:00
.font-secondary {
font-family: 'InstrumentSerif', sans-serif;
}
2025-06-04 06:51:42 +08:00
.marked a {
@apply underline;
}
2023-10-29 06:16:04 +08:00
math {
margin-top: 1rem;
}
.hljs {
@apply rounded-lg;
}
2025-04-07 07:57:36 +08:00
input::placeholder {
direction: auto;
}
textarea::placeholder {
direction: auto;
}
2024-10-19 05:55:39 +08:00
.input-prose {
2025-07-09 17:29:27 +08:00
@apply prose dark:prose-invert prose-headings:font-semibold prose-hr:my-4 prose-hr:border-gray-100 prose-hr:dark:border-gray-800 prose-p:my-1 prose-img:my-1 prose-headings:my-2 prose-pre:my-0 prose-table:my-1 prose-blockquote:my-0 prose-ul:my-1 prose-ol:my-1 prose-li:my-0.5 whitespace-pre-line;
2024-10-19 05:55:39 +08:00
}
.input-prose-sm {
2025-07-09 17:29:27 +08:00
@apply prose dark:prose-invert prose-headings:font-medium prose-h1:text-2xl prose-h2:text-xl prose-h3:text-lg prose-hr:my-4 prose-hr:border-gray-100 prose-hr:dark:border-gray-800 prose-p:my-1 prose-img:my-1 prose-headings:my-2 prose-pre:my-0 prose-table:my-1 prose-blockquote:my-0 prose-ul:my-1 prose-ol:my-1 prose-li:my-1 whitespace-pre-line text-sm;
2024-10-19 05:55:39 +08:00
}
2024-08-19 02:59:59 +08:00
.markdown-prose {
@apply prose dark:prose-invert prose-blockquote:border-s-gray-100 prose-blockquote:dark:border-gray-800 prose-blockquote:border-s-2 prose-blockquote:not-italic prose-blockquote:font-normal prose-headings:font-semibold prose-hr:my-4 prose-hr:border-gray-100 prose-hr:dark:border-gray-800 prose-p:my-0 prose-img:my-1 prose-headings:my-1 prose-pre:my-0 prose-table:my-0 prose-blockquote:my-0 prose-ul:-my-0 prose-ol:-my-0 prose-li:-my-0 whitespace-pre-line;
2024-08-19 02:59:59 +08:00
}
2025-07-07 23:56:31 +08:00
.markdown-prose-sm {
@apply text-sm prose dark:prose-invert prose-blockquote:border-s-gray-100 prose-blockquote:dark:border-gray-800 prose-blockquote:border-s-2 prose-blockquote:not-italic prose-blockquote:font-normal prose-headings:font-semibold prose-hr:my-2 prose-hr:border-gray-100 prose-hr:dark:border-gray-800 prose-p:my-0 prose-img:my-1 prose-headings:my-1 prose-pre:my-0 prose-table:my-0 prose-blockquote:my-0 prose-ul:-my-0 prose-ol:-my-0 prose-li:-my-0 whitespace-pre-line;
}
2024-12-21 06:38:15 +08:00
.markdown-prose-xs {
2025-07-07 23:56:31 +08:00
@apply text-xs prose dark:prose-invert prose-blockquote:border-s-gray-100 prose-blockquote:dark:border-gray-800 prose-blockquote:border-s-2 prose-blockquote:not-italic prose-blockquote:font-normal prose-headings:font-semibold prose-hr:my-0.5 prose-hr:border-gray-100 prose-hr:dark:border-gray-800 prose-p:my-0 prose-img:my-1 prose-headings:my-1 prose-pre:my-0 prose-table:my-0 prose-blockquote:my-0 prose-ul:-my-0 prose-ol:-my-0 prose-li:-my-0 whitespace-pre-line;
2024-12-21 06:38:15 +08:00
}
2024-06-15 18:32:18 +08:00
.markdown a {
@apply underline;
}
2024-07-09 05:20:11 +08:00
.font-primary {
2025-05-12 04:05:04 +08:00
font-family: 'Archivo', 'Vazirmatn', sans-serif;
2024-07-09 05:20:11 +08:00
}
2025-01-14 10:19:46 +08:00
.drag-region {
-webkit-app-region: drag;
}
.drag-region a,
.drag-region button {
-webkit-app-region: no-drag;
}
2025-01-14 13:13:16 +08:00
.no-drag-region {
-webkit-app-region: no-drag;
}
li p {
display: inline;
}
2023-10-09 06:38:42 +08:00
::-webkit-scrollbar-thumb {
--tw-border-opacity: 1;
2025-05-24 21:20:40 +08:00
background-color: rgba(215, 215, 215, 0.8);
2023-10-09 06:38:42 +08:00
border-color: rgba(255, 255, 255, var(--tw-border-opacity));
border-radius: 9999px;
border-width: 1px;
}
2024-10-06 09:28:40 +08:00
/* Dark theme scrollbar styles */
.dark ::-webkit-scrollbar-thumb {
2025-05-24 21:19:47 +08:00
background-color: rgba(67, 67, 67, 0.8); /* Darker color for dark theme */
2024-10-06 09:28:40 +08:00
border-color: rgba(0, 0, 0, var(--tw-border-opacity));
}
2023-10-09 06:38:42 +08:00
::-webkit-scrollbar {
2025-05-25 06:07:13 +08:00
height: 0.6rem;
2025-05-24 21:20:40 +08:00
width: 0.4rem;
2023-10-09 06:38:42 +08:00
}
::-webkit-scrollbar-track {
background-color: transparent;
border-radius: 9999px;
}
select {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
2025-01-20 04:46:02 +08:00
background-position: right 0rem center;
2023-10-09 06:38:42 +08:00
background-repeat: no-repeat;
background-size: 1.5em 1.5em;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
2025-01-20 04:46:02 +08:00
/* padding-right: 2.5rem; */
2023-10-09 06:38:42 +08:00
/* for Firefox */
-moz-appearance: none;
/* for Chrome */
-webkit-appearance: none;
}
2024-04-01 10:50:46 +08:00
2025-01-22 16:13:24 +08:00
@keyframes shimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.shimmer {
background: linear-gradient(90deg, #9a9b9e 25%, #2a2929 50%, #9a9b9e 75%);
background-size: 200% 100%;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: shimmer 4s linear infinite;
color: #818286; /* Fallback color */
}
:global(.dark) .shimmer {
background: linear-gradient(90deg, #818286 25%, #eae5e5 50%, #818286 75%);
background-size: 200% 100%;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: shimmer 4s linear infinite;
color: #a1a3a7; /* Darker fallback color for dark mode */
}
@keyframes smoothFadeIn {
0% {
opacity: 0;
transform: translateY(-10px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.status-description {
animation: smoothFadeIn 0.2s forwards;
}
2024-04-01 10:50:46 +08:00
.katex-mathml {
display: none;
}
2024-05-07 07:19:48 +08:00
2024-05-15 14:16:22 +08:00
.scrollbar-hidden:active::-webkit-scrollbar-thumb,
.scrollbar-hidden:focus::-webkit-scrollbar-thumb,
.scrollbar-hidden:hover::-webkit-scrollbar-thumb {
2024-05-07 07:19:48 +08:00
visibility: visible;
}
2024-05-15 14:16:22 +08:00
.scrollbar-hidden::-webkit-scrollbar-thumb {
2024-05-07 07:19:48 +08:00
visibility: hidden;
}
2024-05-15 14:16:22 +08:00
2024-06-11 08:22:44 +08:00
.scrollbar-hidden::-webkit-scrollbar-corner {
display: none;
}
2024-05-15 14:16:22 +08:00
.scrollbar-none::-webkit-scrollbar {
display: none; /* for Chrome, Safari and Opera */
}
2024-06-11 08:22:44 +08:00
.scrollbar-none::-webkit-scrollbar-corner {
display: none;
}
2024-05-15 14:16:22 +08:00
.scrollbar-none {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
2024-05-16 06:55:13 +08:00
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
/* display: none; <- Crashes Chrome on hover */
-webkit-appearance: none;
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}
input[type='number'] {
-moz-appearance: textfield; /* Firefox */
}
2024-06-11 08:22:44 +08:00
2025-04-13 09:27:23 +08:00
.katex-display {
@apply overflow-y-hidden overflow-x-auto max-w-full;
}
.katex-display::-webkit-scrollbar {
height: 0.4rem;
width: 0.4rem;
}
.katex-display:active::-webkit-scrollbar-thumb,
.katex-display:focus::-webkit-scrollbar-thumb,
.katex-display:hover::-webkit-scrollbar-thumb {
visibility: visible;
}
.katex-display::-webkit-scrollbar-thumb {
visibility: hidden;
}
.katex-display::-webkit-scrollbar-corner {
display: none;
}
2024-06-11 08:22:44 +08:00
.cm-editor {
height: 100%;
width: 100%;
}
2025-02-16 11:27:25 +08:00
.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;
2024-06-11 08:22:44 +08:00
}
.cm-editor.cm-focused {
outline: none;
}
2024-07-09 06:26:43 +08:00
.tippy-box[data-theme~='dark'] {
@apply rounded-lg bg-gray-950 text-xs border border-gray-900 shadow-xl;
}
2024-08-02 03:43:13 +08:00
.password {
-webkit-text-security: disc;
}
2024-08-06 00:57:28 +08:00
.codespan {
color: #eb5757;
border-width: 0px;
padding: 3px 8px;
font-size: 0.8em;
font-weight: 600;
2024-08-06 01:59:10 +08:00
@apply rounded-md dark:bg-gray-800 bg-gray-100 mx-0.5;
2024-08-06 00:57:28 +08:00
}
2024-09-18 04:05:19 +08:00
.svelte-flow {
background-color: transparent !important;
}
2024-09-18 08:11:25 +08:00
2024-09-18 08:42:19 +08:00
.svelte-flow__edge > path {
stroke-width: 0.5;
}
.svelte-flow__edge.animated > path {
stroke-width: 2;
@apply stroke-gray-600 dark:stroke-gray-500;
}
2024-09-18 08:11:25 +08:00
.bg-gray-950-90 {
background-color: rgba(var(--color-gray-950, #0d0d0d), 0.9);
}
2024-10-19 05:55:39 +08:00
.ProseMirror {
2024-11-21 14:46:51 +08:00
@apply h-full min-h-fit max-h-full whitespace-pre-wrap;
2024-10-19 05:55:39 +08:00
}
.ProseMirror:focus {
outline: none;
}
2024-11-21 14:46:51 +08:00
.ProseMirror p.is-editor-empty:first-child::before {
2024-10-19 05:55:39 +08:00
content: attr(data-placeholder);
2024-11-21 14:46:51 +08:00
float: left;
2025-05-14 16:24:09 +08:00
/* Below color is from tailwind, and has the proper contrast
text-gray-600 from: https://tailwindcss.com/docs/color */
color: #676767;
2024-10-19 05:55:39 +08:00
pointer-events: none;
2024-12-07 16:29:23 +08:00
@apply line-clamp-1 absolute;
2024-11-21 14:46:51 +08:00
}
2024-10-19 05:55:39 +08:00
2025-07-09 03:57:34 +08:00
.tiptap ul[data-type='taskList'] {
list-style: none;
margin-left: 0;
padding: 0;
li {
2025-07-09 15:06:40 +08:00
align-items: start;
2025-07-09 03:57:34 +08:00
display: flex;
> label {
flex: 0 0 auto;
margin-right: 0.5rem;
2025-07-09 15:06:40 +08:00
margin-top: 0.2rem;
2025-07-09 03:57:34 +08:00
user-select: none;
display: flex;
}
> div {
flex: 1 1 auto;
align-items: center;
}
}
2025-07-09 04:22:25 +08:00
/* checked data-checked="true" */
li[data-checked='true'] {
> div {
opacity: 0.5;
text-decoration: line-through;
}
}
2025-07-09 03:57:34 +08:00
input[type='checkbox'] {
cursor: pointer;
}
ul[data-type='taskList'] {
margin: 0;
}
2025-07-09 15:44:51 +08:00
/* Reset nested regular ul elements to default styling */
ul:not([data-type='taskList']) {
list-style: disc;
padding-left: 1rem;
li {
align-items: initial;
display: list-item;
label {
flex: initial;
margin-right: initial;
margin-top: initial;
user-select: initial;
display: initial;
}
div {
flex: initial;
align-items: initial;
}
}
}
}
.input-prose .tiptap ul[data-type='taskList'] {
list-style: none;
margin-left: 0;
padding: 0;
li {
align-items: start;
display: flex;
> label {
flex: 0 0 auto;
margin-right: 0.5rem;
margin-top: 0.4rem;
user-select: none;
display: flex;
}
> div {
flex: 1 1 auto;
align-items: center;
}
}
/* checked data-checked="true" */
li[data-checked='true'] {
> div {
opacity: 0.5;
text-decoration: line-through;
}
}
input[type='checkbox'] {
cursor: pointer;
}
ul[data-type='taskList'] {
margin: 0;
}
/* Reset nested regular ul elements to default styling */
ul:not([data-type='taskList']) {
list-style: disc;
padding-left: 1rem;
li {
align-items: initial;
display: list-item;
label {
flex: initial;
margin-right: initial;
margin-top: initial;
user-select: initial;
display: initial;
}
div {
flex: initial;
align-items: initial;
}
}
}
2025-07-09 03:57:34 +08:00
}
2025-05-14 18:50:47 +08:00
@media (prefers-color-scheme: dark) {
.ProseMirror p.is-editor-empty:first-child::before {
color: #757575;
}
}
2024-11-29 15:22:53 +08:00
.ai-autocompletion::after {
color: #a0a0a0;
content: attr(data-suggestion);
pointer-events: none;
2024-12-01 15:36:30 +08:00
}
2024-11-29 15:22:53 +08:00
2025-07-13 02:14:41 +08:00
.tiptap pre > code {
2024-11-21 14:46:51 +08:00
border-radius: 0.4rem;
font-size: 0.85rem;
padding: 0.25em 0.3em;
2025-07-13 01:39:31 +08:00
@apply dark:bg-gray-800 bg-gray-50;
2024-11-21 14:46:51 +08:00
}
2025-07-13 02:14:41 +08:00
.tiptap pre {
2024-11-21 14:46:51 +08:00
border-radius: 0.5rem;
font-family: 'JetBrainsMono', monospace;
margin: 1.5rem 0;
padding: 0.75rem 1rem;
2024-10-19 05:55:39 +08:00
2025-07-13 01:39:31 +08:00
@apply dark:bg-gray-800 bg-gray-50;
2024-10-19 05:55:39 +08:00
}
2024-11-21 14:56:26 +08:00
2024-11-24 12:31:33 +08:00
.tiptap p code {
color: #eb5757;
border-width: 0px;
padding: 3px 8px;
font-size: 0.8em;
font-weight: 600;
2025-07-13 01:39:31 +08:00
@apply rounded-md dark:bg-gray-800 bg-gray-50 mx-0.5;
2024-11-24 12:31:33 +08:00
}
2024-11-21 14:56:26 +08:00
/* Code styling */
.hljs-comment,
.hljs-quote {
color: #616161;
}
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #f98181;
}
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #fbbc88;
}
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #b9f18d;
}
.hljs-title,
.hljs-section {
color: #faf594;
}
.hljs-keyword,
.hljs-selector-tag {
color: #70cff8;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: 700;
}
/* Table styling for tiptap editors */
.tiptap table {
@apply w-full text-sm text-left text-gray-500 dark:text-gray-400 max-w-full;
}
.tiptap thead {
@apply text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-850 dark:text-gray-400 border-none;
}
2025-05-25 06:07:13 +08:00
.tiptap th,
.tiptap td {
@apply px-3 py-1.5 border border-gray-100 dark:border-gray-850;
}
.tiptap th {
@apply cursor-pointer text-left text-xs text-gray-700 dark:text-gray-400 font-semibold uppercase bg-gray-50 dark:bg-gray-850;
}
.tiptap td {
@apply text-gray-900 dark:text-white w-max;
}
.tiptap tr {
@apply bg-white dark:bg-gray-900 dark:border-gray-850 text-xs;
}
2025-07-09 07:11:51 +08:00
.tippy-box[data-theme~='transparent'] {
@apply bg-transparent p-0 m-0;
}
2025-07-11 21:54:27 +08:00
/* this is a rough fix for the first cursor position when the first paragraph is empty */
.ProseMirror > .ProseMirror-yjs-cursor:first-child {
margin-top: 16px;
}
/* This gives the remote user caret. The colors are automatically overwritten*/
.ProseMirror-yjs-cursor {
position: relative;
margin-left: -1px;
margin-right: -1px;
border-left: 1px solid black;
border-right: 1px solid black;
border-color: orange;
word-break: normal;
pointer-events: none;
}
/* This renders the username above the caret */
.ProseMirror-yjs-cursor > div {
position: absolute;
top: -1.05em;
left: -1px;
font-size: 13px;
background-color: rgb(250, 129, 0);
user-select: none;
color: white;
padding-left: 2px;
padding-right: 2px;
white-space: nowrap;
}