diff --git a/crispy_bootstrap5/templates/bootstrap5/accordion.html b/crispy_bootstrap5/templates/bootstrap5/accordion.html
index 383ea2d..98e6618 100644
--- a/crispy_bootstrap5/templates/bootstrap5/accordion.html
+++ b/crispy_bootstrap5/templates/bootstrap5/accordion.html
@@ -1,3 +1,3 @@
-
+
{{ content|safe }}
diff --git a/tests/test_layout_objects.py b/tests/test_layout_objects.py
index 72b3cd8..3a8fc35 100644
--- a/tests/test_layout_objects.py
+++ b/tests/test_layout_objects.py
@@ -274,6 +274,25 @@ def test_accordion_and_accordiongroup(self):
)
assert parse_form(form) == parse_expected("accordion.html")
+ def test_accordion_css_class_is_applied_to_accordion(self):
+ classes = 'one two three'
+ test_form = SampleForm()
+ test_form.helper = FormHelper()
+ test_form.helper.form_tag = False
+ test_form.helper.layout = Layout(
+ Accordion(
+ AccordionGroup("one", "first_name"),
+ css_class=classes,
+ css_id='super-accordion'
+ )
+ )
+ html = render_crispy_form(test_form)
+
+ assert (
+ html.count('