django-cms / djangocms-frontend

django CMS frontend is a plugin bundle for django CMS providing several components for the frontend, currently implemented with the popular Bootstrap 5 framework.
Other
43 stars 20 forks source link

Accordion item header too big #119

Closed TLuesebrinck closed 1 year ago

TLuesebrinck commented 1 year ago

Adding "{{ instance.font_size }}" to the button is not necessary, the button is already inside a h tag. Adding a fs-2 class make the header twice as big.

fsbraun commented 1 year ago

Hi @TLuesebrinck ! Can you elaborate? The header tag and font-size should align since otherweise the button tag overwrites the header font size. Which version of bootstrap5 are you using?

TLuesebrinck commented 1 year ago

Version 5.2.3 The sample code on the b5 docs do not use this fs-2 class for the button. Even older versions don't do this. https://getbootstrap.com/docs/5.2/components/accordion/

fsbraun commented 1 year ago

Right. That's a good point: The examples do not allow for the header size to be customized (no matter if you use h1 or h5). That's why the instance.font_size was added.

What is missing, though, is an option to have the accordion headers sized as in the example you point out. This should even be the default -> regular or one of the header sizes.

fsbraun commented 1 year ago

See #120. Now if the header size is unset (new default), the accordion item header is not changed in size.

TLuesebrinck commented 1 year ago

There is more wrong, I think. The h2 tag must have the class "accordion-header"

fsbraun commented 1 year ago

True. Instead, it reads mb-0. Both classes have the same effect, but semantically this needs to be accordion-header. Thanks for pointing this out! PR is updated.