[wp-trac] [WordPress Trac] #25091: Setting background-color on body in admin page shows unexpected behaviour

WordPress Trac noreply at wordpress.org
Tue Aug 20 11:18:12 UTC 2013


#25091: Setting background-color on body in admin page shows unexpected behaviour
--------------------------+-----------------------------
 Reporter:  pamtbaau      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Appearance    |    Version:  3.6
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Using example from
 [https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts]

 == Reproducable code and steps ==
 1. Add the following code to functions.php of theme

 {{{
 function load_custom_wp_admin_style() {
         wp_register_style( 'custom_wp_admin_css',
 get_template_directory_uri() . '/admin-style.css', false, '1.0.0' );
         wp_enqueue_style( 'custom_wp_admin_css' );
 }
 add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );
 }}}
 2. Create file admin-style.css:

 {{{
 body {
    background-color: red;
 }
 }}}

 == Expected behaviour ==
 I would expect that the background of the area right of the adminmenu will
 be coloured red.


 == Issues ==

 1. The red color will only fill the initial space of the window shown in
 the browse. When scrolling down, the red background disappears. See
 attached images: admin-red.png and admin-red-scrolled.png
 2. #adminmenuback is covered in the area where the body is been set to
 red. Below the intitial size of the window, adminmenuback is visible
 again. See same images.


 == Partial solution ==
 1. No solution found
 2. Adding z-index: 1 to #adminmenuback and #adminmenuwrap will fix the
 partial disappearance of the adminmenu. See image admin-red-
 scrolled-z-index.png

 == OS and Browser ==
 Windows 8
 Chrome 29.x
 Internet Explorer 10

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25091>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list