Skip to content
Snippets Groups Projects
Verified Commit fae1be90 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3512236 by catch, smustgrave: Move fieldgroup CSS to its own library

parent 7257036e
No related branches found
No related tags found
1 merge request!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes
Pipeline #450140 passed with warnings
Pipeline: drupal

#450163

    Pipeline: drupal

    #450151

      Pipeline: drupal

      #450144

        ......@@ -589,6 +589,21 @@ drupal.entity-form:
        dependencies:
        - core/drupal.form
        drupal.fieldgroup:
        version: VERSION
        css:
        component:
        misc/components/fieldgroup.module.css: { weight: -10 }
        moved_files:
        system/base:
        deprecation_version: 11.2.0
        removed_version: 12.0.0
        deprecation_link: https://www.drupal.org/node/3432346
        css:
        component:
        css/components/fieldgroup.module.css:
        base: core/misc/components/fieldgroup.module.css
        drupal.form:
        version: VERSION
        js:
        ......
        ......@@ -20,9 +20,18 @@
        class Fieldgroup extends Fieldset {
        public function getInfo() {
        return [
        '#attributes' => ['class' => ['fieldgroup']],
        ] + parent::getInfo();
        $info = parent::getInfo();
        $info['#attributes']['class'] = ['fieldgroup'];
        $info['#pre_render'][] = [static::class, 'preRenderAttachments'];
        return $info;
        }
        /**
        * Adds the fieldgroup library.
        */
        public static function preRenderAttachments($element): array {
        $element['#attached']['library'][] = 'core/drupal.fieldgroup';
        return $element;
        }
        }
        ......@@ -4,7 +4,6 @@ base:
        # Adjust the weights to load these early.
        component:
        css/components/align.module.css: { weight: -10 }
        css/components/fieldgroup.module.css: { weight: -10 }
        css/components/container-inline.module.css: { weight: -10 }
        css/components/clearfix.module.css: { weight: -10 }
        css/components/details.module.css: { weight: -10 }
        ......
        ......@@ -68,6 +68,11 @@ libraries-override:
        component:
        misc/dropbutton/dropbutton.css: css/core/dropbutton/dropbutton.css
        core/drupal.fieldgroup:
        css:
        component:
        misc/components/fieldgroup.module.css: css/core/components/fieldgroup.module.css
        core/drupal.progress:
        css:
        component:
        ......@@ -220,7 +225,6 @@ libraries-override:
        css:
        component:
        css/components/align.module.css: css/system/components/align.module.css
        css/components/fieldgroup.module.css: css/system/components/fieldgroup.module.css
        css/components/container-inline.module.css: css/system/components/container-inline.module.css
        css/components/clearfix.module.css: css/system/components/clearfix.module.css
        css/components/details.module.css: css/system/components/details.module.css
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment