Fix empty print labels: apply dimensions in all media not just screen
Label width/height was inside @media screen so print had no dimensions. Moved to base CSS so labels render in both screen preview and print. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,25 +23,25 @@
|
|||||||
size: 90.3mm 29mm;
|
size: 90.3mm 29mm;
|
||||||
margin: 1mm;
|
margin: 1mm;
|
||||||
}
|
}
|
||||||
@media print {
|
.label-preview {
|
||||||
.no-print { display: none !important; }
|
width: 90.3mm;
|
||||||
body {
|
height: 29mm;
|
||||||
margin: 0;
|
background: white;
|
||||||
padding: 0;
|
box-sizing: border-box;
|
||||||
background: white !important;
|
overflow: hidden;
|
||||||
}
|
|
||||||
nav, header, aside { display: none !important; }
|
|
||||||
main { padding: 0 !important; overflow: visible !important; }
|
|
||||||
.print-container { break-inside: avoid; }
|
|
||||||
}
|
}
|
||||||
@media screen {
|
@media screen {
|
||||||
.label-preview {
|
.label-preview {
|
||||||
border: 1px dashed #ccc;
|
border: 1px dashed #ccc;
|
||||||
width: 90.3mm;
|
|
||||||
height: 29mm;
|
|
||||||
background: white;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@media print {
|
||||||
|
.no-print { display: none !important; }
|
||||||
|
body { margin: 0; padding: 0; background: white !important; }
|
||||||
|
nav, header, aside { display: none !important; }
|
||||||
|
main { padding: 0 !important; overflow: visible !important; }
|
||||||
|
.print-container { break-inside: avoid; page-break-after: always; }
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
|||||||
@@ -25,25 +25,25 @@
|
|||||||
size: 90.3mm 29mm;
|
size: 90.3mm 29mm;
|
||||||
margin: 1mm;
|
margin: 1mm;
|
||||||
}
|
}
|
||||||
@media print {
|
.label-preview {
|
||||||
.no-print { display: none !important; }
|
width: 90.3mm;
|
||||||
body {
|
height: 29mm;
|
||||||
margin: 0;
|
background: white;
|
||||||
padding: 0;
|
box-sizing: border-box;
|
||||||
background: white !important;
|
overflow: hidden;
|
||||||
}
|
|
||||||
nav, header, aside { display: none !important; }
|
|
||||||
main { padding: 0 !important; overflow: visible !important; }
|
|
||||||
.print-container { break-inside: avoid; }
|
|
||||||
}
|
}
|
||||||
@media screen {
|
@media screen {
|
||||||
.label-preview {
|
.label-preview {
|
||||||
border: 1px dashed #ccc;
|
border: 1px dashed #ccc;
|
||||||
width: 90.3mm;
|
|
||||||
height: 29mm;
|
|
||||||
background: white;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@media print {
|
||||||
|
.no-print { display: none !important; }
|
||||||
|
body { margin: 0; padding: 0; background: white !important; }
|
||||||
|
nav, header, aside { display: none !important; }
|
||||||
|
main { padding: 0 !important; overflow: visible !important; }
|
||||||
|
.print-container { break-inside: avoid; page-break-after: always; }
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user