diff --git a/core/themes/claro/claro.info.yml b/core/themes/claro/claro.info.yml index 3adb4227f7..623a4602e2 100644 --- a/core/themes/claro/claro.info.yml +++ b/core/themes/claro/claro.info.yml @@ -120,6 +120,10 @@ libraries-override: theme: /core/themes/stable/css/views_ui/views_ui.admin.theme.css: css/theme/views_ui.admin.theme.css + # Drupal throws an IncompleteLibraryDefinitionException if a base theme + # defined library is set to false in a subtheme's libraries-override. + # We use 'claro/empty' for working around this behavior. + # @see https://www.drupal.org/node/3098375 classy/media_library: claro/empty libraries-extend: diff --git a/core/themes/claro/claro.libraries.yml b/core/themes/claro/claro.libraries.yml index af2d841553..cc13092ffc 100644 --- a/core/themes/claro/claro.libraries.yml +++ b/core/themes/claro/claro.libraries.yml @@ -64,7 +64,9 @@ global-styling: # it has to be always attached. - core/modernizr -# An empty library. +# Drupal throws an IncompleteLibraryDefinitionException if a base theme defined +# library is set to false in a subtheme's libraries-override. +# We use this dummy library as workaround. # @see https://www.drupal.org/node/3098375 empty: version: VERSION diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme index 46db88ed53..a08af36893 100644 --- a/core/themes/claro/claro.theme +++ b/core/themes/claro/claro.theme @@ -358,7 +358,7 @@ function claro_preprocess_details(&$variables) { /** * Implements hook_form_alter(). */ -function claro_form_alter(&$form, FormStateInterface $form_state, $form_id) { +function claro_form_alter(array &$form, FormStateInterface $form_state, $form_id) { $build_info = $form_state->getBuildInfo(); $form_object = $form_state->getFormObject(); diff --git a/core/themes/claro/css/components/views-exposed-form.css b/core/themes/claro/css/components/views-exposed-form.css index f9504ded27..1ba2cc82a0 100644 --- a/core/themes/claro/css/components/views-exposed-form.css +++ b/core/themes/claro/css/components/views-exposed-form.css @@ -58,11 +58,9 @@ * Use flexbox and some margin resets to make the fields + actions go inline. * * For (at least) Media Library, this file is typically inserted by AJAX add_css - * command when the dialog is opened. - * The AJAX add_css command always adds the missing-but-required CSS assets to - * the beginning of the HTML . - * Because of this, we cannot rely on the expected loading order of the - * CSS assets. + * command when the dialog is opened. The AJAX add_css command always adds the + * missing-but-required CSS assets to the beginning of the HTML . Because + * of this, we cannot rely on the expected loading order of the CSS assets. * This is why we have to double these selectors: we have to get the expected * output even for the Media Library modal. * diff --git a/core/themes/claro/css/components/views-exposed-form.pcss.css b/core/themes/claro/css/components/views-exposed-form.pcss.css index c8f085b152..994163730d 100644 --- a/core/themes/claro/css/components/views-exposed-form.pcss.css +++ b/core/themes/claro/css/components/views-exposed-form.pcss.css @@ -9,11 +9,9 @@ * Use flexbox and some margin resets to make the fields + actions go inline. * * For (at least) Media Library, this file is typically inserted by AJAX add_css - * command when the dialog is opened. - * The AJAX add_css command always adds the missing-but-required CSS assets to - * the beginning of the HTML . - * Because of this, we cannot rely on the expected loading order of the - * CSS assets. + * command when the dialog is opened. The AJAX add_css command always adds the + * missing-but-required CSS assets to the beginning of the HTML . Because + * of this, we cannot rely on the expected loading order of the CSS assets. * This is why we have to double these selectors: we have to get the expected * output even for the Media Library modal. *