diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php index a5549e6701..2ee3127a5a 100644 --- a/core/lib/Drupal/Core/Field/WidgetBase.php +++ b/core/lib/Drupal/Core/Field/WidgetBase.php @@ -262,7 +262,7 @@ protected function formMultipleElements(FieldItemListInterface $items, array &$f '#type' => 'submit', '#name' => strtr($id_prefix, '-', '_') . '_add_more', '#value' => t('Add another item'), - '#attributes' => ['class' => ['field-add-more-submit']], + '#attributes' => ['class' => ['field-add-more-submit', 'button--small']], '#limit_validation_errors' => [array_merge($parents, [$field_name])], '#submit' => [[static::class, 'addMoreSubmit']], '#ajax' => [ diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme index d7c49a793e..f5e50e631c 100644 --- a/core/themes/claro/claro.theme +++ b/core/themes/claro/claro.theme @@ -941,11 +941,6 @@ function claro_preprocess_field_multiple_value_form(&$variables) { } } } - - // Make add-more button smaller. - if (!empty($variables['button'])) { - $variables['button']['#attributes']['class'][] = 'button--small'; - } } }