fix: Add inline styles to barcode frames for correct positioning

- Added inline styles to #barcode-frame div:
  * position: absolute; bottom: 10px; left: 11.34px
  * width: 227.4px; z-index: 5; text-align: center
- Added inline styles to #barcode-display SVG:
  * display: block; margin: 0 auto; height: 50px
- Added inline styles to #vertical-barcode-frame div:
  * position: absolute; right: 0; top: 65.7px
  * width: 32px; height: 321.3px; z-index: 5
  * display: flex; align-items: center; justify-content: center
- Added inline styles to #vertical-barcode-display SVG:
  * width: 100%; height: auto; transform: rotate(-90deg)
- Inline styles take precedence over CSS rules
- Ensures barcodes are positioned at bottom and right of label
This commit is contained in:
Quality App Developer
2026-02-02 02:19:21 +02:00
parent 834bcc808a
commit 4784d1395c

View File

@@ -103,40 +103,15 @@
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
} #} } #}
/* Barcode Styling */ /* Barcode Styling - inline styles take precedence, CSS here for reference */
/* Horizontal barcode at bottom of label */
#barcode-frame { #barcode-frame {
position: absolute; /* position: absolute; bottom: 10px; left: 11.34px; width: 227.4px; z-index: 5; text-align: center; */
bottom: 10px;
left: 11.34px;
right: 11.34px;
width: 227.4px;
z-index: 5;
text-align: center;
}
#barcode-frame svg {
display: block;
margin: 0 auto;
height: 50px;
} }
/* Vertical barcode on right side of label */
#vertical-barcode-frame { #vertical-barcode-frame {
position: absolute; /* position: absolute; right: 0; top: 65.7px; width: 32px; height: 321.3px; z-index: 5; */
right: 0;
top: 65.7px;
width: 32px;
height: 321.3px;
z-index: 5;
display: flex;
align-items: center;
justify-content: center;
}
#vertical-barcode-frame svg {
width: 100%;
height: auto;
transform: rotate(-90deg);
transform-origin: center;
} }
</style> </style>
{% endblock %} {% endblock %}
@@ -254,9 +229,9 @@
</div> </div>
<!-- Barcode Frame - positioned 10px below rectangle, centered, constrained to label width --> <!-- Barcode Frame - positioned 10px below rectangle, centered, constrained to label width -->
<div id="barcode-frame"> <div id="barcode-frame" style="position: absolute; bottom: 10px; left: 11.34px; width: 227.4px; z-index: 5; text-align: center;">
<!-- Code 128 Barcode representation --> <!-- Code 128 Barcode representation -->
<svg id="barcode-display"></svg> <svg id="barcode-display" style="display: block; margin: 0 auto; height: 50px;"></svg>
<!-- Barcode text below the bars (hidden in preview) --> <!-- Barcode text below the bars (hidden in preview) -->
<div id="barcode-text" style="font-size: 8px; font-family: 'Courier New', monospace; margin-top: 2px; text-align: center; font-weight: bold; display: none;"> <div id="barcode-text" style="font-size: 8px; font-family: 'Courier New', monospace; margin-top: 2px; text-align: center; font-weight: bold; display: none;">
@@ -265,9 +240,9 @@
</div> </div>
<!-- Vertical Barcode Frame - positioned on the right side, rotated 90 degrees, spans the height of main rectangle --> <!-- Vertical Barcode Frame - positioned on the right side, rotated 90 degrees, spans the height of main rectangle -->
<div id="vertical-barcode-frame"> <div id="vertical-barcode-frame" style="position: absolute; right: 0; top: 65.7px; width: 32px; height: 321.3px; z-index: 5; display: flex; align-items: center; justify-content: center;">
<!-- Vertical Code 128 Barcode representation --> <!-- Vertical Code 128 Barcode representation -->
<svg id="vertical-barcode-display"></svg> <svg id="vertical-barcode-display" style="width: 100%; height: auto; transform: rotate(-90deg); transform-origin: center;"></svg>
<!-- Vertical barcode text (hidden in preview) --> <!-- Vertical barcode text (hidden in preview) -->
<div id="vertical-barcode-text" style="position: absolute; bottom: -15px; font-size: 7px; font-family: 'Courier New', monospace; text-align: center; font-weight: bold; width: 100%; display: none;"> <div id="vertical-barcode-text" style="position: absolute; bottom: -15px; font-size: 7px; font-family: 'Courier New', monospace; text-align: center; font-weight: bold; width: 100%; display: none;">