Skip to content

Commit 4f9546a

Browse files
Remove header bump.
1 parent cb56c9f commit 4f9546a

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

mu-plugins/blocks/global-header-footer/blocks.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
require_once __DIR__ . '/admin-bar.php';
1010

1111
add_action( 'init', __NAMESPACE__ . '\register_block_types' );
12-
add_action( 'admin_bar_init', __NAMESPACE__ . '\remove_admin_bar_callback', 15 );
1312
add_action( 'rest_api_init', __NAMESPACE__ . '\register_routes' );
1413
add_filter( 'wp_enqueue_scripts', __NAMESPACE__ . '\register_block_assets', 200 ); // Always last.
1514
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_compat_wp4_styles', 5 ); // Before any theme CSS.
@@ -83,16 +82,6 @@ function register_block_assets() {
8382
);
8483
}
8584

86-
/**
87-
* Remove the default margin-top added when the admin bar is used.
88-
*
89-
* The core handling uses `!important`, which overrides the sticky header offset in `common.pcss`.
90-
*/
91-
function remove_admin_bar_callback() {
92-
remove_action( 'gp_head', '_admin_bar_bump_cb' );
93-
remove_action( 'wp_head', '_admin_bar_bump_cb' );
94-
}
95-
9685
/**
9786
* Register REST API routes, so non-WP applications can integrate it.
9887
*/

mu-plugins/blocks/global-header-footer/postcss/_common.pcss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
html {
2222
--wp--custom--alignment--scroll-bar-width: 8px;
2323

24-
/* Offset from the top of the page which is covered by "stuck" items (admin bar & header). */
25-
--wp-global-header-offset: calc(var(--wp-global-header-height, 0px) + var(--wp-admin--admin-bar--height, 0px));
26-
margin-top: var(--wp-admin--admin-bar--height, 0);
2724
height: unset; /* Let height use default browser height. */
2825
}
2926

0 commit comments

Comments
 (0)