From fde31cd30b9425fa4b105ed50870e63eb2ef24cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Tue, 24 Nov 2026 08:11:53 +0100 Subject: [PATCH 1/2] [BootstrapAdminUi] Only stick the page header when sticky_header is enabled --- src/BootstrapAdminUi/assets/styles/_layout.scss | 9 ++++++--- src/BootstrapAdminUi/public/app.css | 2 +- src/BootstrapAdminUi/public/app.rtl.css | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/BootstrapAdminUi/assets/styles/_layout.scss b/src/BootstrapAdminUi/assets/styles/_layout.scss index daab3ec3..46d86d09 100644 --- a/src/BootstrapAdminUi/assets/styles/_layout.scss +++ b/src/BootstrapAdminUi/assets/styles/_layout.scss @@ -9,13 +9,16 @@ .page-wrapper { .page-header { - position: sticky; - top: -1px; - z-index: 999; margin-top: 0; padding-top: var(--tblr-page-padding-y); padding-bottom: var(--tblr-page-padding-y); + &[data-sticky-header] { + position: sticky; + top: -1px; + z-index: 999; + } + &.is-sticky { background: var(--tblr-body-bg); border-bottom: var(--tblr-border-width) solid var(--tblr-border-color); diff --git a/src/BootstrapAdminUi/public/app.css b/src/BootstrapAdminUi/public/app.css index d4b03dbe..a4a11700 100644 --- a/src/BootstrapAdminUi/public/app.css +++ b/src/BootstrapAdminUi/public/app.css @@ -76,7 +76,7 @@ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. - */.page-wrapper .page-header{margin-top:0;padding-bottom:var(--tblr-page-padding-y);padding-top:var(--tblr-page-padding-y);position:sticky;top:-1px;z-index:999}.page-wrapper .page-header.is-sticky{background:var(--tblr-body-bg);border-bottom:var(--tblr-border-width) solid var(--tblr-border-color);box-shadow:var(--tblr-shadow-card)}.page-wrapper .page-body{margin-top:0}/*! + */.page-wrapper .page-header{margin-top:0;padding-bottom:var(--tblr-page-padding-y);padding-top:var(--tblr-page-padding-y)}.page-wrapper .page-header[data-sticky-header]{position:sticky;top:-1px;z-index:999}.page-wrapper .page-header.is-sticky{background:var(--tblr-body-bg);border-bottom:var(--tblr-border-width) solid var(--tblr-border-color);box-shadow:var(--tblr-shadow-card)}.page-wrapper .page-body{margin-top:0}/*! * This file is part of the Sylius package. * * (c) Sylius Sp. z o.o. diff --git a/src/BootstrapAdminUi/public/app.rtl.css b/src/BootstrapAdminUi/public/app.rtl.css index 0ec0e2b4..4d34b7ac 100644 --- a/src/BootstrapAdminUi/public/app.rtl.css +++ b/src/BootstrapAdminUi/public/app.rtl.css @@ -76,7 +76,7 @@ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. - */.page-wrapper .page-header{margin-top:0;padding-bottom:var(--tblr-page-padding-y);padding-top:var(--tblr-page-padding-y);position:sticky;top:-1px;z-index:999}.page-wrapper .page-header.is-sticky{background:var(--tblr-body-bg);border-bottom:var(--tblr-border-width) solid var(--tblr-border-color);box-shadow:var(--tblr-shadow-card)}.page-wrapper .page-body{margin-top:0}/*! + */.page-wrapper .page-header{margin-top:0;padding-bottom:var(--tblr-page-padding-y);padding-top:var(--tblr-page-padding-y)}.page-wrapper .page-header[data-sticky-header]{position:sticky;top:-1px;z-index:999}.page-wrapper .page-header.is-sticky{background:var(--tblr-body-bg);border-bottom:var(--tblr-border-width) solid var(--tblr-border-color);box-shadow:var(--tblr-shadow-card)}.page-wrapper .page-body{margin-top:0}/*! * This file is part of the Sylius package. * * (c) Sylius Sp. z o.o. From 734c4ad6cd0cf536e680872a6dcff06da79005fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Tue, 24 Nov 2026 09:13:51 +0100 Subject: [PATCH 2/2] Read the sticky_header option from the hookable metadata --- .../templates/shared/crud/common/content/header.html.twig | 2 +- .../templates/shared/crud/common/content/header.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BootstrapAdminUi/templates/shared/crud/common/content/header.html.twig b/src/BootstrapAdminUi/templates/shared/crud/common/content/header.html.twig index 5709118e..c9b190b5 100644 --- a/src/BootstrapAdminUi/templates/shared/crud/common/content/header.html.twig +++ b/src/BootstrapAdminUi/templates/shared/crud/common/content/header.html.twig @@ -1,4 +1,4 @@ -