[FIX] web: Bootstrap 5 vs wkhtmltopdf incompatibilites
In Bootstrap 5, the `container` class was updated to use variables for its left/right paddings. This seems to conflict with wkhtmltopdf, and no paddings are added, shifting all reports. This introduces the set paddings defined in Bootstrap 4 for the reports. Steps to reproduce: Go to Inventory -> Products -> Products -> Any consumable/storable product -> Print labels -> Dymo Also with Bootstrap 5, the `table-borderless` class wasn't working properly on the PDFs either, as the borders were still visible. This removes all borders within a `table-borderless`. Steps to reproduce: Go to Inventory -> Products -> Products -> Any consumable/storable product -> Print labels -> 2x7 with price Part of task-2985735 closes odoo/odoo#101490 X-original-commit: 0b9acefb18ad8b4a0df72789c853ed8d113a495b Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit is contained in:
+1
@@ -1,4 +1,5 @@
|
||||
$link-decoration: none !default;
|
||||
$container-padding-x: 15px; // Like in BS4
|
||||
|
||||
// remove Emoji fonts
|
||||
$font-family-sans-serif: o-add-unicode-support-font(("Lucida Grande", Helvetica, Verdana, Arial, sans-serif), 1);
|
||||
|
||||
@@ -119,3 +119,16 @@ ol {
|
||||
-webkit-box-flex: 1 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
// Boostrap 5 introduces variable paddings for container which wkhtmltopdf doesn't seem to process, so we restore Boostrap 4's paddings for PDFs
|
||||
.container {
|
||||
padding-right: $container-padding-x;
|
||||
padding-left: $container-padding-x;
|
||||
}
|
||||
|
||||
// Removes borders within a table-borderless as its new definition in Boostrap 5 still has its borders visible in PDFs
|
||||
.table-borderless {
|
||||
tbody, thead, tfoot, tr, td, th {
|
||||
border: 0 none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user