From ddd4861be68dd46195d9b1e6a5d001cd7063fbce Mon Sep 17 00:00:00 2001 From: "periwal.bhanu@ranosys.com" Date: Sat, 18 Jan 2020 14:22:02 +0530 Subject: [PATCH] Sticky header for navigation in mobile, desktop #26135 --- .../Magento/blank/web/css/source/_sources.less | 1 + .../blank/web/css/source/_sticky-nav.less | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 app/design/frontend/Magento/blank/web/css/source/_sticky-nav.less diff --git a/app/design/frontend/Magento/blank/web/css/source/_sources.less b/app/design/frontend/Magento/blank/web/css/source/_sources.less index af7eda617217a..d29259fcafeec 100644 --- a/app/design/frontend/Magento/blank/web/css/source/_sources.less +++ b/app/design/frontend/Magento/blank/web/css/source/_sources.less @@ -21,3 +21,4 @@ @import '_breadcrumbs.less'; @import '_popups.less'; @import '_price.less'; +@import '_sticky-nav.less'; \ No newline at end of file diff --git a/app/design/frontend/Magento/blank/web/css/source/_sticky-nav.less b/app/design/frontend/Magento/blank/web/css/source/_sticky-nav.less new file mode 100644 index 0000000000000..b4842947637bd --- /dev/null +++ b/app/design/frontend/Magento/blank/web/css/source/_sticky-nav.less @@ -0,0 +1,16 @@ +@media(min-width:768px){ + .nav-sections { + position: -webkit-sticky; + position: sticky; + top: 0; + } +} +@media(max-width:768px){ + .page-header{ + position: -webkit-sticky; + position: sticky; + top: 0; + background-color:#fff; + z-index: 3; + } +} \ No newline at end of file