diff --git a/core/modules/block_content/block_content.module b/core/modules/block_content/block_content.module
index e0b5729..a5a000c 100644
--- a/core/modules/block_content/block_content.module
+++ b/core/modules/block_content/block_content.module
@@ -52,6 +52,19 @@ function block_content_theme($existing, $type, $theme, $path) {
 }
 
 /**
+ * Implements hook_preprocess_HOOK() for block templates.
+ */
+function block_content_preprocess_block(&$variables) {
+  // Add bundle and view_mode variables for content blocks.
+  if (isset($variables['elements']['content']['#block_content'])) {
+    $variables['bundle'] = $variables['elements']['content']['#block_content']->bundle();
+    if (isset($variables['elements']['#configuration']['view_mode'])) {
+      $variables['view_mode'] = $variables['elements']['#configuration']['view_mode'];
+    }
+  }
+}
+
+/**
  * Implements hook_entity_type_alter().
  */
 function block_content_entity_type_alter(array &$entity_types) {
diff --git a/core/themes/classy/templates/block/block.html.twig b/core/themes/classy/templates/block/block.html.twig
index fd3311b..097375b 100644
--- a/core/themes/classy/templates/block/block.html.twig
+++ b/core/themes/classy/templates/block/block.html.twig
@@ -21,8 +21,12 @@
  *   displayed in front of the main title tag that appears in the template.
  * - title_suffix: Additional output populated by modules, intended to be
  *   displayed after the main title tag that appears in the template.
+ * - bundle: The bundle of a custom block.
+ * - view_mode: The view mode a custom block was rendered in.
+
  *
  * @see template_preprocess_block()
+ * @see block_content_preprocess_block()
  */
 #}
 {%
@@ -30,6 +34,8 @@
     'block',
     'block-' ~ configuration.provider|clean_class,
     'block-' ~ plugin_id|clean_class,
+    bundle ? 'block--type-' ~ bundle|clean_class,
+    view_mode ? 'block--view-mode-' ~ view_mode|clean_class,
   ]
 %}
 <div{{ attributes.addClass(classes) }}>
