I am developing a template and wanted to make a box using the tcolorbox package in a specific way. I would like it so that when the page breaks the box from one page to another, the formatting would look like this:
And on the next page it would look like this:
Also, when there was no break, that it would look like this:
So far, my code looks like this:
\definecolor{ChapterBackground}{HTML}{101010}
\definecolor{ChapterForeground}{HTML}{e93820}
\newtcolorbox{solution}[1][]{%
enhanced,
breakable,
boxrule = 0pt,frame hidden,
borderline west = {4pt}{0pt}{ChapterBackground},
colback = CoverForeground!10,
sharp corners,
coltitle = ChapterForeground!85,
rounded corners = southeast,
rounded corners = northeast,
arc is angular,
arc = 3mm,
attach boxed title to top left,
boxed title style = {%
enhanced,
colback=ChapterBackground,
top=0pt,
bottom=0pt,
sharp corners,
rounded corners = northeast,
arc is angular,
arc = 2mm,
colframe = ChapterBackground,
rightrule = 0pt,
bottomrule = 0pt,
toprule = 0pt,
},
title = {\bfseries Solution:},
underlay = {% Leaf fold
\path[fill = tcbcolback!80!black] ([yshift = 3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
\path[draw = tcbcolframe,
shorten <=-0.05mm,
shorten >=-0.05mm,
draw opacity=0] ([yshift = 3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
},
overlay unbroken and first={%
\path
let
\p1=(title.north east),
\p2=(frame.north east)
in
node[anchor=west,
color=black!70]
at (title.east) {#1};}}
If anyone knows how to make these very specific small changes I would be very grateful.