forked from coracle/flotilla
Fix tiptap styling
This commit is contained in:
+18
-3
@@ -40,15 +40,14 @@
|
|||||||
|
|
||||||
:root {
|
:root {
|
||||||
font-family: Lato;
|
font-family: Lato;
|
||||||
}
|
|
||||||
|
|
||||||
[data-theme] {
|
|
||||||
--base-100: oklch(var(--b1));
|
--base-100: oklch(var(--b1));
|
||||||
--base-200: oklch(var(--b2));
|
--base-200: oklch(var(--b2));
|
||||||
--base-300: oklch(var(--b3));
|
--base-300: oklch(var(--b3));
|
||||||
--base-content: oklch(var(--bc));
|
--base-content: oklch(var(--bc));
|
||||||
--primary: oklch(var(--p));
|
--primary: oklch(var(--p));
|
||||||
|
--primary-content: oklch(var(--pc));
|
||||||
--secondary: oklch(var(--s));
|
--secondary: oklch(var(--s));
|
||||||
|
--secondary-content: oklch(var(--sc));
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-alt,
|
.bg-alt,
|
||||||
@@ -239,3 +238,19 @@ 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);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type {SvelteComponent} from "svelte"
|
import type {SvelteComponent} from "svelte"
|
||||||
|
import {derived} from "svelte/store"
|
||||||
import {type Instance} from "tippy.js"
|
import {type Instance} from "tippy.js"
|
||||||
import {append, remove, uniq} from "@welshman/lib"
|
import {append, remove, uniq} from "@welshman/lib"
|
||||||
import {profileSearch} from "@welshman/app"
|
import {profileSearch} from "@welshman/app"
|
||||||
@@ -20,6 +21,8 @@
|
|||||||
let popover: Instance
|
let popover: Instance
|
||||||
let instance: SvelteComponent
|
let instance: SvelteComponent
|
||||||
|
|
||||||
|
const search = derived(profileSearch, $profileSearch => $profileSearch.searchValues)
|
||||||
|
|
||||||
const selectPubkey = (pubkey: string) => {
|
const selectPubkey = (pubkey: string) => {
|
||||||
term = ""
|
term = ""
|
||||||
popover.hide()
|
popover.hide()
|
||||||
@@ -76,8 +79,8 @@
|
|||||||
component={Suggestions}
|
component={Suggestions}
|
||||||
props={{
|
props={{
|
||||||
term,
|
term,
|
||||||
|
search,
|
||||||
select: selectPubkey,
|
select: selectPubkey,
|
||||||
search: profileSearch,
|
|
||||||
component: ProfileSuggestion,
|
component: ProfileSuggestion,
|
||||||
class: "rounded-box",
|
class: "rounded-box",
|
||||||
style: `left: 4px; width: ${input?.clientWidth + 12}px`,
|
style: `left: 4px; width: ${input?.clientWidth + 12}px`,
|
||||||
|
|||||||
Reference in New Issue
Block a user