fix: Improvements to image positioning (#3061)

* fix: Empty paragraph below images that confuses block insertion

* Remove spacing for caption when unused
This commit is contained in:
Tom Moor
2022-02-05 10:14:10 -08:00
committed by GitHub
parent ae0644177b
commit c7df74fcc4
5 changed files with 26 additions and 10 deletions

View File

@@ -545,7 +545,7 @@ const Caption = styled.p`
font-style: italic;
font-weight: normal;
color: ${(props) => props.theme.textSecondary};
padding: 2px 0;
padding: 8px 0 4px;
line-height: 16px;
text-align: center;
min-height: 1em;
@@ -557,7 +557,7 @@ const Caption = styled.p`
cursor: text;
&:empty:not(:focus) {
visibility: hidden;
display: none;
}
&:empty:before {
@@ -579,6 +579,6 @@ const ImageWrapper = styled.span`
}
&.ProseMirror-selectednode + ${Caption} {
visibility: visible;
display: block;
}
`;