Skip to content

Commit d52141d

Browse files
author
Christian Leucht
committed
AttributeFormatterTrait // add the Element::id() as "element" to the selector.
1 parent f6f948a commit d52141d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/View/AttributeFormatterTrait.php

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public function buildCssClasses(array $attributes, string $type, ElementInterfac
113113
if ($element->type() !== $type) {
114114
$classes[] = "form-{$type}--{$element->type()}";
115115
}
116+
$classes[] = "form-{$type}__{$element->id()}";
116117

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

0 commit comments

Comments
 (0)