cobyR
September 19, 2023, 12:13pm
1
A kitchen sink question, I know…
I have a H2 title set to 20 pixels. It shows in a normal text correctly as 20px. But why is a H2 title in an accordion 2 pixels less?
Tested also with different sizes, and when applied in the elemental or atomik theme always about 10% smaller.
Is it a Concrete or a Bootstrap Issue?
Does anybody know or has a fix?
You should be able to find your answer by looking in the browser developer console, elements tab.
You may need to disable your site cache to get a more granular answer.
cobyR
September 20, 2023, 8:32am
3
Thanks John, I found it.
In my css i had set H2 font-size to 20 px, in the accordion css I have 18px.
The accordion interface lets you choose title size, which is in my case set to H2. But for some reason, accordion would not accept this setting. You have to exactly mach your H2 settings from your basic typography settings.
I also found, that if you comment out certain settings in your accordion css, then generic bootstrap5 values apply.
If that is a clear Concrete issue I cannot tell.
Anyway, accordions behave weird and need tinkering to adjust.
With that in mind, you could create a custom template for the accordion block, to set the size of the h2.
cobyR
June 19, 2024, 7:06am
5
For other users with this problem, here’s the github issue, although no solution yet:
opened 08:28PM - 06 Feb 24 UTC
Type:Bug
Bug Priority:Low
Bug:Level of Effort:Unknown
### Affected Version of Concrete CMS
9.x
### Description
The accordion block … allows selecting different header levels:
<img width="775" alt="Screenshot 2024-02-06 at 12 21 48" src="https://github.com/concretecms/concretecms/assets/42463480/c5c546ee-22a1-44bb-b4d7-5102f04d1836">
However, no matter what the selected level, the appearance will always be the same. Compare the H1 and H2 formatting of the Page Title block compared with matching settings in the Accordion block:
<img width="1470" alt="Screenshot 2024-02-06 at 12 15 06" src="https://github.com/concretecms/concretecms/assets/42463480/2e6b2b18-d791-48c2-a34c-e6b2c763375c">
<img width="1492" alt="Screenshot 2024-02-06 at 12 13 56" src="https://github.com/concretecms/concretecms/assets/42463480/1429a38c-e212-4cbd-b68a-874c1668b0c1">
This is because the actual text of the accordion header is wrapped in button tags which are set to `1rem` by bootstrap
<img width="1202" alt="Screenshot 2024-02-06 at 12 15 51" src="https://github.com/concretecms/concretecms/assets/42463480/0903be1d-85d9-4655-b3d7-cece139a2fe1">
### How to reproduce
Add an accordion block, set Item Heading Format to any header level, and publish.
The actual font size, weight, etc. will not change to match the setting.
### Possible Solution
_No response_
### Additional Context
_No response_
I just style these out in my css for every project.