fix: HTML exports have extra empty page, closes #6205

This commit is contained in:
Tom Moor
2023-11-23 09:50:58 -05:00
parent b18740c989
commit 72c485e0c8
3 changed files with 4 additions and 14 deletions

View File

@@ -261,16 +261,6 @@ const emailStyle = (props: Props) => css`
}
`;
const printStyle = (props: Props) => css`
${props.staticHTML &&
`
body {
height: auto;
min-height: 0;
}
`}
`;
const style = (props: Props) => `
flex-grow: ${props.grow ? 1 : 0};
justify-content: start;
@@ -1570,7 +1560,6 @@ const EditorContainer = styled.div<Props>`
${codeBlockStyle}
${findAndReplaceStyle}
${emailStyle}
${printStyle}
`;
export default EditorContainer;

View File

@@ -3,6 +3,7 @@ import styledNormalize from "styled-normalize";
import { breakpoints, depths, s } from ".";
type Props = {
staticHTML?: boolean;
useCursorPointer?: boolean;
};
@@ -16,7 +17,7 @@ export default createGlobalStyle<Props>`
html,
body {
width: 100%;
height: 100%;
height: ${(props) => (props.staticHTML ? "0" : "100%")};
margin: 0;
padding: 0;
print-color-adjust: exact;
@@ -46,7 +47,7 @@ export default createGlobalStyle<Props>`
@media (min-width: ${breakpoints.tablet}px) {
html,
body {
min-height: 100vh;
min-height: ${(props) => (props.staticHTML ? "0" : "100vh")};
}
}