diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme index b14f0bdfc1..338b192a60 100644 --- a/core/themes/claro/claro.theme +++ b/core/themes/claro/claro.theme @@ -996,7 +996,7 @@ function claro_preprocess_field_multiple_value_form(&$variables) { // Add an additional CSS class to the field label table cell. The table // header cell should always exist unless removed by contrib. // @see template_preprocess_field_multiple_value_form(). - if (isset($variables['table']['#header'][0]['data']['#attributes']) && $variables['table']['#header'][0]['data']['#attributes'] instanceof Attribute) { + if (isset($variables['table']['#header'][0]['data']['#attributes']) && $variables['table']['#header'][0]['data']['#attributes']) { $variables['table']['#header'][0]['data']['#attributes']->removeClass('label'); $variables['table']['#header'][0]['data']['#attributes']->addClass('form-item__label', 'form-item__label--multiple-value-form'); } diff --git a/core/themes/claro/css/components/form.css b/core/themes/claro/css/components/form.css index 8e8c937d2d..4f4edd8ab5 100644 --- a/core/themes/claro/css/components/form.css +++ b/core/themes/claro/css/components/form.css @@ -49,15 +49,17 @@ tr .form-item, line-height: var(--line-height-form-label); } +/* Multiple selectors used to ensure styling even if modules override markup. */ + .form-item__label--multiple-value-form, .field-multiple-table .field-label h4.label { display: inline-block; margin-top: 0; margin-bottom: 0; + vertical-align: middle; font-size: inherit; font-weight: inherit; line-height: inherit; - vertical-align: middle; } .form-item__label[for] { diff --git a/core/themes/claro/css/components/form.pcss.css b/core/themes/claro/css/components/form.pcss.css index a3f1a3bf15..6a5740636a 100644 --- a/core/themes/claro/css/components/form.pcss.css +++ b/core/themes/claro/css/components/form.pcss.css @@ -37,6 +37,7 @@ tr .form-item, font-weight: bold; line-height: var(--line-height-form-label); } +/* Multiple selectors used to ensure styling even if modules override markup. */ .form-item__label--multiple-value-form, .field-multiple-table .field-label h4.label { display: inline-block;