Verified Commit 3713df50 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3515093 by sandip, catch, smustgrave, nod_, mherchel: Olivero table.css...

Issue #3515093 by sandip, catch, smustgrave, nod_, mherchel: Olivero table.css should be in its own library and #attached to tables
parent 72c39ca9
Loading
Loading
Loading
Loading
Loading
+15 −1
Changes for core/themes/olivero/olivero.libraries.yml: 15 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ global-styling:
      css/components/site-header.css: {}
      css/components/skip-link.css: {}
      css/components/pager.css: {}
      css/components/table.css: {}
      css/components/text-content.css: {}
      css/components/wide-content.css: {}

@@ -291,3 +290,18 @@ tags:
  css:
    theme:
      css/components/tags.css: {}

olivero.table:
  version: VERSION
  css:
    component:
      css/components/table.css: {}
  moved_files:
    olivero/global-styling:
      deprecation_version: 11.3.0
      removed_version: 12.0.0
      deprecation_link: https://www.drupal.org/node/3517675
      css:
        component:
          css/components/table.css:
            base: css/components/table.css
+10 −0
Changes for core/themes/olivero/olivero.theme: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -365,6 +365,7 @@ function olivero_preprocess_field(&$variables): void {

  if (in_array($variables['field_type'], $rich_field_types, TRUE)) {
    $variables['attributes']['class'][] = 'text-content';
    $variables['#attached']['library'][] = 'olivero/olivero.table';
  }

  if ($variables['field_type'] == 'image' && $variables['element']['#view_mode'] == 'full' && !$variables["element"]["#is_multiple"] && $variables['field_name'] !== 'user_picture') {
@@ -616,6 +617,15 @@ function olivero_preprocess_table(&$variables): void {
      }
    }
  }

  $variables['#attached']['library'][] = 'olivero/olivero.table';
}

/**
 * Implements hook_preprocess_HOOK() for views-view-table templates.
 */
function olivero_preprocess_views_view_table(&$variables): void {
  $variables['#attached']['library'][] = 'olivero/olivero.table';
}

/**