As a designer with a penchant for pain, I am striving to achieve an "art nouveau" aesthetic on paper for my NextJS project with MUI as the main design solution. Despite the abundance of CSS in the background, I am faced with the challenge of creating inner borders with "cut corners" that must have specific colors and sizes.
I want these borders to adapt to their parent's width and height for full responsiveness, as the Paper will eventually serve as a container for text, images, and more.
How can I create such borders?
My current code structure is straightforward:
<div className="mainWrapper">
<div className="border1">
// any text or content
</div>
</div>
Initially, I experimented with the
::after
pseudo-element and theclip-path
property, but found it challenging to make it responsive while also supporting borders...I then attempted to utilize the
<canvas>
element withuseRef
due to my SSR setup, but the outcomes fell short of my desired result...