Skip to content

Commit

Permalink
adjust list styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mwufi committed Sep 17, 2024
1 parent 0ed239c commit eadb2b7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
4 changes: 3 additions & 1 deletion app/components/editor/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export default function Toolbar() {
const attrs = editor.getAttributes('textStyle');
setFontSize(attrs.fontSize ? attrs.fontSize.replace('pt', '') : '16');
setFontFamily(attrs.fontFamily || 'Inter');
console.log("font family", attrs.fontFamily);
if (attrs.fontFamily) {
console.log("font family", attrs.fontFamily);
}
setIsBold(editor.isActive('bold'));
setIsItalic(editor.isActive('italic'));
setIsUnderline(editor.isActive('underline'));
Expand Down
21 changes: 12 additions & 9 deletions app/tiptap.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

/* spacing */
:root {
--paragraph-spacing: 0.8rem;
--paragraph-spacing: 0.4rem;
--heading-spacing: 1.2em;
--list-spacing: 1em;
--item-spacing: 0.1em;
--item-spacing: 0.4em;
}

.tiptap {
Expand All @@ -27,21 +26,25 @@
margin-block-start: 1em;
}

.tiptap p {
@apply leading-relaxed mb-[var(--paragraph-spacing)];
margin-block-start: 1em;
.tiptap > p {
@apply leading-relaxed;
margin-block-start: var(--paragraph-spacing);
margin-block-end: var(--paragraph-spacing);
}

.tiptap ul {
@apply list-disc pl-4 mb-[var(--list-spacing)];
@apply list-disc pl-4 ml-4 marker:text-accent-darker;
}

.tiptap ol {
@apply list-decimal pl-4 mb-[var(--list-spacing)];
@apply list-decimal pl-4 ml-4;
}

.tiptap li {
@apply mb-[var(--item-spacing)];
@apply my-[var(--item-spacing)];
}
.tiptap li::marker{
@apply text-lg;
}

.tiptap a {
Expand Down

0 comments on commit eadb2b7

Please sign in to comment.