Trim tiptap css

This commit is contained in:
Jon Staab
2025-01-28 16:23:19 -08:00
parent b129ef4242
commit 06d0ae2798

View File

@@ -185,45 +185,53 @@
@apply -m-1 min-h-12 p-1; @apply -m-1 min-h-12 p-1;
} }
.tiptap[contenteditable="true"] { .tiptap {
--tiptap-object-bg: var(--base-100);
--tiptap-object-fg: var(--base-content);
--tiptap-active-bg: var(--primary);
--tiptap-active-fg: var(--primary-content);
}
.tiptap-suggestions {
--tiptap-object-bg: var(--base-100);
--tiptap-object-fg: var(--base-content);
--tiptap-active-bg: var(--base-300);
--tiptap-active-fg: var(--base-content);
}
.tiptap {
@apply max-h-[350px] overflow-y-auto p-2 px-4; @apply max-h-[350px] overflow-y-auto p-2 px-4;
} }
.chat-editor .tiptap[contenteditable="true"] { .tiptap p.is-editor-empty:first-child::before {
@apply rounded-box bg-base-300; opacity: 40%;
} }
.input-editor .tiptap[contenteditable="true"] { .chat-editor .tiptap {
@apply input input-bordered h-auto p-[.65rem]; @apply rounded-box bg-base-300 pr-12;
} }
.note-editor .tiptap[contenteditable="true"] { .note-editor .tiptap {
--tiptap-object-bg: var(--base-200);
@apply input input-bordered h-auto min-h-32 rounded-box p-[.65rem] pb-6; @apply input input-bordered h-auto min-h-32 rounded-box p-[.65rem] pb-6;
} }
.tiptap pre code { .input-editor .tiptap {
@apply link-content block w-full; --tiptap-object-bg: var(--base-200);
@apply input input-bordered h-auto p-[.65rem];
} }
.tiptap p code { /* link-content, based on tiptap */
@apply link-content;
}
.link-content, .link-content {
.tiptap [tag] { max-width: 100%;
@apply max-w-full overflow-hidden text-ellipsis whitespace-nowrap rounded bg-neutral px-1 text-neutral-content no-underline; overflow: hidden;
} text-overflow: ellipsis;
white-space: nowrap;
.link-content.link-content-selected { border-radius: 3px;
@apply bg-primary text-primary-content; padding: 0 0.25rem;
} background-color: var(--base-100);
color: var(--base-content);
.tiptap p.is-editor-empty:first-child::before {
content: attr(data-placeholder);
float: left;
height: 0;
pointer-events: none;
opacity: 50%;
} }
/* date input */ /* date input */
@@ -248,19 +256,3 @@ emoji-picker {
--input-font-color: var(--base-content); --input-font-color: var(--base-content);
--outline-color: var(--base-100); --outline-color: var(--base-100);
} }
/* tiptap */
.tiptap {
--tiptap-object-bg: var(--base-100);
--tiptap-object-fg: var(--base-content);
--tiptap-active-bg: var(--primary);
--tiptap-active-fg: var(--primary-content);
}
.tiptap-suggestions {
--tiptap-object-bg: var(--base-100);
--tiptap-object-fg: var(--base-content);
--tiptap-active-bg: var(--base-300);
--tiptap-active-fg: var(--base-content);
}