Skip to content
Snippets Groups Projects

Move resize CSS to its own library and attach it from textarea elements.

Closed catch requested to merge issue/drupal-3512194:3512194-move-resize-css into 11.x
All threads resolved!
Files
9
@@ -44,12 +44,21 @@ public function getInfo() {
@@ -44,12 +44,21 @@ public function getInfo() {
],
],
'#pre_render' => [
'#pre_render' => [
[static::class, 'preRenderGroup'],
[static::class, 'preRenderGroup'],
 
[static::class, 'preRenderAttachments'],
],
],
'#theme' => 'textarea',
'#theme' => 'textarea',
'#theme_wrappers' => ['form_element'],
'#theme_wrappers' => ['form_element'],
];
];
}
}
 
/**
 
* Adds the textarea resize library.
 
*/
 
public static function preRenderAttachments($element): array {
 
$element['#attached']['library'][] = 'core/drupal.textarea-resize';
 
return $element;
 
}
 
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
Loading