diff --git a/core/modules/system/src/Plugin/Condition/RequestPath.php b/core/modules/system/src/Plugin/Condition/RequestPath.php
index a309c58..95ce72e 100644
--- a/core/modules/system/src/Plugin/Condition/RequestPath.php
+++ b/core/modules/system/src/Plugin/Condition/RequestPath.php
@@ -117,10 +117,25 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
         '%front' => '<front>',
       )),
     );
+    // Use a #pre_render callback in order to know the correct #name of the
+    // 'pages' element.
+    $form['#pre_render'][] = [get_called_class(), 'preRenderNegateVisibility'];
     return parent::buildConfigurationForm($form, $form_state);
   }
 
   /**
+   * Makes the 'negate' form element hidden unless 'pages' is used.
+   */
+  public static function preRenderNegateVisibility($element) {
+    $element['negate']['#states'] = [
+      'invisible' => [
+        ':input[name="' . $element['pages']['#name'] . '"]' => ['empty' => TRUE],
+      ],
+    ];
+    return $element;
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
