
Como mover tcolorbox
o título da caixa para o primeiro plano (mover para colocar na frente da caixa)? Como você pode ver na captura de tela (retângulo vermelho, meus destaques), a grade se sobrepõe ao título, esse comportamento é indesejado.
\documentclass[]{article}
\usepackage[most]{tcolorbox}
\NewTColorBox{solution}{+O{}}{%
breakable,
enhanced,
sharpish corners,
colframe=blue!50,
colback=white,
coltitle=blue!50,
parbox = false,
fonttitle=\bfseries,
title={Solution},
attach boxed title to top center ={yshift=-\tcboxedtitleheight/2,yshifttext=-\tcboxedtitleheight/2},
halign title=flush center,
boxed title style={%
colback=white,
},
boxrule=0.5mm,top=0mm,bottom=0mm,
underlay={%
\draw[help lines,step=5mm,blue!20!white,shift={(interior.north west)}]
(interior.south west) grid (interior.north east);
},
lowerbox=ignored,
#1
}
\begin{document}
\begin{solution}
Some text
\end{solution}
\end{document}
Responder1
Com underlay boxed title
em vez de underlay
a grade é desenhada antes do título em caixa ser adicionado, resultando no título em caixa aparecendo em primeiro plano (veja também a página 200 do tcolorbox
manual):
\documentclass[]{article}
\usepackage[most]{tcolorbox}
\NewTColorBox{solution}{+O{}}{%
breakable,
enhanced,
sharpish corners,
colframe=blue!50,
colback=white,
coltitle=blue!50,
parbox = false,
fonttitle=\bfseries,
title={Solution},
attach boxed title to top center ={yshift=-\tcboxedtitleheight/2,yshifttext=-\tcboxedtitleheight/2},
halign title=flush center,
boxed title style={%
colback=white,
},
boxrule=0.5mm,top=0mm,bottom=0mm,
underlay boxed title={%
\draw[help lines,step=5mm,blue!20!white,shift={(interior.north west)}]
(interior.south west) grid (interior.north east);
},
lowerbox=ignored,
#1
}
\begin{document}
\begin{solution}
Some text
\end{solution}
\end{document}