asset_browser/public/styles/label.css
2026-03-27 09:18:39 -04:00

167 lines
3.6 KiB
CSS
Executable file

/* ===== Label Preview (used in popup + in-app preview) ===== */
.label-preview-wrap {
background: var(--white);
border: 2px dashed var(--gray-300);
border-radius: var(--radius);
padding: 16px;
margin-bottom: 16px;
display: flex;
justify-content: center;
}
/* 2.625" x 1" label — scales with its container, maintains 2.625:1 ratio */
.label-preview {
width: 100%;
max-width: 500px;
aspect-ratio: 384 / 146;
background: #fff;
border: 1px solid #ccc;
box-shadow: 0 2px 8px rgba(0,0,0,.12);
display: flex;
flex-direction: column;
padding: 6px 8px;
box-sizing: border-box;
position: relative;
font-family: 'Segoe UI', Arial, sans-serif;
overflow: hidden;
}
/* ── Header: logo+company on left, deRenzy phone on right ── */
.label-header-row {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #ddd;
padding-bottom: 4px;
flex-shrink: 0;
}
.label-header-left {
display: flex;
align-items: center;
gap: 5px;
min-width: 0;
}
.label-logo {
height: 18px;
width: auto;
object-fit: contain;
flex-shrink: 0;
}
.label-company {
font-size: 8px;
font-weight: 700;
color: #1a3565;
text-transform: uppercase;
letter-spacing: .04em;
white-space: nowrap;
}
.label-derenzy-phone {
font-size: 8px;
font-weight: 700;
color: #1a3565;
white-space: nowrap;
flex-shrink: 0;
}
/* ── Content: text on left (barcode SVG is a sibling, not inside here) ── */
.label-content-row {
display: flex;
flex: 1;
align-items: center;
padding-top: 4px;
min-height: 0;
}
.label-text-block {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
min-width: 0;
overflow: hidden;
padding: 2px 0 2px 7px; /* left: 7px + label's 8px padding = 15px ≈ 1 line-height */
max-width: 51%; /* gives ~13px gap on the right before the barcode */
}
.label-asset-name {
font-size: 13px;
font-weight: 700;
color: #111;
line-height: 1.15;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.label-info-line {
font-size: 10px;
color: #444;
line-height: 1.2;
overflow: hidden;
margin-top: 1px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
/* Wrapper div stretches reliably (non-replaced block) from below the header to the
label bottom. top: 30px clears padding (6px) + header row (~24px). */
.label-barcode-area {
position: absolute;
top: 30px;
right: 0;
bottom: 0;
width: 45%;
overflow: hidden;
}
/* img fills the wrapper; object-fit:fill stretches it to exact container dims.
pixelated forces nearest-neighbor scaling → crisp bar edges, no blur. */
.label-barcode-img {
width: 100%;
height: 100%;
object-fit: fill;
image-rendering: pixelated;
display: block;
}
/* Caption: div handles position/centering; span gets the tight solid white pill */
.label-barcode-caption {
position: absolute;
bottom: 4px;
right: 0;
width: 45%;
text-align: center;
}
.label-barcode-caption span {
display: inline-block;
font-size: 7.5px;
color: #444;
font-weight: 600;
font-family: monospace;
background: #fff;
padding: 1px 4px;
}
/* ===== Print popup styles (Zebra direct print) ===== */
@media print {
body { margin: 0; background: white; }
.no-print { display: none !important; }
.label-preview {
width: 2.625in;
height: 1in;
aspect-ratio: unset;
border: none;
box-shadow: none;
padding: 0.05in 0.07in;
}
.label-asset-name { font-size: 8pt; }
.label-info-line { font-size: 6pt; }
.label-company, .label-derenzy-phone { font-size: 5.5pt; }
.label-barcode-caption { font-size: 5.5pt; }
}