Title: nicholasrees's Replies | WordPress.org

---

# nicholasrees

  [  ](https://wordpress.org/support/users/nicholasrees/)

 *   [Profile](https://wordpress.org/support/users/nicholasrees/)
 *   [Topics Started](https://wordpress.org/support/users/nicholasrees/topics/)
 *   [Replies Created](https://wordpress.org/support/users/nicholasrees/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/nicholasrees/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/nicholasrees/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/nicholasrees/engagements/)
 *   [Favorites](https://wordpress.org/support/users/nicholasrees/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Customizer preview styles breaks on chrome](https://wordpress.org/support/topic/customizer-preview-styles-breaks-on-chrome/)
 *  Thread Starter [nicholasrees](https://wordpress.org/support/users/nicholasrees/)
 * (@nicholasrees)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/customizer-preview-styles-breaks-on-chrome/#post-13325307)
 * I’m using PHP to generate the css because partials under wp_customize_manager
   you can simply throw in a function to the manager instead of having to enqueue
   js. Additionally you can write the entire customizer with only php, which seems
   obviously advantageous to me. I don’t quite understand the “why” question. Asking
   why I’m trying to do something doesn’t actually solve the issue I’m having.
 * You’re right that I copied the incorrect section, there indeed is a section defined‘
   menu’ as seen in the control parameters. If this were my problem, then I wouldn’t
   be able to see the control, but that is not the problem I described. The problem
   I described is chrome breaking the style tags–for not only this tag, but all 
   tags on the site.
 * The sanitize callback is for hex codes. I’m also using wp_customize_color_control,
   so yes the sanitize callback and the color control is supposed to be used together
   in this way. All my other controls use these functions together, and there is
   no problem there. Also, I can verify that the correct values for the background
   are being added into the style tag–only that chrome will not display them for
   some reason.
 * With respect to the boolean values, from PHP documentation on [boolean values](https://www.php.net/manual/en/language.types.boolean.php):
   “
   To specify a boolean literal, use the constants TRUE or FALSE. Both are case-
   insensitive.”
 * With respect to the anonymous function, I had trouble simply just passing in 
   the function name to the render_callback. I don’t know what the issue was there,
   and in either case the [wordpress theme handbook](https://developer.wordpress.org/themes/customize-api/tools-for-improved-user-experience/#registering-partials)
   does essentially the same thing (albeit, passing a parameter into the function).
   I don’t see why modifying this would change my functionality.
 * And yes, that’s exactly what I want to do by the way. Take any background property
   already defined for #menu-item-8 and replace it with the value from get_theme_mod(‘
   menu-item-8’ ).
 * Maybe you could check and see what is invalid about the style tag?
 *     ```
       function menu_items_style() {
   
       return '<style id="menu-item-styles" type"text/css">
           #menu-item-8 {
               background:    #ff000;
       }
       </style>'
       }
       ```
   
 * Also breaks styles when the partial is rendered. Everything loads into the html
   of the partial, and that exact style is inserted and still breaks everything.
   It doesn’t make sense.
    -  This reply was modified 5 years, 9 months ago by [nicholasrees](https://wordpress.org/support/users/nicholasrees/).
    -  This reply was modified 5 years, 9 months ago by [nicholasrees](https://wordpress.org/support/users/nicholasrees/).
    -  This reply was modified 5 years, 9 months ago by [nicholasrees](https://wordpress.org/support/users/nicholasrees/).
    -  This reply was modified 5 years, 9 months ago by [nicholasrees](https://wordpress.org/support/users/nicholasrees/).
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Customizer preview styles breaks on chrome](https://wordpress.org/support/topic/customizer-preview-styles-breaks-on-chrome/)
 *  Thread Starter [nicholasrees](https://wordpress.org/support/users/nicholasrees/)
 * (@nicholasrees)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/customizer-preview-styles-breaks-on-chrome/#post-13324504)
 * I forgot to add the code that actually defines the section where the menu-item
   controls sit:
 * `$wp_customize->add_section( 'content', array(
    'title' => 'Customize the content
   appearance', 'description' => 'Customize the content appearance here.' ) );
 * Sorry for making such a long post, I don’t know how else to succinctly explain
   the problem.

Viewing 2 replies - 1 through 2 (of 2 total)