diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js
index aed1736693a6e7746d7796d15aaba308abfb7cc4..3b7a922c7c979f01f0c192a4e760d2c6a4706ab3 100644
--- a/apps/files/js/detailsview.js
+++ b/apps/files/js/detailsview.js
@@ -194,6 +194,9 @@
 			// hide other tabs
 			$tabsContainer.find('.tab').addClass('hidden');
 
+			$tabsContainer.attr('class', 'tabsContainer');
+			$tabsContainer.addClass(tabView.getTabsContainerExtraClasses());
+
 			// tab already rendered ?
 			if (!$tabEl.length) {
 				// render tab
diff --git a/apps/files/js/detailtabview.js b/apps/files/js/detailtabview.js
index 0bd34a881885538e057de5d162a75197fd19eab5..72b591a7b29f2f98846d4c831f533c35ef084899 100644
--- a/apps/files/js/detailtabview.js
+++ b/apps/files/js/detailtabview.js
@@ -40,6 +40,21 @@
 			}
 		},
 
+		/**
+		 * Returns the extra CSS classes used by the tabs container when this
+		 * tab is the selected one.
+		 *
+		 * In general you should not extend this method, as tabs should not
+		 * modify the classes of its container; this is reserved as a last
+		 * resort for very specific cases in which there is no other way to get
+		 * the proper style or behaviour.
+		 *
+		 * @return {String} space-separated CSS classes
+		 */
+		getTabsContainerExtraClasses: function() {
+			return '';
+		},
+
 		/**
 		 * Returns the tab label
 		 *