UNPKG

prosekit

Version:

ProseKit: A toolkit for building rich text editors.

173 lines (171 loc) 4 kB
/* ../basic/src/typography.css */ :root { --prosekit-node-selection-color: rgba(57, 136, 255, 0.2); } .ProseMirror { display: flex; flex-direction: column; } .ProseMirror { line-height: 1.5; } .ProseMirror p:first-child, .ProseMirror h1:first-child, .ProseMirror h2:first-child, .ProseMirror h3:first-child, .ProseMirror h4:first-child, .ProseMirror h5:first-child, .ProseMirror h6:first-child { margin-top: 0; } .ProseMirror p:last-child, .ProseMirror h1:last-child, .ProseMirror h2:last-child, .ProseMirror h3:last-child, .ProseMirror h4:last-child, .ProseMirror h5:last-child, .ProseMirror h6:last-child { margin-bottom: 0; } .ProseMirror h1, .ProseMirror h2, .ProseMirror h3, .ProseMirror h4, .ProseMirror h5, .ProseMirror h6 { padding-top: 0; padding-bottom: 0; border-style: none; font-weight: 600; line-height: 1.25; } .ProseMirror a { font-weight: 500; text-decoration: underline; } .ProseMirror p, .ProseMirror ul, .ProseMirror ol, .ProseMirror pre { margin: 0; padding: 0.5rem 0; line-height: 1.5; } .ProseMirror blockquote { padding-left: 1em; border-left: 0.25em solid hsl(0 0% 60% / 0.4); } .ProseMirror h1 { margin: 1rem 0; font-size: 2.25em; } .ProseMirror h2 { margin: 1.75em 0 0.5em; font-size: 1.75em; } .ProseMirror h3 { margin: 1.5em 0 0.5em; font-size: 1.375em; } .ProseMirror h4 { margin: 1em 0; font-size: 1.125em; } .ProseMirror h5 { margin: 0.5em 0; } .ProseMirror h6 { opacity: 0.8; } .ProseMirror img, .ProseMirror video { width: min-content; max-width: 100%; margin: 0; } .ProseMirror code { font-weight: 600; font-size: 0.875em; } .ProseMirror pre { margin: 0.5rem 0; padding: 2rem 2rem; overflow-x: auto; border: 1px solid hsl(0 0% 50% / 0.2); border-radius: 0.375rem; background-color: var(--prosemirror-highlight-bg, inherit); color: var(--prosemirror-highlight, inherit); } .ProseMirror pre, .ProseMirror code { white-space: pre; word-break: normal; word-spacing: normal; word-wrap: normal; hyphens: none; tab-size: 4; } .ProseMirror pre code { font-weight: inherit; } .ProseMirror hr { margin: 2em 0; border-width: 1px; } .ProseMirror .prosekit-horizontal-rule { margin: 1em 0; padding: 1em 0; line-height: 1px; } .ProseMirror .prosekit-horizontal-rule hr { margin: 0; } .ProseMirror .tableWrapper { margin-top: 0.5em; margin-bottom: 1em; } .ProseMirror .prosemirror-flat-list { line-height: 1.5; } .ProseMirror .prosemirror-flat-list::before, .ProseMirror .prosemirror-flat-list > .list-marker { top: 0.5rem; } .ProseMirror .prosemirror-flat-list:has(> div.list-content > h1)::before, .ProseMirror .prosemirror-flat-list:has(> div.list-content > h1) > .list-marker { top: 0.75em; } .ProseMirror .prosemirror-flat-list:has(> div.list-content > h2)::before, .ProseMirror .prosemirror-flat-list:has(> div.list-content > h2) > .list-marker { top: 0.5em; } .ProseMirror .prosemirror-flat-list:has(> div.list-content > h3)::before, .ProseMirror .prosemirror-flat-list:has(> div.list-content > h3) > .list-marker { top: 0.25em; } .ProseMirror .prosemirror-flat-list:has(> div.list-content > h4)::before, .ProseMirror .prosemirror-flat-list:has(> div.list-content > h4) > .list-marker { top: 0; } .ProseMirror .prosemirror-flat-list:has(> div.list-content > h5)::before, .ProseMirror .prosemirror-flat-list:has(> div.list-content > h5) > .list-marker { top: -0.2em; } .ProseMirror .prosemirror-flat-list:has(> div.list-content > h6)::before, .ProseMirror .prosemirror-flat-list:has(> div.list-content > h6) > .list-marker { top: -0.3em; } .ProseMirror div[data-node-view-root=true] { display: contents; } .ProseMirror .ProseMirror-selectednode { border-radius: 0.2rem; outline-color: var(--prosekit-node-selection-color); outline-style: solid; outline-width: 0.3rem; background-color: var(--prosekit-node-selection-color); } .ProseMirror.prosekit-dragging { --prosekit-node-selection-color: transparent; } /* src/basic/typography.css */