Fix annotate overflow and doubled spacing in code views (#1678)

Fix annotate overflow: Total div size was smaller than minimum size of individual children (+ margin).
Fix doubled spacing in code content views: Spacing duplicates through .panel-block as default for styling, various containers and inner syntax highlighter definition. Unfortunately, the latter is not easy to change, since it is also used with inline syntax highlighter.
This commit is contained in:
Florian Scholdei
2021-06-01 23:57:36 -07:00
committed by GitHub
parent 8ed2c1509f
commit 5cb2f077d9
5 changed files with 66 additions and 59 deletions

View File

@@ -77,11 +77,11 @@ const Line = styled.div`
const Metadata = styled(LineElement)`
cursor: help;
width: 217px;
width: 15.5em;
`;
const EmptyMetadata = styled(LineElement)`
width: 217px;
width: 15.5em; // width of author + when
`;
const dispatchDeferred = (dispatch: Dispatch<Action>, action: Action) => {
@@ -104,7 +104,7 @@ const AnnotateLine: FC<Props> = ({ annotation, showAnnotation, dispatch, nr, chi
annotation,
line: nr,
offset: link.current!.offsetTop,
type: "enter-line"
type: "enter-line",
});
}
};
@@ -113,7 +113,7 @@ const AnnotateLine: FC<Props> = ({ annotation, showAnnotation, dispatch, nr, chi
if (showAnnotation) {
dispatchDeferred(dispatch, {
line: nr,
type: "leave-line"
type: "leave-line",
});
}
};