Fix d-print-none adminlte 3 override of bootstrap css class so sienavs and top navs wont print

This commit is contained in:
johnnyq
2026-08-17 21:31:53 -04:00
parent c84bb56bc7
commit ba319a8f25
3 changed files with 51 additions and 3 deletions

View File

@@ -243,7 +243,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
</select>
</div>
</div>
<div class="col-sm-2">
<div class="col-sm-3">
<div>
<label class="form-label">Industry</label>
<select class="form-select select2" name="industry" onchange="this.form.submit()">
@@ -262,7 +262,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
</select>
</div>
</div>
<div class="col-sm-2">
<div class="col-sm-3">
<div>
<label class="form-label">Referral</label>
<select class="form-select select2" name="referral" onchange="this.form.submit()">

View File

@@ -1199,3 +1199,51 @@ a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-li
outline: 0;
}
/* --- Print ----------------------------------------------------------------
AdminLTE 4 ships its own @media print block, and it loads AFTER Bootstrap's
utilities. It contains `.app-sidebar { display: block !important }`, which is
the same specificity as `.d-print-none { display: none !important }` - so the
later rule wins and the sidebar prints no matter what the markup says.
AdminLTE 3 had no such rule, which is why printing worked before.
This sheet loads last, so these take it back. */
@media print {
.app-sidebar,
.app-header,
.app-footer,
.sidebar-overlay {
display: none !important;
}
/* with the sidebar column gone there is no grid left to lay out, and the
content should have the whole page */
.app-wrapper {
display: block !important;
}
.app-main,
.app-content {
margin: 0 !important;
padding: 0 !important;
width: auto !important;
max-width: 100% !important;
}
/* v4 also appends every external link's full URL after it in print, which
AdminLTE 3 never did - it litters printed invoices, quotes and tickets
with parenthesised URLs. */
a[href^="http"]::after {
content: "" !important;
}
/* And it gives every .btn and .nav-link a black box in print. Four buttons
on the invoice and quote pages have no d-print-none ancestor, so they do
reach paper - and AdminLTE 3 had no such rule, so this restores what
those printouts used to look like. */
.btn,
.nav-link,
.skip-link {
border-color: transparent !important;
}
}

View File

@@ -1,5 +1,5 @@
<!-- Navbar -->
<nav class="app-header navbar navbar-expand" data-bs-theme="dark">
<nav class="app-header navbar navbar-expand d-print-none" data-bs-theme="dark">
<!-- Left navbar links -->
<ul class="navbar-nav">