Your problem is that you return nothing if some of the options doesn’t meet your criteria. For example, you are doing this:
if ( $header_container == get_theme_mod( 'header_container_background_color', '#e6e6e6' ) )
return;
So, if $header_container
is equal to #e6e6e6
, the function return
and stop further execution. You have to change that logic. For example (just a quick example):
function wpforge_customize_css() {
$output="";
$header_container = esc_attr(get_theme_mod( 'header_container_background_color' ));
if ( $header_container != get_theme_mod( 'header_container_background_color', '#e6e6e6' ) ) {
$output=".header_container{background-color: ".$header_container.'}';
}
$header_wrap_width = esc_attr(get_theme_mod( 'header_width' ));
if ( $header_wrap_width != get_theme_mod( 'header_width', '64rem' ) ) {
$output=".header_wrap{background-color: ".$header_wrap_width.'}';
}
if( !empty($output) ) {
?>
<!--Customizer CSS-->
<style type="text/css" id="wpforge-customizer-css">
<?php echo $output; ?>
</style>
<!--/Customizer CSS-->
<?php
}
}
?>