diff options
| author | Benjamin Vray <bvr@odoo.com> | 2021-03-31 10:46:22 +0000 |
|---|---|---|
| committer | Benjamin Vray <bvr@odoo.com> | 2021-03-31 12:20:45 +0000 |
| commit | ed26b21f8c55193106ffdf79f9bc704d7355ccc8 (patch) | |
| tree | 206274934cba723f7319442801fadbdf78f36e39 /addons | |
| parent | 49cf25fcc80ec2cb8ba3b3473c7c8d31533e2037 (diff) | |
[FIX] website_sale: fix product grid tables layout
Before this commit, on the /shop page, tables inside modals (e.g.
modal optional product) were modified by the CSS of the table of the
product grid. After this commit, the CSS is modified to only target
the product grid table.
task-2492086
closes odoo/odoo#68597
X-original-commit: 312e9b60b7f2ffe6f10b9bb7c202cb72e67ac8ab
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/website_sale/static/src/scss/website_sale.scss | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/addons/website_sale/static/src/scss/website_sale.scss b/addons/website_sale/static/src/scss/website_sale.scss index 0eb2ed1115d..5e033418401 100644 --- a/addons/website_sale/static/src/scss/website_sale.scss +++ b/addons/website_sale/static/src/scss/website_sale.scss @@ -5,7 +5,10 @@ $o-wsale-products-layout-grid-gutter-width: $grid-gutter-width / 2 !default; $o-wsale-products-layout-grid-gutter-width: min($grid-gutter-width / 2, $o-wsale-products-layout-grid-gutter-width); @mixin wsale-break-table-to-list() { - table, tbody, td, tr { + .o_wsale_products_grid_table_wrapper > table, + .o_wsale_products_grid_table_wrapper > table > tbody, + .o_wsale_products_grid_table_wrapper > table > tbody > tr, + .o_wsale_products_grid_table_wrapper > table > tbody > tr > td { display: block; width: 100%; } @@ -150,19 +153,22 @@ $o-wsale-products-layout-grid-gutter-width: min($grid-gutter-width / 2, $o-wsale } #products_grid { - .table { + .o_wsale_products_grid_table_wrapper > .table { table-layout: fixed; - td { - margin-top: $o-wsale-products-layout-grid-gutter-width; // For list and mobile design - padding: 0; + > tbody { + > tr > td { + margin-top: $o-wsale-products-layout-grid-gutter-width; // For list and mobile design + padding: 0; - @if $o-wsale-products-layout-grid-gutter-width <= 0 { - border: $card-border-width solid $card-border-color; + @if $o-wsale-products-layout-grid-gutter-width <= 0 { + border: $card-border-width solid $card-border-color; + } + } + + > tr:first-child > td:first-child { + margin-top: 0; // For list and mobile design } - } - tr:first-child td:first-child { - margin-top: 0; // For list and mobile design } .o_wsale_product_grid_wrapper { |
