I have customized a Bootstrap 5 Accordion according to the guide provided at https://getbootstrap.com/docs/5.0/components/accordion/. The default behavior rotates the arrows 180 degrees when an item is opened, changing from 'v' to '^'. However, I want the arrow to rotate only 90 degrees, changing from '>' to 'v'.
To achieve this, I attempted to modify variables by setting
$accordion-icon-transform: rotate(90deg);
in _variables.scss instead of the bootstrap 5 default $accordion-icon-transform: rotate(-180deg) !default;
) and replaced the arrow SVG from 'v' (bootstrap 5 default) to '>'.
The issue I'm facing is that upon first page load, the arrows display as 'v' (I desire '>'). When opening the accordion item, it correctly shows 'v'. After closing it, the arrow displays as desired '>'. However, my goal is for the arrow to show '>' on the initial page load.
Is there a way to achieve this purely through adjusting the bootstrap variables? Or do I need to write additional JavaScript alongside collapse.js?