Index: src/wp-includes/theme.php
===================================================================
--- src/wp-includes/theme.php	(revision 37412)
+++ src/wp-includes/theme.php	(working copy)
@@ -1831,15 +1831,16 @@
  *
  * @since 3.0.0
  * @see add_theme_support()
- * @param string $feature the feature being added
- * @return bool|void Whether feature was removed.
+ * @param string $feature The feature being added.
+ * @param array $args Array of specific arguments to remove. Optional.
+ * @return bool|void Whether the feature was removed.
  */
-function remove_theme_support( $feature ) {
+function remove_theme_support( $feature, $args = array() ) {
 	// Blacklist: for internal registrations not used directly by themes.
 	if ( in_array( $feature, array( 'editor-style', 'widgets', 'menus' ) ) )
 		return false;
 
-	return _remove_theme_support( $feature );
+	return _remove_theme_support( $feature, $args );
 }
 
 /**
@@ -1852,9 +1853,11 @@
  * @global Custom_Image_Header $custom_image_header
  * @global Custom_Background   $custom_background
  *
- * @param string $feature
+ * @param string $feature The feature being added.
+ * @param array $args Array of specific arguments to remove. Optional.
+ * @return bool|void Whether the feature was removed.
  */
-function _remove_theme_support( $feature ) {
+function _remove_theme_support( $feature, $args = array() ) {
 	global $_wp_theme_features;
 
 	switch ( $feature ) {
@@ -1887,6 +1890,22 @@
 			remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
 			unset( $GLOBALS['custom_background'] );
 			break;
+
+		case 'post-formats':
+		case 'post-thumbnails':
+			if ( $args && is_bool( $_wp_theme_features[ $feature ] ) )
+				return false;
+
+		// This also applies to 'post-formats' and 'post-thumbnails' if they haven't returned yet.
+		case 'html5' :
+			if ( $args ) {
+				$_wp_theme_features[ $feature ][0] = array_diff( $_wp_theme_features[ $feature ][0], $args );
+
+				// Return only if there is still something in the feature array.
+				if ( ! empty( $_wp_theme_features[ $feature ][0] ) )
+					return true;
+			}
+			break;
 	}
 
 	unset( $_wp_theme_features[ $feature ] );
Index: tests/phpunit/tests/theme/support.php
===================================================================
--- tests/phpunit/tests/theme/support.php	(revision 37412)
+++ tests/phpunit/tests/theme/support.php	(working copy)
@@ -98,7 +98,30 @@
 		$this->assertFalse( current_theme_supports( 'html5', 'something-else' ) );
 	}
 
+	function test_custom_header_uploads() {
+		add_theme_support( 'custom-header' );
+		$this->assertTrue( current_theme_supports( 'custom-header', 'uploads' ) );
+		$this->assertNull( remove_theme_support( 'custom-header-uploads' ) );
+		$this->assertFalse( current_theme_supports( 'custom-header', 'uploads' ) );
+	}
+
 	/**
+	 * @ticket 36666
+	 */
+	function test_remove_subsets() {
+		add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );
+		$this->assertTrue( remove_theme_support( 'post-thumbnails', array( 'page' ) ) );
+		$this->assertTrue( current_theme_supports( 'post-thumbnails', 'post' ) );
+		$this->assertFalse( current_theme_supports( 'post-thumbnails', 'page' ) );
+
+		// The following code is supposed to fail since it is not possible to remove
+		// a subset of theme support when it is set to true.
+		add_theme_support( 'post-thumbnails' );
+		$this->assertFalse( remove_theme_support( 'post-thumbnails', array( 'page' ) ) );
+		$this->assertTrue( current_theme_supports( 'post-thumbnails', 'page' ) );
+	}
+
+	/**
 	 * @ticket 24932
 	 *
 	 * @expectedIncorrectUsage add_theme_support( 'html5' )
