I have been working on creating a collapsible sidebar that pushes the content on the right, but I'm facing issues with responsiveness. When I display the sidebar, the content is getting compressed instead of pushed. I tried adding flex-shrink-0 to the main part, which resolved the pushing behavior but caused loss of responsiveness. I'm aiming for a design similar to the minimized view of Font Awesome, but I'm struggling to explain it clearly.
If I use the following CSS code for the collapsing sidebar width, it partially solves the issue:
#sidebar.collapsing.width {
height: auto;
width: 0;
overflow: hidden;
transition: width .35s ease;
}
You can check the full code at https://fontawesome.com/.