mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
editor: fix item margins in editor (#7744)
This commit is contained in:
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { match, surround } from "fuzzyjs";
|
||||
import { clone } from "./clone";
|
||||
import { clone } from "./clone.js";
|
||||
|
||||
export function fuzzy<T>(
|
||||
query: string,
|
||||
|
||||
@@ -75,9 +75,9 @@ export function TaskItemComponent(
|
||||
opacity: [1, 1, 0],
|
||||
alignSelf: "start",
|
||||
bg: "transparent",
|
||||
mt: isMobile ? "0.20ch" : "0.36ch",
|
||||
mt: isMobile ? "0.20ch" : 0,
|
||||
cursor: "grab",
|
||||
mx: 1,
|
||||
mr: 1,
|
||||
fontFamily: "inherit"
|
||||
}}
|
||||
size={isMobile ? "2.46ch" : "2.22ch"}
|
||||
@@ -94,7 +94,7 @@ export function TaskItemComponent(
|
||||
borderRadius: "default",
|
||||
alignSelf: "start",
|
||||
p: "1px",
|
||||
mt: isMobile ? "0.20ch" : "0.36ch",
|
||||
mt: isMobile ? "0.20ch" : 0,
|
||||
marginInlineEnd: 1,
|
||||
cursor: editor.isEditable ? "pointer" : "unset",
|
||||
":hover": isMobile
|
||||
|
||||
@@ -111,7 +111,9 @@
|
||||
filter: brightness(70%);
|
||||
}
|
||||
|
||||
.ProseMirror p[data-spacing="double"] {
|
||||
.ProseMirror > p[data-spacing="double"],
|
||||
.ProseMirror div.callout > p[data-spacing="double"],
|
||||
.ProseMirror blockquote > p[data-spacing="double"] {
|
||||
margin-top: 1em;
|
||||
/* By default double spaced paragraphs have no bottom margin */
|
||||
margin-bottom: 0px;
|
||||
@@ -119,7 +121,9 @@
|
||||
|
||||
/* Add top & bottom margin for double spaced paragraphs & adjacent nodes
|
||||
except single spaced paragraphs. */
|
||||
.ProseMirror p[data-spacing="double"] + *:not(p[data-spacing="single"]) {
|
||||
.ProseMirror > p[data-spacing="double"] + *:not(p[data-spacing="single"]),
|
||||
.ProseMirror div.callout > p[data-spacing="double"] + *:not(div.callout > p[data-spacing="single"]),
|
||||
.ProseMirror blockquote > p[data-spacing="double"] + *:not(.ProseMirror blockquote p[data-spacing="single"]) {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
@@ -550,7 +554,7 @@ p > *::selection {
|
||||
|
||||
.outline-list > li > :first-child::before {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
top: 0px;
|
||||
cursor: pointer;
|
||||
content: "";
|
||||
background-size: 18px;
|
||||
|
||||
Reference in New Issue
Block a user