Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

1.9 KB
Raw Blame
@import "tailwindcss";

@custom-variant dark (&:where(.dark, .dark *));

@source "./**/*.{svelte,ts}";

@theme {
	--font-serif: Domine, serif;
}

.harper-editor {
	--harper-editor-font-size: inherit;
}

/* Dark mode starts under a `.dark` ancestor, the same as the Tailwind `dark:` variant. */
.dark .harper-editor,
.dark.harper-editor {
	color-scheme: dark;
}

.harper-editor *,
.harper-editor *::before,
.harper-editor *::after {
	box-sizing: border-box;
}

.harper-editor button,
.harper-editor input,
.harper-editor select {
	font: inherit;
}

.harper-editor button:not(:disabled) {
	cursor: pointer;
}

.harper-editor button:disabled {
	cursor: default;
}

.harper-editor button:focus-visible,
.harper-editor select:focus-visible {
	outline: 2px solid var(--color-blue-600);
	outline-offset: 2px;
}

.dark .harper-editor button:focus-visible,
.dark .harper-editor select:focus-visible {
	outline-color: var(--color-blue-400);
}

.harper-editor-quill-container {
	display: flex;
	flex: 1;
	width: 100%;
	min-height: 100%;
}

.harper-editor-surface {
	flex: 1;
	min-height: 100%;
}

.harper-editor-surface,
.harper-editor-surface.ql-editor {
	position: relative;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: inherit;
	font-family: var(--harper-editor-font-family);
	font-size: var(--harper-editor-font-size);
	line-height: 1.5;
	letter-spacing: 0;
	white-space: pre-wrap;
}

.harper-editor-surface:focus,
.harper-editor-surface:focus-visible {
	outline: 0;
}

.harper-editor-surface.ql-editor.ql-blank::before {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	color: var(--color-stone-500);
	content: attr(data-placeholder);
	pointer-events: none;
}

.dark .harper-editor-surface.ql-editor.ql-blank::before {
	color: var(--color-stone-400);
}

.harper-editor-surface p,
.harper-editor-surface.ql-editor p {
	margin: 0;
	line-height: inherit;
}

.harper-editor-surface p:last-child,
.harper-editor-surface.ql-editor p:last-child {
	margin-bottom: 0;
}