fix: Barcode rendering

- CSS variables in svg don't work in PDF
- styling is done via external css now to make it work in form as well as PDF
This commit is contained in:
Faris Ansari 2021-10-22 19:14:59 +05:30
parent c679c08675
commit 04e10c4c9e
2 changed files with 7 additions and 3 deletions

View file

@ -56,9 +56,6 @@ frappe.ui.form.ControlBarcode = class ControlBarcode extends frappe.ui.form.Cont
get_options(value) {
// get JsBarcode options
let options = {};
options.background = "var(--control-bg)";
options.lineColor = "var(--text-color)";
options.font = "var(--font-stack)";
options.fontSize = "16";
options.width = "3";
options.height = "50";

View file

@ -231,6 +231,13 @@ textarea.form-control {
background-color: var(--control-bg);
border-radius: var(--border-radius);
padding: var(--padding-md);
svg > rect {
fill: var(--control-bg) !important;
}
svg > g {
fill: var(--text-color) !important;
}
}
@media (min-width: 768px) {