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:
@@ -25,25 +25,25 @@
|
||||
size: 90.3mm 29mm;
|
||||
margin: 1mm;
|
||||
}
|
||||
@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; }
|
||||
.label-preview {
|
||||
width: 90.3mm;
|
||||
height: 29mm;
|
||||
background: white;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
@media screen {
|
||||
.label-preview {
|
||||
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>
|
||||
</svelte:head>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user