From 281941c7eeb6d8deb9c7cfb0d66eabf5e37ba2cd Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 17 May 2026 23:40:52 -0400 Subject: [PATCH] fix(portal): column-top fix needs !important to beat Bootstrap utilities Previous attempts (e50631c, 6f2bea9) zeroed .container's pt-3 and the first child's mt-3, but the right column was still sitting ~32px lower than the sidebar. Reason: Bootstrap 5 ships .pt-3 and .mt-3 as margin-top: 1rem !important / padding-top: 1rem !important. My overrides without !important lost the cascade and never took effect. Match Bootstrap's specificity by adding !important on both rules. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../static/src/scss/fp_portal_sidebar.scss | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/fusion_plating/fusion_plating_portal/static/src/scss/fp_portal_sidebar.scss b/fusion_plating/fusion_plating_portal/static/src/scss/fp_portal_sidebar.scss index 54c41a5f..84ae2ae3 100644 --- a/fusion_plating/fusion_plating_portal/static/src/scss/fp_portal_sidebar.scss +++ b/fusion_plating/fusion_plating_portal/static/src/scss/fp_portal_sidebar.scss @@ -156,21 +156,17 @@ // on inner .table-responsive containers do their job on Safari. min-width: 0; - // Neutralise Odoo's container pt-3 so the right column's first - // visible content aligns with the sidebar card's top edge. Without - // this the right column starts ~16px lower than the sidebar. + // Neutralise Odoo's container pt-3 + templates' mt-3 on the first + // child so the right column's top aligns flush with the sidebar's + // top edge. !important is required because Bootstrap 5 spacing + // utilities (.pt-3, .mt-3) ship with !important by default — without + // matching specificity Bootstrap wins and the right column sits + // ~32px (pt-3 + mt-3) lower than the sidebar. #wrap > .container { - padding-top: 0; + padding-top: 0 !important; } - - // Templates often slap mt-3 / mt-4 onto their root content div for - // breathing room from the (now-removed) container pt-3. With pt-3 - // zeroed AND our shell already padding the page, those bottom-margin - // utility classes show up as a stray ~16px offset that makes the - // right column top sit lower than the sidebar's top edge. Zero out - // the top margin of the container's first child so everything aligns. #wrap > .container > :first-child { - margin-top: 0; + margin-top: 0 !important; } // Odoo's portal.portal_searchbar still renders an inline breadcrumb