Skip to content

Commit 2a23ed0

Browse files
committed
More aggressive print margin control to override defaults
1 parent d3e7fec commit 2a23ed0

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

ipycalc/nbconvert_template/static/ipycalc.css

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,25 @@
1212

1313
@media print {
1414

15+
/* Reset body margins and padding to zero - page margins are set in @page rule above */
1516
body {
16-
margin: 0;
17+
margin: 0 !important;
18+
padding: 0 !important;
1719
zoom: 100%; /* Adjust this value if you want wider content to fit */
1820
}
1921

22+
/* Override any margins/padding from the lab template on all elements */
23+
body * {
24+
margin: 0 !important;
25+
padding: 0 !important;
26+
}
27+
28+
/* Ensure notebook container elements have no margins or padding */
29+
#notebook-container, .jp-Notebook, .jp-Cell {
30+
margin: 0 !important;
31+
padding: 0 !important;
32+
}
33+
2034
.page-break {
2135
/* Allows user to force page breaks in the notebook using <div class="page-break"></div> in a markdown cell */
2236
break-before: always;

0 commit comments

Comments
 (0)