I'm attempting to create an accordion that expands from the view shown below.
https://i.sstatic.net/D3LJP.png
To.
https://i.sstatic.net/cjG6z.png
It should open or close by clicking on a 'Project' thumbnail, which is displayed in the top left corner.
My current approach involves using clip-path property on the accordion div:
.accordion {
width: 100%;
height: 80vh;
background-color: white;
box-shadow: 10px 10px black;
position: relative;
-webkit-clip-path: polygon(25% 0, 82% 0, 100% 0, 100% 100%, 0
100%, 0 25%, 25% 25%, 25% 20%, 22.5% 17.5%, 25% 15%);
clip-path: polygon(25% 0, 82% 0, 100% 0, 100% 100%, 0 100%, 0
25%, 25% 25%, 25% 20%, 22.5% 17.5%, 25% 15%);
}
However, I've encountered issues with the overlay appearing on top of the project thumbnail when it's expanded, as well as problems with responsiveness.
Is there a different method I can use to achieve this without using clip path? Or any suggestions to optimize my current approach?