Toolbar: Provide a CSS custom property for the admin bar height.
This new custom property, `--wp-admin--admin-bar--height`, reflects the admin bar's height and adjusts responsively on smaller screens. It can be used to offset content to avoid overlapping the admin bar, without needing to copy the media query. This also removes a workaround only needed for Internet Explorer 6 and below. Props nico23, sabernhardt. Fixes #52623. Built from https://develop.svn.wordpress.org/trunk@51672 git-svn-id: http://core.svn.wordpress.org/trunk@51278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1167,10 +1167,8 @@ function _admin_bar_bump_cb() {
|
||||
?>
|
||||
<style<?php echo $type_attr; ?> media="screen">
|
||||
html { margin-top: 32px !important; }
|
||||
* html body { margin-top: 32px !important; }
|
||||
@media screen and ( max-width: 782px ) {
|
||||
html { margin-top: 46px !important; }
|
||||
* html body { margin-top: 46px !important; }
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user