diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 8d527df..f8b2a18 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2273,24 +2273,23 @@ function theme_tablesort_indicator($variables) {
 }
 
 /**
- * Returns HTML for a marker for new or updated content.
+ * Prepares variables for mark templates.
  *
- * @param $variables
+ * Default template: mark.html.twig
+ *
+ * @param array $variables
  *   An associative array containing:
  *   - type: Number representing the marker type to display. See MARK_NEW,
  *     MARK_UPDATED, MARK_READ.
  */
-function theme_mark($variables) {
-  $type = $variables['type'];
+function template_preprocess_mark(&$variables) {
   global $user;
+  $variables['logged_in'] = FALSE;
   if ($user->uid) {
-    if ($type == MARK_NEW) {
-      return ' <span class="marker">' . t('new') . '</span>';
-    }
-    elseif ($type == MARK_UPDATED) {
-      return ' <span class="marker">' . t('updated') . '</span>';
-    }
+    $variables['logged_in'] = TRUE;
   }
+  $variables['MARK_NEW'] = MARK_NEW;
+  $variables['MARK_UPDATED'] = MARK_UPDATED;
 }
 
 /**
@@ -3191,6 +3190,7 @@ function drupal_common_theme() {
     ),
     'mark' => array(
       'variables' => array('type' => MARK_NEW),
+      'template' => 'mark'
     ),
     'item_list' => array(
       'variables' => array('items' => array(), 'title' => '', 'type' => 'ul', 'attributes' => array()),
diff --git a/core/modules/system/templates/mark.html.twig b/core/modules/system/templates/mark.html.twig
new file mode 100644
index 0000000..2008222
--- /dev/null
+++ b/core/modules/system/templates/mark.html.twig
@@ -0,0 +1,23 @@
+{#
+/**
+ * @file
+ * Default theme implementation for a marker for new or updated content.
+ *
+ * Available variables:
+ * - type: Number representing the marker type to display. See MARK_NEW,
+ *    MARK_UPDATED, MARK_READ.
+ * - logged_in: TRUE if the user is logged in, else FALSE.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_mark()
+ *
+ * @ingroup themeable
+ */
+#}
+{% if logged_in %}
+  {% if type == MARK_NEW %}
+    <span class="marker">{{ 'new'|t }}</span>
+  {% elseif type == MARK_UPDATED %}
+    <span class="marker">{{ 'updated'|t }}</span>
+  {% endif %}
+{% endif %}
diff --git a/core/modules/system/tests/modules/common_test/common_test.module b/core/modules/system/tests/modules/common_test/common_test.module
index f932f0f..bdf3340 100644
--- a/core/modules/system/tests/modules/common_test/common_test.module
+++ b/core/modules/system/tests/modules/common_test/common_test.module
@@ -247,18 +247,12 @@ function common_test_theme() {
   return array(
     'common_test_foo' => array(
       'variables' => array('foo' => 'foo', 'bar' => 'bar'),
+      'template' => 'common-test-foo',
     ),
   );
 }
 
 /**
- * Provides a theme function for drupal_render().
- */
-function theme_common_test_foo($variables) {
-  return $variables['foo'] . $variables['bar'];
-}
-
-/**
  * Implements hook_library_info_alter().
  */
 function common_test_library_info_alter(&$libraries, $module) {
diff --git a/core/modules/system/tests/modules/common_test/templates/common-test-foo.html.twig b/core/modules/system/tests/modules/common_test/templates/common-test-foo.html.twig
new file mode 100644
index 0000000..6f9b471
--- /dev/null
+++ b/core/modules/system/tests/modules/common_test/templates/common-test-foo.html.twig
@@ -0,0 +1,15 @@
+{#
+/**
+ * @file
+ * Default theme implementation for the common test foo.
+ *
+ * Available variables:
+ * - foo: foo.
+ * - bar: bar.
+ *
+ * @see template_preprocess()
+ *
+ * @ingroup themeable
+ */
+#}
+{{ foo }}{{ bar -}}
