Page 1 of 1
Accordion
Posted: 06 Oct 2022, 00:59
by Nidzo
Feature request
Description, Features, Video, Specifications, Reviews etc. are currently displayed as Tabs. On mobile phones it doesn't look nice when you have more Tabs. There is no space to display it in one row.
I think that would be much prettier if those options could be displayed as accordion list.
Is it possible to include this as feature request to have option to display that part of Item as Tabs or as Accordion?
Thanks!
Re: Accordion
Posted: 08 Oct 2022, 00:53
by Jan
Hi, thank you for the idea, I will take a look at it but not sure if there is such feature in bootstrap or uikit which are used for stylizing the output
Jan
Re: Accordion
Posted: 08 Oct 2022, 11:06
by Nidzo
Screenshot was made according to Bootstrap 5.X manual.
https://getbootstrap.com/docs/5.0/components/accordion/
Thanks!
Re: Accordion
Posted: 11 Oct 2022, 23:29
by Jan
Hi, yes, there is accordion in BS, but the question is, if there is some way in BS to transform tabs to accordion only with CSS for small screens. Because you can have only one Bootstrap code, the server side which renders the HTML does not have any information about which screen is used, so it only produces one HTML for Bootstrap. So when this should work, there needs to be a way in Boostrap which can with help of CSS only change the tabs to accordion
Jan
Re: Accordion
Posted: 12 Oct 2022, 01:38
by Nidzo
I understand! What about to make it as option to choose one or another only for all devices?
Re: Accordion
Posted: 14 Oct 2022, 00:08
by Jan
Hi, I will take a look at this but generally because of limit for parameters, all design changes should be rather done in overrides than per parameters
Jan
Re: Accordion
Posted: 18 Oct 2022, 10:51
by Nidzo
There is no need. Similar functionality and look can be achieved with css.
Re: Accordion
Posted: 21 Oct 2022, 22:05
by Jan
Hi, great to hear it, thank you for this guide.
Jan
Re: Accordion
Posted: 08 Sep 2023, 23:44
by dmlwebal
Hi
Great solution Nidzo
I include it here for simply copy and paste
Code: Select all
ul#PcItemTab {
display: flex;
flex-direction:column;
flex-wrap: nowrap;
margin-left: -15px;
}
.nav-tabs .nav-link:before {
content: "\f103";
font-family:'Font Awesome 5 Free';
padding-right: 15px;
}
I prefer margin-left: -1rem and padding-right: 1rem but this is a great solution
I could only suggest further expansion via use of display: content; on parent container classes and some javascript to create accordion effect, but some CSS animation may also work.
David
Re: Accordion
Posted: 10 Sep 2023, 11:22
by Nidzo
Thanks @dmlwebal.
There is space for fine tuning of code according to needs.