Skip to content

Commit

Permalink
AttributeFormatterTrait // add the Element::id() as "element" to the …
Browse files Browse the repository at this point in the history
…selector.
  • Loading branch information
Chrico committed Jul 3, 2023
1 parent f6f948a commit d52141d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/View/AttributeFormatterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public function buildCssClasses(array $attributes, string $type, ElementInterfac
if ($element->type() !== $type) {
$classes[] = "form-{$type}--{$element->type()}";
}
$classes[] = "form-{$type}__{$element->id()}";

$attributes['class'] = implode(' ', $classes);

Expand Down

0 comments on commit d52141d

Please sign in to comment.