Index: src/wp-content/themes/twentyseventeen/assets/js/customize-preview.js
===================================================================
--- src/wp-content/themes/twentyseventeen/assets/js/customize-preview.js	(revision 39151)
+++ src/wp-content/themes/twentyseventeen/assets/js/customize-preview.js	(working copy)
@@ -102,4 +102,34 @@
 			}
 		} );
 	} );
+
+	// Whether a header image is available.
+	function hasHeaderImage() {
+		var image = wp.customize( 'header_image' )();
+		return '' !== image && 'remove-header' !== image;
+	}
+
+	// Whether a header video is available.
+	function hasHeaderVideo() {
+		var externalVideo = wp.customize( 'external_header_video' )(),
+			video = wp.customize( 'header_video' )();
+
+		return '' !== externalVideo || ( 0 !== video && '' !== video );
+	}
+
+	// Toggle a body class if a custom header exists and adjust inner container class.
+	$.each( [ 'external_header_video', 'header_image', 'header_video' ], function( index, settingId ) {
+		wp.customize( settingId, function( setting ) {
+			setting.bind(function() {
+				if ( hasHeaderImage() || ( hasHeaderVideo() && $( 'body' ).hasClass( 'twentyseventeen-front-page' ) ) ) {
+					$( document.body ).addClass( 'has-header-image' );
+					$( '.custom-header-simple' ).addClass( 'custom-header-image' ).removeClass( 'custom-header-simple' );
+				} else {
+					$( document.body ).removeClass( 'has-header-image' );
+					$( '.custom-header-image' ).addClass( 'custom-header-simple' ).removeClass( 'custom-header-image' );
+				}
+			} );
+		} );
+	} );
+
 } )( jQuery );
