From 22e8a530d560b6d0f80a09b2c170949915fa5f16 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Thu, 22 Apr 2021 17:18:35 -0300 Subject: [PATCH] Adjusts to fixed header when admin bar is on --- src/functions/customizer.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/functions/customizer.php b/src/functions/customizer.php index 1c83452..de77b95 100644 --- a/src/functions/customizer.php +++ b/src/functions/customizer.php @@ -2759,7 +2759,18 @@ function tainacan_header_settings_style_output() { .tainacan-logo .logo { max-height: ' . $header_logo_max_height . 'px !important; max-width: ' . $header_logo_max_width . 'px !important; - }' . ( $is_fixed_header ? 'nav.navbar { position: sticky; top: 0; z-index: 9999; }' : ''); + }' . ( $is_fixed_header ? + 'body nav.navbar { + position: sticky; + z-index: 9999; + } + body:not(.admin-bar) nav.navbar { + top: 0; + } + body.admin-bar nav.navbar { + top: 32px; + }' + : ''); echo ''; }