mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
@@ -1893,6 +1893,8 @@ mark {
|
||||
}
|
||||
|
||||
&::after {
|
||||
max-height: calc(10 * 1.4em + 0.75em);
|
||||
overflow: hidden;
|
||||
clip-path: inset(0 0 calc(100% - 10 * 1.4em - 0.75em) 0);
|
||||
}
|
||||
|
||||
@@ -1913,6 +1915,23 @@ mark {
|
||||
${props.theme.codeBackground} 100%
|
||||
);
|
||||
}
|
||||
|
||||
@media print {
|
||||
pre {
|
||||
max-height: none;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
&::after {
|
||||
max-height: none;
|
||||
overflow: visible;
|
||||
clip-path: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.${EditorStyleHelper.codeBlockToggle} {
|
||||
|
||||
@@ -107,9 +107,8 @@ function buildCollapseState(
|
||||
|
||||
if (isCollapsed) {
|
||||
const totalLines = (node.textContent.match(/\n/g)?.length ?? 0) + 1;
|
||||
const cappedLines = Math.min(totalLines, COLLAPSE_LINE_THRESHOLD);
|
||||
const gutterWidth = String(totalLines).length;
|
||||
const lineNumberText = Array.from({ length: cappedLines }, (_, i) =>
|
||||
const lineNumberText = Array.from({ length: totalLines }, (_, i) =>
|
||||
String(i + 1).padStart(gutterWidth, " ")
|
||||
).join("\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user