mirror of
https://github.com/outline/outline.git
synced 2026-11-29 00:29:36 +03:00
fix: More comment gutter alignment fixes (#13024)
This commit is contained in:
1 parent
03c7576b93
commit
bbf6b77dc1
2 files changed
+14
-5
No files matched your search
@@ -80,7 +80,7 @@ export function CommentGutter({
|
||||
|
||||
const Gutter = styled.div`
|
||||
position: absolute;
|
||||
inset-inline-start: 100%;
|
||||
inset-inline-start: calc(100% + ${EditorStyleHelper.padding}px);
|
||||
margin-inline-start: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -1239,6 +1239,7 @@ ${
|
||||
.notice-block {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
background: ${transparentize(0.9, props.theme.noticeInfoBackground)};
|
||||
border-left: 4px solid ${props.theme.noticeInfoBackground};
|
||||
color: ${props.theme.noticeInfoText};
|
||||
@@ -1368,18 +1369,23 @@ p {
|
||||
min-height: 1.6em;
|
||||
}
|
||||
|
||||
/* Make top-level paragraphs a positioning context so the comment gutter anchors
|
||||
to them (flush with the content column) */
|
||||
.ProseMirror > p {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.heading-content {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* The heading is the gutter's containing block (unlike paragraphs, which
|
||||
resolve against the padded .ProseMirror). Pin it vertically to the line and
|
||||
add the editor's horizontal padding so it aligns with other gutter marks. */
|
||||
/* The heading is taller than the line, so pin the gutter vertically to center
|
||||
its indicators against the text. Horizontal alignment is handled by the
|
||||
gutter's own rule. */
|
||||
.heading-content .${EditorStyleHelper.commentGutter} {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
justify-content: center;
|
||||
inset-inline-start: calc(100% + ${EditorStyleHelper.padding}px);
|
||||
}
|
||||
|
||||
.heading-content a,
|
||||
@@ -2640,6 +2646,9 @@ li > .${EditorStyleHelper.toggleBlock} {
|
||||
|
||||
.${EditorStyleHelper.toggleBlock} {
|
||||
display: flex;
|
||||
/* Establish a positioning context so comment gutters on nested content anchor
|
||||
here (flush with the content column) rather than the padded .ProseMirror. */
|
||||
position: relative;
|
||||
|
||||
&:focus-within {
|
||||
transition-delay: 0.1s;
|
||||
|
||||
Reference in new issue
Block a user