[wp-trac] [WordPress Trac] #42300: Admin Bar CSS assumes body is not positioned

WordPress Trac noreply at wordpress.org
Thu Jun 3 20:44:21 UTC 2021


#42300: Admin Bar CSS assumes body is not positioned
-------------------------------------+------------------------------
 Reporter:  joyously                 |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Toolbar                  |     Version:  4.5.7
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  css
-------------------------------------+------------------------------

Comment (by joyously):

 Perhaps instead of
 ` body:not(.wp-admin)`
 it should be
 `  body.admin-bar:not(.wp-admin)`
 so it is only changed when the admin bar is there.
 Of course, with this change, themes could have a problem if they already
 calculated that the admin bar was overlapping by 46px. My theme makes the
 body relative already, and I have
 `body.admin-bar { min-height: calc(100vh - 46px); }`
 I think I might have to change that with your proposed patch.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/42300#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list